Home › Math › Variance Calculator

Variance Calculator

Find the variance, standard deviation and mean of any list of numbers, for a sample or a whole population, with the working shown.

Separate the numbers with commas, spaces or new lines. You can use decimals and negative numbers. Up to 10,000 numbers.

Choose Sample if your numbers are only part of a bigger group. Choose Population if they are the whole group.

Sample variance

-

Sample standard deviation-
Mean-
How many numbers-
Sum-
Sum of squared differences-
Population variance-

Working: difference from the mean

NumberDifference from meanSquared

What is variance and how do you calculate it?

Variance measures how far a set of numbers is spread out from its average. It is the average of the squared differences from the mean. A small variance means the numbers are close together, and a large variance means they are widely scattered.

Population variance: σ² = Σ(x − mean)² ÷ n
Sample variance: s² = Σ(x − mean)² ÷ (n − 1)
Standard deviation = √variance

Steps

  1. Add up the numbers and divide by how many there are, to get the mean.
  2. Subtract the mean from each number.
  3. Square each of those differences.
  4. Add the squares together.
  5. Divide by n for a population, or by n − 1 for a sample.

Example

Take the numbers 2, 4, 4, 4, 5, 5, 7, 9. The mean is 5. The squared differences are 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32. For a population, the variance is 32 ÷ 8 = 4. For a sample, it is 32 ÷ 7 = 4.571.

Sample or population?

Use population when your numbers are every value in the group you care about, such as the marks of all students in one class. Use sample when your numbers are only a part of a larger group, such as a survey of 200 people out of a city. Dividing by n − 1 for a sample corrects for the fact that a sample tends to understate the true spread. If you are unsure, sample is the usual choice.

Variance or standard deviation?

  • Variance is in squared units. If your data is in rupees, the variance is in rupees squared, which is hard to picture.
  • Standard deviation is the square root of the variance, so it is in the same units as your data. It is easier to read.
  • Variance is still useful, because variances of independent values can be added together, which is not true of standard deviations.
  • A variance of 0 means every number is the same.
  • Variance can never be negative.

For the standard deviation as the main result, use the Standard Deviation Calculator. For the average, middle value and most common value, use the Mean Median Mode Calculator.

Need another calculator?

Browse all calculators
Scroll to Top