Key takeaways
- Population variance: σ² = Σ(x − μ)² ÷ n. This calculator divides by n.
- Sample variance divides by n − 1 and gives a slightly larger answer.
- Always square the differences, or they cancel out to 0.
- Variance is in squared units. Its square root is the standard deviation.
In this guide
What is variance?
If everyone in a group scores exactly 7 on a quiz, there is no spread and the variance is 0. If scores are 3, 5, 7, 9 and 11, they are spread out, and the variance is bigger. Variance turns 'how spread out' into one number.
It is the average of the squared distances from the mean.
Why does variance matter?
Variance measures consistency. A factory wants low variance in bottle sizes. A farmer wants low variance in crop yields. An investor looks at variance to judge risk.
It is also the foundation of more advanced statistics, from the standard deviation to tests used in science and machine learning.
Why square the distances? Values below the mean give negative differences and values above give positive ones. Added up, they always cancel to exactly 0.
The formula
This calculator finds the population variance, dividing by n:
| Symbol | What it means | Example |
|---|---|---|
| σ² | The variance | 8 |
| x | Each value in your list | 3, 5, 7, 9, 11 |
| μ | The mean of the list | 7 |
| Σ | Add up over all values | 16 + 4 + 0 + 4 + 16 |
| n | How many values | 5 |
The sample variance, written s², divides by n − 1 instead. Use it when your numbers are a sample from a bigger group. Variance is in squared units: if the data is in cm, the variance is in cm².
How to calculate variance step by step
- 1Find the mean. Add the values and divide by n.
- 2Subtract the mean from every value. Some answers will be negative.
- 3Square each difference. Now all are positive.
- 4Add the squares. This is the sum of squares.
- 5Divide by n. That is the population variance.
Paste your own list into the calculator below to see every step.
Try it yourself
Pre-filled with the example — change any value.
Common mistakes to avoid
- Forgetting to square. Plain differences always add up to 0.
- Squaring the total instead of each difference. Square first, then add.
- Reporting the wrong unit. Variance is in squared units. Take the square root to get the standard deviation in normal units.
Tips and tricks
- Sample from population: multiply the population variance by
n ÷ (n − 1). Here8 × 5 ÷ 4 = 10. - Adding a constant to every value does not change the variance. Multiplying every value by k multiplies the variance by k².
- Quick but rough spread? The range calculator needs only one subtraction.
Where you'll use it in real life
- Finance: how much an investment's returns jump around.
- Science: how consistent repeated measurements are.
- Sport: how steady a player's scores are from game to game.
- Data science: many machine learning methods try to reduce variance in their errors.
Quick summary
Variance is the average squared distance from the mean: find the mean, square each difference, add and divide by n. This calculator gives the population variance. Use it above to get the answer with every step shown.
Worked example
A gardener measured five seedlings after one week. They were 3, 5, 7, 9 and 11 cm tall. She wants to know how much the heights vary.
- 01Data set: 3, 5, 7, 9, 11
- 02Mean (μ) = 3 + 5 + 7 + 9 + 11 ÷ 5 = 7
- 03Σ(x - μ)² = 40
- 04Variance σ² = 40 ÷ 5 = 8
These numbers are pre-filled in the calculator above.
Frequently asked questions
Does this calculator give population or sample variance?
Population variance, which divides by n. For sample variance, take the sum of squared differences and divide by n − 1 instead.
Why do we square the differences?
Values below the mean give negative differences and values above give positive ones. Without squaring they cancel out to 0. Squaring makes every distance positive.
How are variance and standard deviation related?
Standard deviation is the square root of variance. A variance of 8 means a standard deviation of √8 ≈ 2.83.
Can variance be negative?
No. It is an average of squared numbers, so it is always 0 or positive. It is 0 only when every value is the same.


