Standard Deviation Calculator
Paste a list of numbers to get the standard deviation, variance, mean, median, mode and range — for a sample or a population — with every step worked out.
Standard Deviation Calculator
How to use the standard deviation calculator
Type or paste your data into the box. Commas, spaces, tabs and line breaks all work as separators, so you can copy a column straight out of Google Sheets or Excel; dollar signs and percent signs are ignored, and anything that isn’t a number is skipped and listed so you can check it. Then choose Sample or Population. The results, the dot plot and the full working update as you type, and your data is kept in the page address so you can share the calculation with a classmate or teacher. Nothing you type is sent anywhere — the math runs in your browser.
Sample or population?
Ask whether your numbers are all of the group you want to describe. The test scores of every student in your class are a population if you only care about that class. The heights of 50 randomly chosen adults are a sample, because you’re using them to estimate something about all adults. Most homework, lab and survey data is a sample. If you’re not sure, sample is the safer choice — it is slightly larger, which reflects the extra uncertainty.
The formulas
| Sample | Population | |
|---|---|---|
| Mean | x̄ = Σx ÷ n | μ = Σx ÷ N |
| Variance | s² = Σ(x − x̄)² ÷ (n − 1) | σ² = Σ(x − μ)² ÷ N |
| Standard deviation | s = √s² | σ = √σ² |
In words: find the mean, subtract it from every value, square each difference so negatives don’t cancel positives, add the squares, divide by n − 1 (sample) or N (population), and take the square root. The calculator also reports the standard error of the mean, s ÷ √n, which measures how precisely a sample mean estimates the true mean.
Worked example
The calculator starts with these eight values: 2, 4, 4, 4, 5, 5, 7, 9.
- Mean: the sum is 40, so the mean is 40 ÷ 8 = 5.
- Deviations: −3, −1, −1, −1, 0, 0, 2, 4.
- Squares: 9, 1, 1, 1, 0, 0, 4, 16, which add up to 32.
- Sample: s² = 32 ÷ 7 = 4.571428571, so s = √4.571428571 = 2.138089935.
- Population: σ² = 32 ÷ 8 = 4, so σ = √4 = 2.
The median is 4.5 (halfway between the middle values 4 and 5), the mode is 4 (it appears three times), and the range is 9 − 2 = 7. Switch between Sample and Population above to see both results with the working.
Reading the result
The standard deviation is in the same units as your data, so a class average of 78 points with a standard deviation of 6 points means most scores were within a few points of 78, while a standard deviation of 15 means scores were widely spread. For bell-shaped data, about 68% of values lie within one standard deviation of the mean and about 95% within two — values more than three standard deviations away are unusual. That rule doesn’t hold for skewed data, where the median and the range often describe the data better. The dot plot shows the mean and the band one standard deviation either side, so you can see at a glance how much of the data it covers.
Common mistakes
- Using the wrong divisor. Calculators and spreadsheets offer both: in Google Sheets and Excel,
STDEV.Sis the sample version andSTDEV.Pthe population version. - Forgetting to square. The raw deviations always add up to zero, which is why they’re squared first.
- Stopping at the variance. The variance is in squared units; take the square root to get the standard deviation.
- Rounding too early. Keep the full mean while you work. This calculator keeps full precision and uses a numerically stable two-pass method, so very large or very close values don’t lose accuracy.
Working out a course grade from these scores? The grade calculator handles weighted categories, and the percentage calculator converts points into percentages.
Frequently asked questions
What is the difference between sample and population standard deviation?
Use population (σ, divide by N) when your data is every member of the group you care about — all 28 students in one class, say. Use sample (s, divide by n − 1) when the data is a subset used to estimate a larger group, which is the usual case in surveys, experiments and lab work. For the same numbers the sample value is always a little larger.
Why does the sample formula divide by n − 1?
The deviations are measured from the sample mean, which is calculated from the same data, so they come out slightly smaller on average than deviations from the true population mean. Dividing by n − 1 instead of n (Bessel’s correction) makes the sample variance an unbiased estimate of the population variance.
What is the difference between variance and standard deviation?
Variance is the average squared distance from the mean, so its units are squared (points², dollars²). The standard deviation is the square root of the variance, which puts it back in the original units and makes it easier to interpret.
What does the standard deviation tell me?
Roughly how far a typical value sits from the mean. A small standard deviation means the values cluster tightly; a large one means they are spread out. For data with a roughly bell-shaped (normal) distribution, about 68% of values fall within one standard deviation of the mean and about 95% within two.
What is the standard error of the mean?
It is s ÷ √n, the typical amount the sample mean would vary from sample to sample. The standard deviation describes the spread of individual values; the standard error describes how precisely the mean is estimated, and it shrinks as the sample gets bigger.
Can the standard deviation be zero or negative?
It can be zero, but only when every value is the same. It can never be negative, because it is the square root of an average of squared numbers.