Compatibility function

VAR function

Estimates the variance of a population from a sample (divides by n − 1). Replaced by VAR.S.

Available in All versions of Excel, including Microsoft 365 and Excel for the web (kept for compatibility)

In every Excel versionWorks in Google Sheets

Older function. VAR still works, but for new workbooks use VAR.S.

Syntax

VAR(number1, [number2], ...)
ArgumentWhat it means
number1RequiredA number, range or array from the sample.
number2, ...OptionalUp to 255 numbers or ranges in total.

Returns: The sample variance.

How VAR works

Variance is the average squared distance from the mean — the square of the standard deviation. It is in squared units (g², €²), which makes it less intuitive than STDEV, but it is the quantity statistics formulas work with: variances of independent things add up, F-tests compare variances, and ANOVA splits total variance into parts.

VAR treats the data as a sample and divides by n − 1. Text and logical values in ranges are ignored (VARA counts them), and you need at least two numbers.

Compatibility note: VAR is one of the older statistical functions that Excel 2010 moved to the Compatibility group. It still works in every version, but for new workbooks Microsoft recommends VAR.S. VAR.S gives identical results. Use VARP / VAR.P if your data is the whole population.

Examples

1Variance of fill weights

D2fx=VAR(B2:B7)
ABCD
1BagWeight (g)
2149811.77
32502
43495
54505
65500
76499

Result: 11.77

The sum of squared deviations from the mean (499.83) is 58.83; divided by n − 1 = 5 that gives 11.77 g² (formatted to 2 decimals). Its square root is the STDEV of 3.43 g.

2Variance of daily orders

D2fx=VAR(B2:B8)
ABCD
1DayOrders
2Mon414.6667
3Tue44
4Wed39
5Thu45
6Fri40
7Sat43
8Sun42

Result: 4.6667

The mean is 42 orders. Squared deviations add up to 28, and 28 / 6 = 4.6667 orders² (formatted to 4 decimals). Because variances of independent days add up, a 14-day total would have a variance of about 14 × 4.67 = 65.3.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 14 KB

Common errors and how to fix them

ErrorWhy it happensFix
#DIV/0!Fewer than two numeric values.Check the range contents.

Tips

  • VAR(range) equals STDEV(range)^2.

Questions

Should I still use VAR?

Only if the workbook must open in Excel 2007 or earlier. Otherwise use VAR.S, which gives the same result and makes the intent clearer to the next person who reads the formula.

Will VAR stop working?

There is no announced removal date. Microsoft keeps compatibility functions so old workbooks keep calculating, but they get no new features.

Google Sheets

VAR also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

VAR in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
CzechVAR.VÝBĚR
DanishVARIANS
GermanVARIANZ
Norwegian (Bokmål)VARIANS
PolishWARIANCJA
RussianДИСП
SwedishVARIANS