- Home
- Tools
- Math
- Statistics Calculator
- Variance Calculator
Variance Calculator
Paste your numbers to get the variance, the average squared distance from the mean, for a sample and for a whole population.
Separate the numbers with commas, spaces, semicolons or new lines. Decimals need a point: 1,5 is read as the two numbers 1 and 5.
- Sample variance
- 10
- s², divides by n − 1
- Population variance
- 8
- σ², divides by n
- Mean
- 10
- sum ÷ count
- Median
- 10
- the middle value
- Mode
- No mode
- every value appears once
- Count
- 5
- Sum
- 50
- Minimum
- 6
- Maximum
- 14
- Range
- 8
- Lower quartile (Q1)
- 7
- Upper quartile (Q3)
- 13
- Interquartile range
- 6
Variance and standard deviation
| Population (÷ n) | Sample (÷ n − 1) | |
|---|---|---|
| Variance | 8 | 10 |
| Standard deviation | 2.828427125 | 3.16227766 |
Box plot
Sorted, smallest first
6, 8, 10, 12, 14
What the variance measures
The variance is the average of the squared distances between the values and their mean. The box above starts with 6, 8, 10, 12, 14, which have a mean of 10. The distances to the mean are −4, −2, 0, 2 and 4, their squares are 16, 4, 0, 4 and 16, and those add up to 40.
- As a population, when these five values are all there is, divide by n: 40 ÷ 5 = 8.
- As a sample from a larger group, divide by n − 1: 40 ÷ 4 = 10.
The sample version is larger on purpose. The distances are measured from the sample's own mean, and from that point the squares add up to less than from any other, the true mean of the larger group included. Dividing by one less corrects for that.
Why square the distances?
Without squaring, the distances cancel out: −4 − 2 + 0 + 2 + 4 = 0, and that happens with any list. Squaring makes every distance positive and gives the large ones extra weight.
The price is the unit. For values in centimetres the variance is in square centimetres, which is hard to picture. Its square root, the standard deviation, is back in centimetres: here √8 ≈ 2.83 for the population and √10 ≈ 3.16 for the sample.
What it is used for
Variances add up where standard deviations do not: when two independent quantities are added, the variance of the total is the sum of the two variances. That is why many statistical methods calculate with variances and take the square root only at the end.
A shortcut by hand
For the population variance, take the mean of the squares and subtract the square of the mean: (36 + 64 + 100 + 144 + 196) ÷ 5 = 108, and 108 − 10² = 8.
The statistics calculator page explains the other results, including how the quartiles are found and how to read the box plot.