Variance Calculator

Calculate the population or sample variance of a list of numbers.

Separate numbers with a comma or a new line, e.g. 2, 4, 4, 4, 5, 5, 7, 9.

Data type

Population: the numbers are the complete group you are analysing. Sample: the numbers are a sample taken from a larger group, so the total is divided by one fewer than the count.

Worked example

Inputs: 2, 4, 4, 4, 5, 5, 7, 9. Formula: σ² = Σ(x − μ)² ÷ N. Substitution: the mean is 5 and the squared differences add up to 32, so σ² = 32 ÷ 8. Result: the population variance is 4. Treated as a sample the same numbers give s² = 32 ÷ 7, which is about 4.571429.

How it works

Variance is the average of the squared differences from the mean, so it is measured in squared units. The population formula divides the sum of squares by the number of values; the sample formula divides by one fewer, to correct for estimating a wider group from a sample. Which you need depends on your data, so it is a choice you make, and the result names it. The two are never mixed. A sample variance needs at least 2 values, since dividing by one fewer than 1 is undefined; the population variance of a single value is 0.

What this result means

Variance is the average of the squared differences from the mean. It is measured in squared units, which is why the standard deviation, its square root, is often quoted instead.

Common mistakes

  • Choosing sample variance for a complete population, or the reverse. Population variance divides by the number of values; sample variance divides by one fewer, to correct for estimating from a sample.

Assumptions and limitations

  • Sample variance needs at least 2 values; population variance of a single value is 0.

Analytics only runs if you choose to allow it below. Advertising and affiliate tracking are not currently used on Numerila. This panel exists so your preference is on record for if that ever changes.