Skip to content

Variance Calculator

Paste a list of numbers to get the variance, the average squared distance from the mean, for a sample or a whole population.

Separate them with commas, spaces or new lines; paste a column from a spreadsheet.

Try

Sample variance (s²)

≈ 6.666667

The sample variance is ≈ 6.666667 (exactly 20/3), the average squared distance from the mean (dividing by n − 1).

121511181416

Bars: each value’s squared distance from the mean. Dashed line: their average (the population variance); the sample variance divides by one fewer, so it is a little higher.

Standard deviation (s)
≈ 2.581989
Sum of squares
≈ 33.333333
Population variance
≈ 5.555556

How to calculate variance

Variance is the average of the squared distances from the mean. For 12, 15, 11, 18, 14 and 16 the mean is 86 ÷ 6 = 14⅓. The deviations are −2⅓, ⅔, −3⅓, 3⅔, −⅓ and 1⅔; their squares add up to 100/3, the sum of squares.

Divide the sum of squares by n for a population variance (100/3 ÷ 6 = 50/9 ≈ 5.556) or by n − 1 for a sample variance (100/3 ÷ 5 = 20/3 ≈ 6.667). Because the data here are exact, both variances are exact fractions, and this calculator gives them as fractions as well as decimals.

Variance is in squared units (cm², dollars²), which is why the standard deviation, its square root, is easier to read. Variance is the more useful one in algebra: the variances of independent quantities add, so the variance of a sum of two independent dice is 35/12 + 35/12 = 35/6, while standard deviations do not add.

σ² = Σ(x − μ)² ÷ n · s² = Σ(x − x̄)² ÷ (n − 1)

Variance, worked exactly

Mean, sum of squared deviations and both variances for small data sets, as exact fractions where they don’t come out whole.

Mean, sum of squared deviations and both variances for small data sets, as exact fractions where they don’t come out whole.
DataMeanSum of squaresPopulation σ²Sample s²
12, 15, 11, 18, 14, 1643/3100/350/920/3
1, 2, 3, 4, 5, 67/235/235/127/2
2, 4, 4, 4, 5, 5, 7, 9532432/7
1, 23/21/21/41/2
0, 10, 2010200200/3100
3, 3, 33000
1.5, 2.5, 48/319/619/1819/12
−1, 0, 1022/31
100, 102, 98, 101, 991001025/2

Frequently Asked Questions

Why square the deviations instead of using their absolute values?

The deviations from the mean always add up to zero, so something must remove the signs. Squaring does that and has useful algebra (variances of independent variables add); the average of the absolute deviations is another, less common measure.

What is the variance of a single fair die roll?

The faces 1 to 6 have mean 3.5 and squared deviations adding to 17.5, so the population variance is 17.5 ÷ 6 = 35/12 ≈ 2.917.

Is variance the same as standard deviation squared?

Yes. The variance is the square of the standard deviation, and the standard deviation is the square root of the variance, for samples and populations alike.