Spreadsheet Practice

How to calculate variance in Excel

Formula (Excel and Google Sheets)

=VAR.S(B2:B7)

Use =VAR.S(B2:B7) for a sample, or =VAR.P(B2:B7) for a whole population.

Result on the example
86.67 in E1
Works in
Every current version
Google Sheets
Same formula

See it work

The formula is already in E1. Change any input and the result updates, or edit the formula to experiment.

How it works

Variance is the average squared distance from the mean (78.33 here). VAR.S adds the squared differences (433.3) and divides by n − 1 = 5, giving 86.67. It is in squared units, which is why the standard deviation, its square root, is easier to read.

=VAR.S(B2:B7)

Result86.66666667

  1. B2:B76 rows × 1 col: 72, 85, 90, 64, …

    A range: 6 cells in one column.

  2. VAR.S(B2:B7)86.66666667

    VAR: Sample variance (same as VAR.S).

    • number1B2:B76 rows × 1 col: 72, 85, 90, 64, …

In Google Sheets

The same formula works in Google Sheets: =VAR.S(B2:B7). We ran it in Google Sheets mode on the same data and it returns 86.67.

Other ways to do it

Each one was run on the same example sheet.

FormulaResultWhen to use it
=STDEV.S(B2:B7)^286.67Variance is the standard deviation squared.
=VAR.P(B2:B7)72.22Different resultFor a complete population. Divides by n: 72.22.

Common mistakes

  • In budgeting, "variance" means actual minus budget, which is a subtraction, not VAR.S. See the first FAQ.
  • VAR (without .S) is the older name for VAR.S and gives the same result.

Try it yourself

Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.

Calculate variance

In E1, calculate the sample variance of the scores in B2:B7.

Questions

How do I calculate a budget variance?

Subtract: =actual-budget, and divide by the budget for a percentage variance.

How do I get the standard deviation from the variance?

Take the square root: =SQRT(VAR.S(B2:B7)).

Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.