Saved

Press the star next to a tool's name to save it.

All my tools

Variance Calculator

Find the statistical variance of a list of numbers, or the variance percentage between an expected and an actual figure, with the working shown.

Restored your last values ·

Your result opens on the next page.

Result

4.5714

Enter your numbers to see the result.

A variance calculator answers two different questions that share one name. In statistics, variance measures how spread out a list of numbers is. In business and budgeting, a variance percentage shows how far an actual figure is from what you expected. This tool does both, so choose the one you need above. The result comes with the mean, standard deviation and other working, so you can check it or use it in an assignment.

The statistical variance formula

Sample variance: s² = Σ(x − x̄)² ÷ (n − 1)

Population variance: σ² = Σ(x − μ)² ÷ n

In plain words, find the mean, subtract it from each number, square each result, and add them up. That total is called the sum of squares. Then divide by n − 1 for a sample, or by n for a whole population. The square root of the variance is the standard deviation.

The variance percentage formula

Variance % = (actual − expected) ÷ |expected| × 100

A positive result means the actual figure came in above what was expected, and a negative one means it came in below. Whether that’s good depends on the number. Sales above budget is good news, while costs above budget usually aren’t.

How to use this variance calculator

  1. Choose what to find. Pick statistical variance or variance percentage.
  2. Enter your numbers. For a list, separate values with commas or spaces. You can paste a column from a spreadsheet.
  3. Choose sample or population. This appears for lists only. See below if you’re not sure.
  4. Read your result. The table shows the mean, the sum of squares and the standard deviation.

Worked examples

A list of numbers: take 2, 4, 4, 4, 5, 5, 7 and 9. The mean is 40 ÷ 8 = 5. The squared differences are 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32. The population variance is 32 ÷ 8 = 4, with a standard deviation of 2. The sample variance is 32 ÷ 7 = 4.571, with a standard deviation of 2.138.

A short list: for 10, 12 and 14, the mean is 12 and the sum of squares is 8. The sample variance is 8 ÷ 2 = 4, and the population variance is 8 ÷ 3 = 2.667.

Over budget: a budget of $1,000 comes in at $1,150. The variance percentage is 150 ÷ 1,000 × 100 = +15%.

Under forecast: a sales forecast of 500 units comes in at 450. That’s −50 ÷ 500 × 100 = −10%.

Sample or population?

UseWhen your numbers areExample
Sample (n − 1)A part of a larger groupTest scores from 30 students, to estimate a whole school
Population (n)The entire group you care aboutTest scores for every student in one class, for that class alone

If you’re unsure, sample variance is usually the right pick, as most data is a sample of something larger. Dividing by n − 1 corrects for the fact that a sample tends to underestimate the spread of the full group. Spreadsheets make this choice too: VAR.S gives the sample figure, and VAR.P gives the population figure.

How to read variance

A variance of 0 means every number is the same, and larger values mean more spread. One catch is that variance is in squared units. If your data is in dollars, the variance is in “square dollars”, which is hard to picture. That’s why people usually report the standard deviation, which is back in the original units.

Variance can also be swayed heavily by a few extreme values, because the differences are squared. A single unusual number can raise it a lot, so check your data for typing mistakes and outliers before you rely on the result.

Reading a variance percentage in a budget report

Finance teams often review each line of a budget this way. A small percentage on a large line can matter more than a large percentage on a small one, so look at the money as well:

Budget lineExpectedActualVariance
Rent$2,000$2,0000%
Marketing$500$650+30%
Sales$10,000$9,200−8%

Here, the −8% on sales is worth $800, while the +30% on marketing is worth only $150.

Variance percentage vs. percent change

The math is the same, but the meaning differs. Percent change compares a value now with its value before. Variance percentage compares a real result with a plan, a budget or a forecast. Use whichever word your report calls for.

For changes over time, use the percentage change calculator. To compare two values with no baseline, try the percentage difference calculator.

Why far values count for more

The NIST Engineering Statistics Handbook describes the variance as roughly the arithmetic average of the squared distance from the mean.[1] It notes that squaring gives greater weight to values that are further from the mean: a point 2 units away adds 4 to the sum, while a point 10 units away adds 100.[1] The handbook also says the standard deviation restores the spread to the original data units, because the variance squares them.[1]

Worked example: one outlier

Go back to the list 2, 4, 4, 4, 5, 5, 7 and 9, which has a sample variance of 4.5714. Now suppose the last value was typed as 29 instead of 9.

  • Mean: 60 ÷ 8 = 7.5, up from 5
  • Sum of squares: 542, up from 32
  • Sample variance: 542 ÷ 7 = 77.4286, with a standard deviation of 8.7994
  • Population variance: 542 ÷ 8 = 67.75

One changed number made the sample variance about 17 times bigger. If a result looks far too large, check the list for a typing mistake before you use it.

Reading the results table

For a list of numbers, the table shows the count (n), the mean, the sum of squares and the standard deviation of the kind you chose. The last row gives the other kind of variance for comparison, so you can see both the sample and population figures without running the tool twice. Values of 1 or more are shown to up to four decimal places, and smaller values to six significant figures. For a variance percentage, the table shows the plain difference between actual and expected, and the actual figure as a share of the expected one.

What next

Use this often? Add Variance to your Home screen.

Frequently asked questions

How does a variance calculator work?

For a list, it finds the mean, adds up the squared differences from the mean, and divides by n − 1 for a sample or n for a population.

How do I calculate variance percentage?

Subtract the expected value from the actual value, divide by the expected value, and multiply by 100. A $1,000 budget that comes in at $1,150 has a variance of +15%.

What is the difference between sample and population variance?

Sample variance divides by n − 1 and estimates the spread of a larger group. Population variance divides by n and describes the whole group you have.

What is the relationship between variance and standard deviation?

Standard deviation is the square root of variance. A variance of 4 has a standard deviation of 2.

Can variance be negative?

Statistical variance can’t, because the differences are squared. A variance percentage can, since it means the actual figure came in below what was expected.

Why is my variance so much bigger than my numbers?

Variance is in squared units, and squaring makes far values count much more. One unusual value can raise it a lot. Look at the standard deviation, which is back in your original units, and check the list for typing mistakes.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools