The Excel VAR function returns the sample variance of a supplied set of values.
Syntax: VAR( number1, [number2], … )
Where the number arguments provide a minimum of 2 numerical values to the function. Each number argument can be a single value or an array of values. You can enter up to 254 number arguments to the Var function in Excel 2007 and later versions of Excel, but you can only enter up to 30 number arguments in Excel 2003. Note that the Var function calculates the sample variance – i.e. the variance for a sample of a population. If you are calculating the variance for an entire population, you need to use the Excel Varp or the Excel Var.P function.
Note also, that the Var function ignores text values and logical values if these are supplied as part of an array. However, if they are supplied directly to the function, text representations of numbers and logical values are interpreted as numbers. If you want a sample variance calculation that does not ignore text and logical values that are supplied as a part of an array, consider using the Vara function.
Var Function Example
As shown in cell H3, the variance of the individual heights of the sample group is 9.261904762 cm.
Other Argument Types
The example above shows the arguments to the Var function being input in the form of 3 cell ranges. However, you can also input figures directly, as individual numbers or number arrays.
For example, if you wanted to include two further heights, of 176cm and 177cm into the sample we could add these directly into the above function as follows:
Var Function Error
If you get an error from the Excel Var Function, this is likely to be the #DIV/0! error:
|#DIV/0!||–||Occurs if fewer than 2 numerical values have been supplied to the function|