How to calculate standard deviation
- Find the mean: add the numbers and divide by how many there are (n).
- Subtract the mean from each number and square the result.
- Add the squares up and divide by n − 1 for a sample, or by n for a population. That’s the variance.
- Take the square root of the variance.
s = √( Σ(x − x̄)² ÷ (n − 1) )
Example
For 4, 8, 15, 16, 23 and 42 the mean is 108 ÷ 6 = 18. The squared differences add up to 910, so the sample variance is 910 ÷ 5 = 182 and the sample standard deviation is 13.49.