Standard Deviation Calculator
How spread out is your data? Paste your numbers to get the standard deviation — sample (n − 1) or population (n) — along with the mean, variance, and every step of the calculation shown.
Enter at least 2 numbers.
Sample standard deviation (s)
2.1381
variance = 4.5714
Count (n)
8
Mean (x̄)
5
Σ(x − x̄)²
32
squared deviations
Variance
4.5714
s² = SS/(n−1)
Sample SD (s)
2.1381
divides by n − 1 = 7
Population SD (σ)
2
divides by n = 8
Steps
mean: x̄ = 40 / 8 = 5 deviations: Σ(x − x̄)² = 32 sample: s² = 32 / (8 − 1) = 4.5714 → s = √4.5714 = 2.1381 population: σ² = 32 / 8 = 4 → σ = √4 = 2
Use sample (n − 1) when your data is a subset standing in for a bigger group — almost always the case in homework and surveys. Dividing by n − 1 (Bessel's correction) compensates for measuring deviations from the sample's own mean, which makes them slightly too small on average.
Sample vs Population, Worked Through
Take the classic set {2, 4, 4, 4, 5, 5, 7, 9}: the mean is 40 ÷ 8 = 5, and the squared deviations from 5 sum to 32. Treating the eight values as the entire population divides by n: variance 32 ÷ 8 = 4, so σ = 2. Treating them as a sample from a bigger group divides by n − 1: variance 32 ÷ 7 ≈ 4.5714, so s ≈ 2.1381. The sample version is the default here because homework data is almost always a sample — a subset standing in for something larger.
The two formulas
population: σ = √( Σ(x − x̄)² / n )
sample: s = √( Σ(x − x̄)² / (n − 1) )
{2, 4, 4, 4, 5, 5, 7, 9}: x̄ = 5, Σ(x − x̄)² = 32
population: 32 / 8 = 4 → σ = 2
sample: 32 / 7 ≈ 4.5714 → s ≈ 2.1381Frequently Asked Questions
When do I use sample vs population standard deviation?
Use sample (divide by n − 1) when your data is a subset standing in for a larger group — almost always the case in homework, surveys, and experiments. Use population (divide by n) only when you measured every member of the group. For {2, 4, 4, 4, 5, 5, 7, 9} that's s = √(32/7) ≈ 2.1381 vs σ = √(32/8) = 2.
Why does the sample formula divide by n − 1 instead of n?
Because deviations are measured from the sample's own mean, which sits closer to the data than the true population mean — so the squared deviations come out slightly too small. Dividing by n − 1 instead of n (Bessel's correction) inflates the result just enough to compensate, on average.
What does a standard deviation of 2 actually mean?
It's the typical distance of a data point from the mean. With a mean of 5 and SD of 2, values around 3–7 are ordinary and values past 9 are unusual. For roughly bell-shaped data the empirical rule applies: about 68% of values fall within 1 SD of the mean, 95% within 2, and 99.7% within 3.
Is variance the same thing as standard deviation?
Variance is the standard deviation squared — for the example set the population variance is 4 and the SD is √4 = 2. Variance is what the math manipulates cleanly, but it's in squared units (dollars², cm²), so the SD, back in the data's own units, is what you report.