Formulas
Standard deviation measures how spread out numbers are around their mean (x̄). With n values:
Population: σ = √( Σ(x − x̄)² / n ) Sample: s = √( Σ(x − x̄)² / (n − 1) )
Variance is the same expression without the square root (σ² or s²). The sample version divides by n − 1 (Bessel's correction) because a sample's mean is itself estimated from the data, which would otherwise make the spread look slightly too small.
How to calculate standard deviation by hand
Use the five values 6, 8, 10, 12 and 14:
- Add the values and divide by the count to get the mean: 50 ÷ 5 = 10.
- Subtract the mean from each value: −4, −2, 0, 2, 4.
- Square each difference: 16, 4, 0, 4, 16.
- Add the squares to get the sum of squares: 40.
- Divide by n for the population variance (40 ÷ 5 = 8) or by n − 1 for the sample variance (40 ÷ 4 = 10).
- Take the square root: σ = √8 ≈ 2.828 and s = √10 ≈ 3.162.
| x | x − x̄ | (x − x̄)² |
|---|---|---|
| 6 | −4 | 16 |
| 8 | −2 | 4 |
| 10 | 0 | 0 |
| 12 | 2 | 4 |
| 14 | 4 | 16 |
| Sum: 50 | 0 | 40 |
Sample or population?
Use population when your numbers are the entire group you care about, such as the test scores of every student in one class. Use sample when your numbers are a subset used to estimate a larger group, such as a survey of 200 customers. When in doubt, the sample standard deviation is the usual choice.
In spreadsheets, Excel and Google Sheets use STDEV.S for the sample standard deviation and STDEV.P for the population version. The older STDEV function is the sample version.
What the result tells you
A small standard deviation means most values sit close to the mean; a large one means they are spread out. A value of 0 means every number in the list is the same.
For data that roughly follows a bell-shaped (normal) distribution, the 68–95–99.7 rule applies: about 68% of values fall within one standard deviation of the mean, about 95% within two and about 99.7% within three. With a mean of 10 and a standard deviation of 3, roughly two-thirds of values would fall between 7 and 13. The rule does not hold for strongly skewed data.