Quick Answer

VAR Function

Sample variance (n-1) of a set of numbers.

✓ Excel✓ Google SheetsExcel All versions

Syntax

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

Parameters

ParameterDescriptionRequired
number1The first number, range, or reference in the sample.Required
number2Additional numbers, ranges, or references (optional, up to 255 total arguments).Optional

Basic Example

Sample variance of five values

=VAR(10,20,30,40,50)
Result250

The mean is 30; the sum of squared deviations is 1000, divided by 5-1 gives a sample variance of 250.

Advanced Examples

Example 1: Sample from a range

Variability of test scores

Compute the variance of scores in A2:A11

=VAR(A2:A11)
Result: Sample variance of the 10 values
Uses the 10 sampled values with n-1 (9) in the denominator.

Example 2: Sample vs population

Comparing denominators

Same data, two different denominators

=VAR(10,20,30,40,50) and =VARP(10,20,30,40,50)
Result: 250 and 200
VAR divides by 4 (n-1) while VARP divides by 5 (n), so the population version is smaller. VAR is the square of STDEV for the same data.

How VAR Works

VAR computes the sample variance as the sum of squared deviations from the mean divided by (n-1). The n-1 divisor (Bessel's correction) yields an unbiased estimate of the population variance from a sample. Text and logical values in references are ignored, and VAR equals STDEV squared.

1
Select sample
Gather the numeric sample values in cells or as arguments.
2
Enter formula
Type =VAR(range or values).
3
Press Enter
The sample variance is displayed.

Important Notes & Limitations

  • Assumes the data is a sample, not the entire population; use VARP for a whole population.

  • Ignores text and logical values inside ranged references, reducing the effective count.

  • Requires at least two numeric values, otherwise returns #DIV/0!.

Common Errors & Fixes

#DIV/0!Fewer than two numeric values were supplied.

Fix: Provide at least two data points.

Result smaller than expectedThe data is the full population but n-1 was used.

Fix: Use VARP (or VAR.P) for an entire population.

Download Practice File

Practice VAR with Real Data

Download a sample CSV file with pre-populated data and practice exercises for the VAR function. Works in both Excel and Google Sheets.

Works in Google SheetsCompatible with ExcelIncludes exercises

File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps

Frequently Asked Questions

What is the difference between VAR and VARP?
VAR divides by n-1 (sample), VARP divides by n (population).
Is VAR the same as VAR.S?
Functionally yes; VAR.S is the modern replacement for the legacy VAR function.
How is VAR related to STDEV?
VAR is the square of STDEV for the same data set.