How to Calculate Variance Step by Step
- Find the arithmetic mean: add all observations and divide by their count.
- Subtract the mean from each observation to find each deviation.
- Square every deviation so negative and positive distances do not cancel.
- Add the squared deviations to get the sum of squared deviations (SS).
- Divide SS by N for population variance, or by n − 1 for sample variance.
- Take the square root of variance if you also need standard deviation.
Worked example
For 2, 4, 6, the mean is 4. The deviations are −2, 0, and 2; their squares are 4, 0, and 4; and SS is 8. Population variance is 8 ÷ 3 = 2.6667. Sample variance is 8 ÷ 2 = 4.
Understanding the result
A variance of zero means all values are identical. Larger variance means greater spread around the mean, but the number is expressed in squared units. Standard deviation is often easier to interpret because it uses the dataset’s original unit. Variance is sensitive to outliers because deviations are squared.
