CalcWisp

Variance Calculator

Paste a list of numbers to get the variance, with every deviation squared and summed in a table you can check by hand.

  • Free
  • No sign-up
  • Private

Paste or type numbers separated by commas, spaces or new lines (e.g. a column copied from a spreadsheet).

Choose sample unless you have every member of the group.

Sample variance (sยฒ)
4.571429
Standard deviation s = 2.13809 ยท mean = 5 ยท n = 8
Count
8
Mean
5
Sum of squared deviations
32
Sample variance (sยฒ)
4.571429
Population variance (ฯƒยฒ)
4
Standard deviation (s)
2.13809
Deviation table
xx โˆ’ mean(x โˆ’ mean)ยฒ
2โˆ’39
4โˆ’11
4โˆ’11
4โˆ’11
500
500
724
9416
How this was calculated
  1. Count the values: n = 8.
  2. Find the mean: 40 รท 8 = 5.
  3. Subtract the mean from each value and square the result (see the table).
  4. Add the squares: ฮฃ(x โˆ’ mean)ยฒ = 32.
  5. Divide by n โˆ’ 1 = 7 to get the sample variance: 32 รท 7 = 4.571429.
  6. Take the square root: s = โˆš4.571429 = 2.13809.

How this variance calculator works

Variance measures how spread out a set of numbers is. It is the average of the squared distances from the mean. This variance calculator finds the mean of your data, subtracts it from every value, squares each difference, adds the squares and divides, exactly as you would on paper. The deviation table shows every intermediate number so you can check your homework line by line.

The two formulas

For a population, ฯƒยฒ = ฮฃ(x โˆ’ ฮผ)ยฒ รท N. For a sample, sยฒ = ฮฃ(x โˆ’ xฬ„)ยฒ รท (n โˆ’ 1). Spreadsheets split the same way: VAR.S is the sample formula and VAR.P the population formula. Use the sample version when your numbers are a subset used to learn about a bigger group, which covers nearly all homework and research. Use the population version only when your list is the whole group.

Worked example

Take 2, 4, 4, 4, 5, 5, 7, 9. The sum is 40 and there are 8 values, so the mean is 5. The squared deviations are 9, 1, 1, 1, 0, 0, 4 and 16, which add to 32. The population variance is 32 รท 8 = 4; the sample variance is 32 รท 7 = 4.5714. The standard deviation is the square root of the variance: 2 for the population and about 2.138 for the sample.

Variance vs. standard deviation

Variance is in squared units. If your data is in dollars, the variance is in dollarsยฒ, which is hard to picture. The standard deviation takes the square root and returns to the original units, so it is easier to interpret, while variance is easier to work with mathematically because variances of independent variables simply add. When you need to describe the spread to other people, quote the standard deviation; use variance in formulas, ANOVA and regression. The standard deviation calculator adds z-scores and the 68โ€“95โ€“99.7 spread table.

Common mistakes

  • Using the wrong divisor. If your answer is slightly off from the textbook, switch between sample and population.
  • Squaring too early or too late. Square each deviation, then add. Adding the raw deviations always gives zero.
  • Expecting a small number from skewed data. One extreme value can dominate the variance, because squaring magnifies large deviations. Check the table for the row that contributes the most.

A variance of zero means every value is identical. A sample needs at least two values, since the divisor n โˆ’ 1 would otherwise be zero. For a broader summary including median, quartiles and outliers, use the statistics calculator.

Frequently asked questions

How do you calculate variance?

Find the mean, subtract it from each value and square the result, add the squares, then divide by n โˆ’ 1 for a sample or N for a population. For 2, 4, 4, 4, 5, 5, 7, 9 the population variance is 4.

What is the difference between sample and population variance?

Sample variance divides the sum of squared deviations by n โˆ’ 1 and is used when your data is a subset of a larger group. Population variance divides by N and is used when you have the entire group.

What is the relationship between variance and standard deviation?

Standard deviation is the square root of variance, and variance is the square of the standard deviation. A variance of 4 means a standard deviation of 2.

Can variance be negative?

No. Variance is an average of squared numbers, so it is zero or positive. It is zero only when every value is identical.

Why is variance in squared units?

Because the deviations are squared. If your data is in dollars, the variance is in dollars squared; take the square root to get the standard deviation back in dollars.

Related tools