How this calculator works
Find the mean, then subtract it from each value and square the result.
Add the squared deviations. Divide by n for a population, or by n − 1 for a sample: that is the variance.
The standard deviation is the square root of the variance, in the same units as the data.
Use “sample” when your data is a subset of a larger group, which is the usual case in surveys and experiments.
Worked example
2, 4, 4, 4, 5, 5, 7, 9
- Mean: 40 ÷ 8 = 5. Squared deviations sum to 32.
- Population: 32 ÷ 8 = 4, so σ = 2.
- Sample: 32 ÷ 7 = 4.571, so s = 2.138.
Questions people ask
Why divide by n − 1 for a sample?
A sample’s values sit closer to their own mean than to the true population mean, so dividing by n would underestimate the spread. n − 1 corrects for this.
What does standard deviation mean in practice?
It is a typical distance from the mean. For roughly normal data, about 68% of values fall within one standard deviation of the mean and 95% within two.
What is variance?
The square of the standard deviation. It is useful in calculations but harder to interpret because its units are squared.
Last reviewed October 2, 2026