Math FIELD NOTES · 5 MIN READ
How Standard Deviation Works
What standard deviation actually measures, the step-by-step variance recipe, why sample mode divides by n−1, and the 68-95-99.7 bell-curve rule.
An average tells you where the middle of your data sits; it says nothing about how spread out the data is around that middle. Standard deviation is the missing half of the story — a single number that answers "typical compared to what?" Two datasets can share the same mean and be completely different in character, and standard deviation is what exposes the difference.
Two datasets, same average, different world
Consider two delivery drivers' daily package counts. Driver A: 10, 10, 10, 10, 10. Driver B: 0, 5, 10, 15, 20. Both average exactly 10 packages a day — yet nobody would call them equally reliable. Driver A never deviates from 10; Driver B swings between nothing and a backlog-clearing sprint.
The raw differences from the mean capture this: A's deviations are all 0, while B's are −10, −5, 0, +5, +10. But you cannot just average the deviations — the negatives cancel the positives and every dataset would land on zero. Standard deviation solves this by squaring the deviations first, which makes everything positive, and then undoing the squaring at the end.
The recipe, step by step
variance = (sum of squared deviations from the mean) / n
standard deviation = √variance
Take the quiz scores 2, 4, 4, 4, 5, 5, 7, 9. The mean is 40 / 8 = 5. Now square each deviation:
deviations: -3, -1, -1, -1, 0, 0, 2, 4
squares: 9 1 1 1 0 0 4 16 → sum = 32
variance = 32 / 8 = 4 → standard deviation = √4 = 2
The standard deviation is exactly 2, which reads naturally: "scores average 5, typically within 2 of it." Notice why we square and then root: squaring stops negative deviations from cancelling, and the final square root returns the answer to the same units as the data — points, dollars, centimetres.
Population (n) vs sample (n − 1)
There are two versions of the formula, and they differ only in the denominator. The population standard deviation divides by n — use it when your data is every member of the group you care about. The sample standard deviation divides by n − 1 — use it when your numbers are a sample meant to estimate the spread of some larger population. For the quiz scores above, the sample variance is 32 / 7 ≈ 4.57, giving a sample standard deviation of about 2.14 instead of 2.
Why subtract one? It is called Bessel's correction. When you compute the mean from the sample itself, the deviations around that mean are slightly smaller than the deviations around the true population mean would be — the sample mean is pulled toward the data by definition, so the spread you measure is systematically a touch too small. Dividing by n − 1 instead of n inflates the result just enough to remove that bias. With large samples the difference barely matters; with tiny samples (n = 2, 3, 4) it matters a lot. The one case where it breaks entirely: a single value has no spread at all, which is why sample mode needs at least two numbers — n − 1 would be zero.
The bell curve: what the number means in practice
Standard deviation becomes most powerful when the data is roughly bell-shaped (normally distributed), because the shape then obeys a famous 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. Heights are the classic example: adult men average around 170 cm with a standard deviation near 7 cm, so roughly two out of three men fall between 163 and 177 cm, and about 95% fall between 156 and 184 cm. One number, and you can sketch the whole distribution.
Two cautions. First, the 68-95-99.7 rule belongs to bell-shaped data — apply it to strongly skewed data like incomes and it will mislead you, because the mean and SD no longer pin down the shape (for skewed data, prefer the median, as covered in the mean vs median guide). Second, an SD of zero means every value is identical — perfectly predictable, like Driver A.
Variance, and why finance squares it away
The intermediate quantity — the average of the squared deviations — is the variance, and it is worth understanding in its own right. Variance is in squared units (dollars², cm²), which makes it awkward to read directly, but it has a property standard deviation lacks: variances add. Independent sources of randomness combine by adding their variances, which is why risk analysts work in variance even though they quote results in standard deviation. In finance, the standard deviation of an investment's returns is quoted as its volatility — a fund returning 8% a year with an SD of 3% is a metronome, while 8% with an SD of 20% is a rollercoaster with the same destination. The mean alone would call them identical.
Try it yourself
Paste any list of numbers into the Standard Deviation Calculator — it computes the sample and population standard deviation, the variance, plus the mean, median, and range, and tells you which denominator it used. To see how the center and the spread are two separate facts about the same data, run the same list through the Average Calculator and compare the mean with the SD side by side. And if you want to turn spread into probability statements like "how likely is a value this extreme?", the Probability Calculator picks up where the bell curve leaves off.