Variance Calculator

Variance measures how spread out a list of numbers is, using the squared distance of each number from the average. Paste your numbers to get both the sample and the population variance, the standard deviation, and the working.

Separate numbers with commas, spaces or new lines. Type 1200, not 1,200.

Your numbers are

Most data is a sample. Choose whole population only if you have every value, like all 10 tools a factory made.

Sample variance
43.5

The sample variance is 43.5. That is roughly the average squared distance from the mean, so its units are squared.

Standard deviation 6.6
Mean 25
Population answer 34.8

What is variance?

Variance is roughly the average of the squared distances from the mean. Because the distances are squared, its units are squared too (days², inches²), so it is hard to picture. Take its square root and you get the standard deviation, back in the units of your numbers.

Source NIST/SEMATECH e-Handbook of Statistical Methods · 1.3.5.6 Measures of scale ↗CDC · Principles of Epidemiology, Lesson 2, Section 7: Measures of spread ↗

Sample variance or population variance?

Use the sample variance unless you have every value there is. A sample, like 30 patients from one hospital, divides by one less than how many numbers there are (n − 1), which makes the answer a little bigger. The population variance divides by n, and fits only when the list is complete, like all 10 tools a factory made. This calculator always shows both.

Your numbers areExcel formula
A sample=VAR.S(A2:A11)
The whole population=VAR.P(A2:A11)

Source Microsoft Support · VAR.S function (sample), with example ↗Microsoft Support · VAR.P function (whole population), with example ↗

How to calculate variance

The variance is the first four of CDC’s five steps for the standard deviation. Here they are with your numbers.

s² = Σ(x − mean)² ÷ (n − 1)

Here it is with your numbers:

  1. Find the mean: the 5 numbers add up to 125, and 125 ÷ 5 = 25.
  2. Subtract the mean from each number and square the result: (27 − 25)² gives 4, (31 − 25)² gives 36, (15 − 25)² gives 100, (30 − 25)² gives 25, (22 − 25)² gives 9.
  3. Add the squares: 4 + 36 + 100 + 25 + 9 = 174.
  4. Divide by 4, one less than how many numbers there are: 174 ÷ 4 = 43.5. This is the variance.

It means the squared distances from the mean average out to about 43.5. Take the square root to get the standard deviation, 6.6, back in the original units.

Each number’s distance from the mean

NumberMinus the meanSquared
2724
31636
15−10100
30525
22−39
Total 1250174

Variance examples

NumbersVariance
27, 31, 15, 30, 22 (days)Sample 43.5
1345, 1301 … 1299 (10 tools)Sample 754.27
The same 10 tools, as the whole populationPopulation 678.84
2, 0, 3, 1, 0, 1, 2, 2, 4, 8, 1, 3, 3, 12, 1, 6, 2, 5, 1 (doses)Sample 9

FAQs

How do you calculate variance?

Find the mean, subtract it from each number and square the results, add the squares, then divide by one less than how many numbers there are. For 27, 31, 15, 30 and 22 days, the mean is 25, the squares add up to 174, and 174 ÷ 4 is a variance of 43.5 days squared.

Source CDC · Principles of Epidemiology, Lesson 2, Section 7: Measures of spread ↗

What is variance in statistics?

Variance is roughly the average squared distance of the numbers from their mean. Squaring gives far-out numbers more weight: a number 10 away from the mean adds 100, while one 2 away adds only 4.

Source NIST/SEMATECH e-Handbook of Statistical Methods · 1.3.5.6 Measures of scale ↗

How do you calculate sample variance?

Add up the squared distances from the mean, then divide by n − 1, one less than how many numbers you have, instead of by n. That is the sample variance; dividing by n gives the population variance.

Source CDC · Principles of Epidemiology, Lesson 2, Section 7: Measures of spread ↗

How do you calculate variance in Excel?

Use =VAR.S(A2:A11) when your numbers are a sample, and =VAR.P(A2:A11) when they are the whole population. On Microsoft’s breaking-strength example, VAR.S gives 754.27 and VAR.P gives 678.84.

Source Microsoft Support · VAR.S function (sample), with example ↗

Sources

Related calculators