# VAR function in Excel

> VAR returns the variance of a sample: the average squared distance of each value from the mean.

Source: https://spreadsheetpractice.com/functions/var · Updated October 28, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

## Quick answer

- **What it does:** VAR returns the variance of a sample: the average squared distance of each value from the mean.
- **Syntax:** `=VAR(number1, [number2], ...)`
- **Most common use:** `=VAR(B2:B7)` returns 0.14 (Fund A's monthly returns barely vary, in percent squared)
- **Available in:** Every current version
- **Category:** [Statistical functions](https://spreadsheetpractice.com/functions/category/stats)
- **Returns:** The sample variance, or #DIV/0! if there are fewer than two numbers.
- **Google Sheets:** Also available in Google Sheets.

## What it does

VAR returns the variance of a sample: the average squared distance of each value from the mean. It's the square of the standard deviation and is used in finance and statistics formulas, such as portfolio risk. VAR.S is the newer name for the same calculation.

## Syntax

`=VAR(number1, [number2], ...)`

| Argument | Required? | What it is |
|---|---|---|
| `number1` | Required | The first number, cell or range in the sample. |
| `number2` | Optional | More numbers, cells or ranges, up to 255 in total. |

## Examples

Each result was calculated by running the formula on the sample sheet.

| Cell | Formula | Result | What it shows |
|---|---|---|---|
| F2 | `=VAR(B2:B7)` | 0.14 | Fund A's monthly returns barely vary, in percent squared |
| F3 | `=SQRT(VAR(B2:B7))` | 0.37 | The square root is the standard deviation, back in percent |
| F4 | `=VAR(C2:C7)` | 8.09 | Fund B's variance is about 60 times larger |

### The sample sheet

Every formula above runs on this data:

|  | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| 1 | Month | Fund A (%) | Fund B (%) |  | Check | Result |
| 2 | Jan | 1.2 | 3.1 |  | Variance, fund A | 0.14 |
| 3 | Feb | 0.8 | -2.2 |  | Back to std dev | 0.37 |
| 4 | Mar | 1.5 | 4.4 |  | Variance, fund B | 8.09 |
| 5 | Apr | 0.4 | -1.8 |  |  |  |
| 6 | May | 1 | 2.7 |  |  |  |
| 7 | Jun | 0.9 | -0.9 |  |  |  |

## Common mistakes

| What you see | Why, and how to fix it |
|---|---|
| The number seems huge or tiny | Variance is in squared units (dollars squared, percent squared). Take the square root, or use STDEV, for a number in the original units. |
| #DIV/0! | You need at least two numbers to calculate a sample variance. |

## Tips

- Use VAR.P (or VARP in older versions) when the values are the complete population.

## Related functions

- [STDEV](https://spreadsheetpractice.com/functions/stdev): STDEV measures how spread out a set of numbers is, treating them as a sample of a larger group.
- [STDEV.P](https://spreadsheetpractice.com/functions/stdev-p): STDEV.P measures how spread out a set of numbers is when those numbers are the entire population: every employee, every shift, every student in the class.
- [AVERAGE](https://spreadsheetpractice.com/functions/average): AVERAGE adds up the numbers you give it and divides by how many numbers there are.

## Questions

### What is the difference between VAR and STDEV?

STDEV is the square root of VAR. Variance is used inside other formulas; standard deviation is easier to read because it's in the original units.

### Is VAR the same as VAR.S?

Yes. VAR.S is the name used from Excel 2010; both return the sample variance.

## Practice

A graded VAR exercise ("Demand variance by product") is on [the VAR page](https://spreadsheetpractice.com/functions/var). It is checked instantly, then re-checked on changed data.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
