VAR Function

Excel 2007+

Summary

The VAR function calculates the variance of a sample dataset, measuring how spread out the values are from their average. This statistical function assumes your data represents a sample rather than the entire population.

Syntax

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

Parameters

Parameter Type Required Description
number1 Number Yes Required first number or range representing sample data
number2 Number No Optional additional numbers or ranges (2-255 total arguments)

Using the VAR Function

VAR is essential for statistical analysis when working with sample data. Use it to understand data variability in business metrics, test scores, survey results, or any dataset representing a subset of a larger population. Returns #DIV/0! if fewer than two values provided.

Common VAR Examples

Basic Sample Variance

=VAR(A2:A11)

Calculates variance for tool strength measurements (result: 754.2667)

Multiple Value Arguments

=VAR(12,15,18,14,10,8,16,11,9,13)

Variance of directly entered test scores

Comparing Product Performance

=VAR(B2:B10)-VAR(C2:C10)

Difference in variance between two product batches

Frequently Asked Questions

VAR uses n-1 (sample) while VARP uses n (population) in denominator. Use VAR for samples, VARP for complete populations.

No, VAR ignores text, logical values, and empty cells in ranges. Use VARA to include logical values and text representations of numbers.

Microsoft recommends VAR.S for clarity, but VAR remains available for compatibility.

Common Errors and Solutions

#DIV/0!

Cause: Fewer than 2 numeric values provided

Solution: Ensure at least 2 numbers in arguments

#VALUE!

Cause: Non-numeric arguments that can't be converted

Solution: Use only numbers, ranges, or names containing numbers

Wrong results from text

Cause: Text in ranges being ignored unintentionally

Solution: Clean data or use VARA function

Notes

  • VAR assumes sample data (uses n-1 divisor)
  • Replaced by VAR.S but still fully supported
  • Logical values typed directly ARE counted
  • Array formulas: only numbers counted from arrays
  • Use VAR.P for population variance instead

Compatibility

Available in: Excel 2007+, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Excel 365

Not available in:

Content last reviewed: December 11, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+