How to Calculate Standard Deviation Step by Step
The exact five-step process for calculating standard deviation by hand, with a fully worked example showing the mean, squared deviations, variance, and final result.
Published July 20, 2026
Standard deviation measures how spread out a set of numbers is around its average — a small standard deviation means the data clusters tightly near the mean, a large one means it’s spread widely. The calculation itself is a fixed five-step process, the same every time regardless of the dataset.
The five steps
A fully worked example
Data: 2, 4, 4, 4, 5, 5, 7, 9
8 values — a small dataset chosen specifically so every step can be checked by hand.
| Value | Deviation from mean (5) | Squared deviation |
|---|---|---|
| 2 | −3 | 9 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
Step 1: the mean of these 8 values is (2+4+4+4+5+5+7+9) ÷ 8 = 5. Step 2 and 3 are shown in the table — each deviation squared removes the negative signs, so deviations above and below the mean don’t cancel out. Step 4: the sum of squared deviations is 32, so the variance is 32 ÷ 8 = 4. Step 5: the square root of 4 is 2 — the population standard deviation.
Squaring the deviations in step 3 does two things at once: it makes every value positive (so deviations above and below the mean don't cancel each other out to zero), and it weights larger deviations more heavily than smaller ones — a value 4 away from the mean contributes 16 to the sum, while a value 2 away contributes only 4, not 8.
Why step 4 has two versions
This worked example divides by 8 (the full count) — the population formula. Dividing by 7 (count minus one) instead gives the sample formula, which produces a slightly larger result. Which one applies depends on whether the dataset is the entire population being studied or just a sample drawn from a larger one — covered fully in Population vs. Sample Standard Deviation Explained.
Checking the work
Standard deviation should never be negative, and it should be roughly proportional to how spread out the data visually looks.
Forgetting to square the deviations before averaging — this is the single most common mistake in a hand calculation.
FAQ
Why not just average the raw deviations instead of squaring them? The raw deviations from the mean always sum to exactly zero by definition (that’s what makes it the mean) — squaring first is what prevents the positive and negative deviations from canceling out to a meaningless zero.
Is there a shortcut formula that avoids calculating each deviation separately? Yes — an alternative computational formula (using the sum of squares minus the square of the sum, divided appropriately) avoids listing every deviation, though it’s more prone to rounding error by hand and is mostly used in software implementations rather than manual calculation.
Does the order of the data values matter? No — standard deviation is unaffected by the order values are listed in, since both the mean and the sum of squared deviations only depend on the set of values, not their sequence.
How large a dataset is needed for standard deviation to be meaningful? Technically it can be calculated for any 2+ values, but very small datasets produce standard deviations that are highly sensitive to individual outliers — larger datasets generally give a more stable, representative picture of spread.
Can the Standard Deviation Calculator show these steps automatically? Yes — entering the same 8 values and choosing “Population” as the formula reproduces this exact worked example, useful for checking manual calculations step by step.
What does a standard deviation of 0 mean? Every value in the dataset is identical — with no spread at all around the mean, both the variance and standard deviation collapse to exactly zero.