Standard Deviation Calculator
Standard deviation answers the question an average cannot: how spread out are these numbers?
The formula, step by step
Why square the deviations? Because they sum to zero otherwise — the positives and negatives cancel exactly, by the definition of the mean. Squaring removes the sign and has the side effect of weighting large deviations more heavily, which is usually what you want. The final square root undoes the squaring so the answer comes back in the original units.
Worked on {2, 4, 4, 4, 5, 9}: the mean is 4.667, the squared deviations sum to 30.667, so the population variance is 5.111 and the standard deviation is 2.261.
Why n−1 for a sample
This is Bessel's correction, and it exists because of a subtle bias. When you compute deviations from the sample mean rather than the true population mean, the deviations are systematically a little too small — the sample mean sits, by construction, at the centre of your particular sample. Dividing by n−1 instead of n inflates the result just enough to correct for it.
| Use | Divisor | When |
|---|---|---|
| Population (σ) | n | Your data is the entire group you care about |
| Sample (s) | n−1 | Your data is a subset used to infer about a larger group |
In practice, use the sample version unless you genuinely have every member of the population. The difference matters most with small samples: at n = 5 it changes the answer by about 12 %; at n = 100 by 0.5 %.
Reading a standard deviation
For roughly normally distributed data, the empirical rule applies:
- About 68 % of values lie within one standard deviation of the mean.
- About 95 % within two.
- About 99.7 % within three.
This is what makes standard deviation useful rather than merely descriptive: it converts a spread into a
probability statement. It is also the basis of the z-score, (x − μ) ÷ σ, which expresses any
value as a number of standard deviations from the mean and so allows comparison across different scales
entirely.
The coefficient of variation (standard deviation ÷ mean) is worth knowing too. A standard deviation of 5 is large for data averaging 10 and trivial for data averaging 10,000; the coefficient makes spread comparable between datasets with different magnitudes.
Frequently asked questions
What is a 'good' standard deviation?
There is no universal answer — it depends entirely on the scale and the context. A standard deviation of 3 cm in adult height is small; 3 cm in machined parts may be a disaster. Compare it to the mean using the coefficient of variation, or to the tolerance your application requires.
How is variance different from standard deviation?
Variance is the standard deviation squared. Variance is mathematically convenient — variances of independent variables add — but it is in squared units, so a spread of heights comes out in square centimetres. The square root brings it back to something interpretable.
What is standard error?
The standard deviation of the sample mean, calculated as s ÷ √n. It measures how precisely you have estimated the mean, not how spread out the data is. It shrinks as your sample grows, which is why larger studies produce tighter confidence intervals.