Math & ScienceSample & population

Standard Deviation Calculator

Standard deviation answers one question: typically, how far from the average does a value sit? This reports both the sample and the population figure, because picking the wrong one is the single most common mistake in introductory statistics.

Your Data

Separate values with commas, spaces or new lines.

Commas, spaces or one per line
STANDARD DEVIATION
Variance
Mean
Count
Standard error of the mean
Coefficient of variation
Sum of squared deviations
Range
Typical range (mean ± 1 SD)

Both conventions, side by side

Sample SD (n − 1)
Population SD (n)
Sample variance
Population variance

n or n − 1: the only decision that matters here

If your numbers are every member of the group you care about — all twelve machines on the line, all thirty students in the class — divide by n. That is the population standard deviation, and it is exact.

If your numbers are a sample standing in for a larger group you cannot measure, divide by n − 1. This is Bessel's correction. It exists because the sample mean is itself estimated from the same data, which makes the deviations systematically too small. Dividing by the smaller number nudges the estimate back up to where it belongs.

The gap shrinks fast as the sample grows: at n = 5 the sample SD is about 12% larger, at n = 50 about 1%, at n = 500 about 0.1%. On small samples the choice genuinely changes your answer, which is why both are reported above.

Standard deviation versus standard error

These get swapped constantly, and they measure different things. Standard deviation describes how spread out the individual values are. Standard error describes how much the sample mean itself would bounce around if you repeated the whole study. Standard error is SD divided by the square root of n, so it shrinks as you collect more data — while the standard deviation does not, because the underlying spread of the population is whatever it is.

Error bars on a chart should say which one they are. Standard error bars look far tighter and make results look far more certain.

Coefficient of variation: comparing spread across units

An SD of 4 means nothing until you know the scale. CV expresses the standard deviation as a percentage of the mean, so a blood-pressure series and a share-price series become comparable. It is only meaningful when the values are all positive and the mean is well away from zero — near zero, CV explodes.

Frequently Asked Questions

Should I use sample or population standard deviation?
Use population (divide by n) only when your data covers every member of the group you are describing. In almost every real study the data is a sample, so the n − 1 sample version is the correct default. Spreadsheets call these STDEV.P and STDEV.S.
Why divide by n − 1 instead of n?
Because the mean used in the calculation came from the same sample. That makes the measured deviations slightly too small on average. Dividing by n − 1 corrects the bias, giving an unbiased estimate of the population variance.
What does a standard deviation of zero mean?
Every value in the set is identical. There is no spread at all. Any non-zero standard deviation means at least two values differ.
Is standard deviation affected by outliers?
Strongly, yes — more than the mean is, because deviations are squared before averaging. A single distant value can dominate the result. If that is a concern, report the interquartile range alongside it.
Where these numbers come from

Sources

Official publications only. Links open the original document in a new tab.