How it works
Variance is the average squared distance from the mean:
s² = Σ(x − x̄)² ÷ (n − 1) σ² = Σ(x − μ)² ÷ N
Squaring stops positive and negative deviations from cancelling, and gives more weight to values far from the mean. The square root of the variance is the standard deviation.
Worked example
Data: 6, 2, 3, 1 (a sample). Mean = 12 ÷ 4 = 3. Squared deviations: 9, 1, 0, 4, which add to 14. Sample variance s² = 14 ÷ 3 ≈ 4.666666667. Population variance would be 14 ÷ 4 = 3.5.
Sample or population: which should I pick?
Choose Population (N) only when your data include every member of the group you want to describe. Choose Sample (n − 1) when your data are part of a larger group and you want to say something about that larger group. The calculator starts on Sample.
| Your data | What you want to describe | Choose |
|---|---|---|
| Test scores of all 25 students in your class | That class | Population (N) |
| Test scores of 25 students picked from a school | The whole school | Sample (n − 1) |
| All 12 monthly bills from this year | This year's bills | Population (N) |
| 30 bolts measured from a day's production | The whole production run | Sample (n − 1) |
Variance of common practice sets
| Data | Mean | Σ(x − x̄)² | σ² (÷ N) | s² (÷ (n − 1)) |
|---|---|---|---|---|
| 1, 2, 3, 4, 5 | 3 | 10 | 2 | 2.5 |
| 2, 4, 6, 8 | 5 | 20 | 5 | 20/3 ≈ 6.667 |
| 3, 5, 7, 9, 11 | 7 | 40 | 8 | 10 |
The set 2, 4, 6, 8 is 1, 2, 3, 4 doubled. The population variance of 1, 2, 3, 4 is 5/4, and 22 × 5/4 = 5.
Worked example: test scores
Five scores are 85, 90, 78, 92 and 88. The mean is 433 ÷ 5 = 86.6. The deviations are −1.6, 3.4, −8.6, 5.4 and 1.4. Their squares are 2.56, 11.56, 73.96, 29.16 and 1.96, which add to 119.2. As a sample, s² = 119.2 ÷ 4 = 29.8 points², and s ≈ 5.459 points. As a population, σ² = 119.2 ÷ 5 = 23.84. The standard deviation is in points, so it is easier to read: scores sit about 5.5 points from the mean.
A shortcut for hand calculation
Σ(x − x̄)² = Σx² − (Σx)² ÷ n
For 6, 2, 3, 1: Σx² = 36 + 4 + 9 + 1 = 50 and (Σx)² ÷ n = 144 ÷ 4 = 36, so the sum of squares is 50 − 36 = 14. With large values that are close together, this shortcut can lose accuracy on a calculator, so the step-by-step method is safer.
Common mistakes
- Adding the raw deviations. They always total 0. For 6, 2, 3, 1 they are 3, −1, 0 and −2.
- Rounding the mean before squaring. Keep full precision until the end.
- Choosing Sample with one value. Dividing by n − 1 = 0 is impossible, and the calculator says a sample needs at least 2 values.
- Giving variance in the data's units. It is in squared units, and the standard deviation brings it back to the original units.
Tips
- variance is in squared units (cm², $²), which is why standard deviation is easier to interpret.
- Adding the same number to every value does not change the variance.
- Multiplying every value by k multiplies the variance by k².
Questions
What is the difference between variance and standard deviation?
Standard deviation is the square root of the variance, so it is in the same units as the data.
Why is my variance different from my friend's?
One of you probably used the sample formula (divide by n − 1) and the other the population formula (divide by N).
Can variance be zero?
Yes, when every value is the same.
How do I find the variance of 1, 2, 3, 4, 5?
The mean is 3 and the squared deviations are 4, 1, 0, 1 and 4, which add to 10. The population variance is 10 ÷ 5 = 2 and the sample variance is 10 ÷ 4 = 2.5.
What is the variance of 3, 5, 7, 9, 11?
The mean is 7 and the squared deviations add to 40. The population variance is 40 ÷ 5 = 8 and the sample variance is 40 ÷ 4 = 10.
What does 20% variance mean?
In budgeting, a variance is the gap between the actual and planned amount, so a 20% variance means the result was 20% above or below plan. That is a different idea from the statistical variance on this page, which measures spread around the mean.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.6 Measures of Scale. Variance s² = Σ(Yᵢ − Ȳ)²/(N − 1), standard deviation s = √s², and the note that the variance squares the units. Checked 22 November 2026.