VAR Function
Sample variance (n-1) of a set of numbers.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| number1 | The first number, range, or reference in the sample. | Required |
| number2 | Additional numbers, ranges, or references (optional, up to 255 total arguments). | Optional |
Basic Example
Sample variance of five values
=VAR(10,20,30,40,50)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 scoresCompute the variance of scores in A2:A11
=VAR(A2:A11)Example 2: Sample vs population
Comparing denominatorsSame data, two different denominators
=VAR(10,20,30,40,50) and =VARP(10,20,30,40,50)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.
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
VAR
varPractice 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.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps