Standard deviation formulas
Sample standard deviation
s = √( Σ(x − x̄)² ÷ (n − 1) )
Population standard deviation
σ = √( Σ(x − μ)² ÷ n )
The only difference is the divisor. This calculator starts on sample, because most homework and real data are samples, and labels the result with s or σ so you always know which one you are looking at. Switch to population if your data covers the entire group.
Worked example
Find the standard deviation of 2, 4, 4, 4, 5, 5, 7, 9.
- The mean is 40 ÷ 8 = 5.
- Subtract the mean from each value and square it: 9, 1, 1, 1, 0, 0, 4, 16.
- Add them up: the sum of squares is 32.
- Sample: divide by n − 1 = 7 to get a variance of 4.5714, then take the square root: s = 2.1381.
- Population: divide by n = 8 to get a variance of 4, then take the square root: σ = 2.
How to read the answer
For data that is roughly bell-shaped, the empirical rule says about 68% of values fall within one standard deviation of the mean, about 95% within two and about 99.7% within three. If a class has a mean of 75 and a standard deviation of 8, a score of 91 is two standard deviations above the mean, in roughly the top 2%. The z-score calculator turns any score into that kind of position and percentile.
Need only the variance? The variance calculator uses the same steps and leads with s² or σ². For the mean, median and mode of the same data, use the mean, median and mode calculator.