FormulaCraft

How to calculate variance between two numbers in Excel and Google Sheets

Excel & Google Sheets
=VAR.S(A2:B2)

Verified example

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

Number1Number2
510
1520
2530

=VAR.S(A2:B2)12.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. 1Enter your two numbers in separate cells, e.g., A2 and B2.
  2. 2In another cell, enter the formula =VAR.S(A2:B2) for Excel or Google Sheets.
  3. 3Press Enter to see the variance calculated.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

What is the difference between VAR.S and VAR.P?

VAR.S calculates sample variance, assuming your data represents a sample of a larger population. VAR.P calculates population variance, assuming your data represents the entire population.

Can I use this formula for more than two numbers?

Yes, you can include more numbers in the range, e.g., A2:A10, to calculate the variance for a larger dataset.

What if my data includes text or errors?

Text and error values will cause the formula to return an error. Ensure your range contains only numerical data.

Formulas used

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

Last reviewed: