The standard deviation measures how spread out values are around their mean. A small one means the values sit close together. A large one means they are scattered. It is in the same units as the data, which makes it easier to interpret than the variance.
Working it out by hand
Take eight values: 2, 4, 4, 4, 5, 5, 7, 9.
| Value x | x − mean | (x − mean)² |
|---|---|---|
| 2 | −3 | 9 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
| Total | 0 | 32 |
- Mean = 40 ÷ 8 = 5.
- Subtract the mean from each value. These deviations always add up to zero, which is why we square them.
- Add up the squares: 32. This is the sum of squares.
- Divide by n − 1 for a sample: 32 ÷ 7 = 4.571. This is the variance.
- Take the square root: √4.571 = 2.14. That is the sample standard deviation.
If these eight values were the entire population, you would divide by n instead: 32 ÷ 8 = 4, and the standard deviation is exactly 2. The population vs sample guide explains when to use which.
See every step in the standard deviation calculator
What a standard deviation of 2.14 tells you
Roughly speaking, values in this set are typically about 2 units from the mean. For data with a bell-shaped distribution there is a handy rule:
- About 68% of values lie within 1 SD of the mean.
- About 95% lie within 2 SD.
- Almost all (99.7%) lie within 3 SD.
If adult heights have a mean of 170 cm and an SD of 10 cm, then about 95% of adults are between 150 and 190 cm. A person of 205 cm is 3.5 SD above the mean, which is rare. The empirical rule calculator works out these ranges for you.
Comparing spread across different scales
An SD of 5 kg is large for newborn babies and small for adult elephants. To compare spread between things measured on different scales, use the coefficient of variation, which is the SD divided by the mean.
Standard deviation or standard error?
They are easy to mix up, and papers often do.
- The standard deviation describes how much individual values vary.
- The standard error (SD ÷ √n) describes how much a sample mean would vary if you repeated the study.
Use the SD when describing your data. Use the SE when you are talking about how precise an estimate of the mean is. Since the SE is always smaller, reporting it in place of the SD makes data look less variable than they are.
Things that throw it off
The SD squares each deviation, so outliers have a big influence. Add a single value of 30 to the eight values above, and the SD jumps from 2.14 to 8.57. If your data have extreme values, report the interquartile range alongside it, which ignores the most extreme quarter at each end.
Check yourself
Can a standard deviation be negative?
No. It is a square root of an average of squares, so it is zero or positive. It is zero only when every value is the same.
Every value in a data set is increased by 10. What happens to the SD? What if every value is doubled?
Adding 10 shifts the mean but not the spread, so the SD doesn’t change. Doubling every value doubles the SD.