The Standard Deviation Formulas, Up Top
The standard deviation measures how spread out data are around their mean, in the same units as the data. It is the square root of the variance, and it comes in two versions:
- Population: σ = √[ Σ(xᵢ − μ)² / N ], with variance σ² = Σ(xᵢ − μ)² / N
- Sample: s = √[ Σ(xᵢ − x̄)² / (n − 1) ], with variance s² = Σ(xᵢ − x̄)² / (n − 1)
What the Symbols Mean
Each xᵢ is one data value. μ (mu) is the population mean and x̄ (x-bar) is the sample mean. N is the number of values in the whole population; n is the number in a sample. The symbol Σ means “add up”, and each term (xᵢ − mean)² is a squared deviation — how far a value sits from the mean, squared so that values below the mean do not cancel values above it.
Why Two Denominators: N vs n − 1
When you have every value in the group you care about, divide by N: the squared deviations are the complete story. A sample, though, is centred on its own mean x̄, which was itself fitted to those same values, so the deviations come out slightly too small on average. Dividing by n − 1 instead of n inflates the result just enough to correct that bias — this is Bessel's correction. The sample formula therefore always gives a slightly larger standard deviation than the population formula on the same numbers, and the gap shrinks as n grows.
Worked Example: 4, 8, 6, 10, 2
Step 1 — the mean. (4 + 8 + 6 + 10 + 2) / 5 = 30 / 5 = 6. Step 2 — deviations and squares. 4 − 6 = −2 → 4; 8 − 6 = 2 → 4; 6 − 6 = 0 → 0; 10 − 6 = 4 → 16; 2 − 6 = −4 → 16. Step 3 — add them. 4 + 4 + 0 + 16 + 16 = 40. Step 4 — variance. Population: σ² = 40 / 5 = 8. Sample: s² = 40 / (5 − 1) = 40 / 4 = 10. Step 5 — square root. σ = √8 ≈ 2.83; s = √10 ≈ 3.16. Same data, two answers — which one is right depends entirely on whether these five values are the whole group or a sample from a larger one.
Common Mistakes
- Using N for a sample. Exam and research data are almost always samples: divide by n − 1.
- Forgetting the square root. 8 and 10 above are variances, in squared units; the standard deviation is the root.
- Averaging the deviations without squaring. The raw deviations always add to zero — squaring is what makes spread visible.
- Rounding the mean early. Keep full precision until the final root, or small errors compound through every squared term.
What the Size of σ Tells You
A standard deviation is only meaningful next to the mean it belongs to. A σ of 2.83 around a mean of 6, as in our example, is a wide spread — the typical value sits nearly half the mean away from it. The same σ around a mean of 600 would be a tight, precise dataset. For roughly bell-shaped data there is a useful rule of thumb: about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. That is why a value more than three standard deviations from the mean deserves a second look: under a bell shape it should be rare, so it often signals an error, an outlier, or data that are not bell-shaped at all.
Check Yours With the Calculator
Work through our guide on how to find standard deviation for more datasets, then verify your numbers in the standard deviation calculator. For the standard textbook treatment, see OpenStax Introductory Statistics 2e. More formulas live in the formulas library.