The Excel VAR function estimates the variance of a population from a sample (dividing by n−1). It is a legacy name — Microsoft now recommends VAR.S, which is identical.
Syntax
| Argument | Description | |
|---|---|---|
number1 | Required | The first value or range of the sample. |
number2, ... | Optional | Up to 254 more values or ranges. Text and logical values in references are ignored. |
How to use it
VAR treats your data as a sample of a larger population, dividing by n−1. It is the square of the sample standard deviation (STDEV).
If your data is the whole population, use VARP (divide by n) instead, which gives a slightly smaller value.
Use the modern name: =VAR.S(...) is the supported replacement and returns the same value. The .S marks it as the “sample” variance (vs. VAR.P for a population).
Try it: interactive demo
Pick a VAR example to see the formula and its result.
Practice workbook
Frequently asked questions
Is VAR the same as VAR.S?
VAR.S (Excel 2010+) is the sample variance (divides by n−1) and returns identical results. VAR is kept for backward compatibility.What is the difference between VAR and VARP?
How does VAR relate to STDEV?
VAR = STDEV^2. Both use the n−1 sample correction.Should I switch to VAR.S?
Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class