Function · Spread and distribution

Excel VAR.S function

The Excel VAR.S function returns the sample variance. For the four utility bills it is 620.110625, the square of the sample standard deviation 24.9020205.

Excel 2010 and later, including Microsoft 365 and Excel for the web. The older name VAR still calculates. Also in Google Sheets.

Syntax =VAR.S(number1, [number2], ...)

VAR.S
=VAR.S(B2:B5)

Arguments

NameRequiredWhat to pass
number1RequiredThe first number or range, treated as a sample.
number2OptionalMore numbers or ranges. Text and blanks are ignored. At least two numbers are required.

Examples

Sample variance of the four bills

=VAR.S(B2:B5)

Result 620.110625

=VAR.S(B2:B5)B6
Utilities
AB
1MonthBill
2Jan143.60
3Feb96.20
4Mar118.45
5Apr88.10
6Sample variance620.110625
A picture of the sheet, not a live calculator. Units are dollars squared, not dollars. The standard deviation is the square root.

VAR.S is the sample variance, the average squared distance from the mean with a divisor of n−1. For the four bills the squared distances add up to 1,860.331875, which is SUMSQ of 32.0125, −15.3875, 6.8625, and −23.4875, and the division by 3 produces 620.110625. The square root is 24.9020205, and STDEV.S returns that root so you do not have to.

The number is in dollars squared. It is not a typical gap between a bill and the average. Quote the standard deviation when the reader expects dollars. Use the variance when a later formula wants the squared form. VAR.P divides by 4 instead and returns 465.08296875 for this list. The older name VAR is the sample variance, same as VAR.S.