Mean & Standard Deviation Calculator

Enter a list of numbers to instantly calculate the mean, median, standard deviation, and other basic statistics.

This calculator takes a list of numbers and returns the mean, median, mode, variance, standard deviation, range, count and sum in one go. It shows the population version (divide by n) and the sample version (divide by n − 1) side by side, so you can match whichever one your textbook, spreadsheet or report requires. It is meant for the situations where an average alone does not tell the story: checking how test scores are spread out, judging the scatter of repeated measurements, or seeing how much monthly spending or sales bounce around. Under the result, the working is written out in a sentence (the sum, the mean and the sum of squared deviations), so you can compare it against a hand calculation or a spreadsheet.

What each statistic tells you

Formulas, and why n versus n − 1 matters

Mean: x̄ = Σx ÷ n
Population variance: σ² = Σ(x − μ)² ÷ n, population standard deviation: σ = √σ²
Sample variance: s² = Σ(x − x̄)² ÷ (n − 1), sample standard deviation: s = √s²

Which one to use depends on whether your data is the whole group or only part of it. If you hold every member of the group (the scores of every student in one class, say), use the population formula, dividing by n. If your numbers are a sample drawn from a larger group (survey answers, a few measured items from a production run), use the sample formula, dividing by n − 1. The sample mean sits as close to the sample values as any number can, so dividing by n tends to underestimate the spread of the full group; using n − 1 corrects for that (Bessel’s correction). In Excel and Google Sheets, STDEV.S divides by n − 1 and STDEV.P divides by n. Calculators and statistics packages have different defaults, so when you report a number, say which one it is.

The ratio between the two results is √(n ÷ (n − 1)), and it is biggest for small data sets.

Number of values nSample SD ÷ population SDHow much larger the sample SD is
21.4142about 41.4%
31.2247about 22.5%
51.1180about 11.8%
101.0541about 5.4%
301.0171about 1.7%
1001.0050about 0.5%

Once n passes 30 the gap shrinks to under 2%, which rarely matters in practice, but with 2 to 5 values it can exceed 10 to 40% (about 41.4% at n = 2).

Worked examples

The table below is computed at build time with the same formulas the calculator uses.

DataMeanMedianPopulation SDSample SD
Five test scores (85, 90, 78, 92, 88)86.6884.885.46
Six monthly bills (30, 32, 35, 31, 33, 300)76.8332.599.82109.34
Textbook set of eight (2, 4, 4, 4, 5, 5, 7, 9)54.522.14

Example 1: test scores 85, 90, 78, 92, 88. The sum is 433, so the mean is 433 ÷ 5 = 86.6. The sum of squared deviations is 119.2. The population variance is 119.2 ÷ 5 = 23.84 and the population SD is about 4.88. Treating the five scores as a sample, the variance is 119.2 ÷ 4 = 29.8 and the SD is about 5.46. Scores move roughly 5 points either side of the 86.6 mean.

Example 2: an outlier among monthly bills 30, 32, 35, 31, 33, 300. One month at 300 lifts the mean to about 76.83, yet the median stays at 32.5 and describes the typical month well. The population SD is about 99.82, larger than the mean itself, which signals that the mean is not a “usual” month. When you see this, report the median alongside the mean.

Example 3: 2, 4, 4, 4, 5, 5, 7, 9. The mean is 5, the sum of squared deviations is 32, the population variance is 32 ÷ 8 = 4, and the population SD is exactly 2. The mode is 4 and the median is 4.5. This is a common hand-calculation exercise in statistics courses, so it is a handy way to check a tool.

Example 4: even count. For 1, 3, 5, 9 the sorted middle values are 3 and 5, so the median is (3 + 5) ÷ 2 = 4, while the mean is 18 ÷ 4 = 4.5.

Common mistakes and misconceptions

When this calculator is not enough

It does not do confidence intervals, hypothesis tests, regression, weighted means, or the mean and variance of grouped frequency tables. It does not report quartiles or percentiles, and it never removes outliers on its own, so an entry mistake such as a misplaced decimal point must be found and fixed by you. Items that cannot be read as numbers are skipped, and the ones skipped are listed under the result.

How to use the results

Frequently Asked Questions

How should I enter the numbers?

Separate them with commas, spaces, semicolons or line breaks. You can paste a column copied from a spreadsheet. Negative numbers and decimals work; anything that is not a number is skipped and listed.

Population or sample standard deviation: which should I use?

Use the population value (n) when your data is the entire group, and the sample value (n − 1) when it is a subset used to estimate a larger group. Surveys, experiments and quality checks are almost always the sample case.

What is the difference between variance and standard deviation?

The standard deviation is the square root of the variance. Variance is convenient mathematically (variances of independent quantities add up), while the standard deviation shares the unit of the data and is easier to interpret.

How is the median found for an even number of values?

Sort the values and average the two in the middle. For 1, 3, 5, 9 the median is (3 + 5) ÷ 2 = 4.

My Excel result is different.

Usually STDEV.P (population) and STDEV.S (sample) have been mixed up. This calculator shows both, so compare against the one that matches your Excel function. Displayed values are rounded to four decimal places.

What should I do about outliers?

If an outlier is an entry error, fix or remove it. If it is a real value, do not delete it: report the median next to the mean, or present results with and without it.

Related tools

Results are for reference. For papers, quality reports or any official use, verify with dedicated statistical software.