Sizely
Variance Calculator

Variance Calculator

Free variance calculator for population or sample data. Enter your numbers to get the mean, squared deviations, sum, and variance with every step.

There was an error with your calculation.

Variance Calculator
Sample Population
Variance σ2 = 28.5 s2 = 24.9375
Standard Deviation σ = 5.3385 s = 4.9937
Count n = 8 n = 8
Mean μ = 18.25 x̄ = 18.25
Sum of Squares SS = 199.5 SS = 199.5

Variance at a glance#

Variance measures how spread out a set of numbers is around the mean. Find the mean, subtract it from each value to get the deviations, square those deviations, add them up, then divide by the count of values. A small variance means the values sit close to the mean; a large variance means they are widely spread.

There are two versions. Population variance, written as the Greek letter sigma squared, divides the sum of squared deviations by N, the total count, and is used when your data is the whole group. Sample variance, written as s squared, divides by N minus 1 instead to correct for the smaller spread you tend to see in a sample, and is used when your data is a sample drawn from a larger population.

How to calculate variance#

Take the data set 2, 4, 4, 4, 5, 5, 7, 9. There are 8 values that sum to 40, so the mean is 40 divided by 8, which is 5. Subtract the mean from each value to get the deviations: -3, -1, -1, -1, 0, 0, 2, and 4. Square each deviation: 9, 1, 1, 1, 0, 0, 4, and 16. These squared deviations add up to 32.

How to calculate variance
TypeDivide ByVariance
Population (sigma squared)N = 832 / 8 = 4
Sample (s squared)N minus 1 = 732 / 7 = 4.571

So this data set has a population variance of 4 and a sample variance of about 4.571. Take the square root of the variance to get the standard deviation, which is 2 for the population version.

Enter your numbers in the calculator above for the exact mean, variance and standard deviation, with each step shown. Choose the population formula when your data covers the whole group, or the sample formula when it is a subset, since that choice changes the result.

Why variance squares the deviations#

Deviations from the mean are positive for values above it and negative for values below it. If you simply added them, the positives and negatives would cancel and the sum would be zero. Squaring each deviation makes every term positive, so they no longer cancel, and it also weights large deviations more heavily, so a few extreme values raise the variance sharply.

Variance vs standard deviation#

Both measure the same spread, but variance is in squared units while standard deviation is in the original units. For the data set 2, 4, 4, 4, 5, 5, 7, 9, the population variance is 4 and the population standard deviation is the square root of 4, which is 2. Variance is the natural quantity in many formulas; standard deviation is easier to read because it shares the units of the data.

Limitations of variance#

Variance is sensitive to outliers, because squaring magnifies the effect of points far from the mean. Its squared units are harder to interpret directly, which is one reason standard deviation is often reported instead. It also captures only the size of the spread, not its direction, so it cannot tell you whether values skew high or low. Variance is never negative, since it averages squared numbers, and it is zero only when every value is identical.

Variance FAQ#

What is the difference between sample and population variance?#

The denominator. Population variance divides the sum of squared deviations by N, the full count. Sample variance divides by N minus 1, Bessel's correction, which offsets a sample's tendency to understate the true spread. For the data set above, that gives 4 for the population and about 4.571 for the sample.

How do you calculate the variance of a sample?#

Find the sample mean, subtract it from each value, square the differences, add them, then divide by the sample size minus 1. The calculator above runs these steps and shows each one.

Can variance be negative?#

No. Variance averages squared differences, and squares are never negative, so variance is always zero or positive. A variance of zero means every value is the same.

Standard deviation is the square root of variance. Take the variance, square-root it, and you get the spread expressed in the original units of the data.