FormulaCraft

How to calculate variance in Excel and Google Sheets

Topic:RANK & statistical aggregates

Heads up: Excel and Google Sheets do this differently.

Excel
=VAR.S(B2:B6)
Google Sheets
=VAR(B2:B6)

Verified example

Computed by a real spreadsheet engine on the sample data below.

TestResult
Trial 140
Trial 255
Trial 350
Trial 460
Trial 545

=VAR.S(B2:B6)62.5

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Select the output cell.
  2. 2In Excel, type =VAR.S(B2:B6) for sample variance.
  3. 3In Google Sheets, type =VAR(B2:B6) — equivalent to sample variance.
  4. 4For population variance: Excel uses =VAR.P(B2:B6); Google Sheets uses =VARP(B2:B6).
  5. 5Press Enter.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

What is the relationship between variance and standard deviation?

Standard deviation is the square root of variance. =SQRT(VAR.S(B2:B6)) equals =STDEV.S(B2:B6).

Which function name should I use in Google Sheets?

Use =VAR(range) for sample variance and =VARP(range) for population variance. Google Sheets does not use the .S/.P naming convention.

More on RANK & statistical aggregates

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: