VAR.S Function

Excel 2010+

Summary

The VAR.S function calculates the sample variance of a dataset, measuring the spread of values around the mean. It treats the data as a sample from a larger population and ignores text, logical values, and empty cells.

Syntax

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

Parameters

Parameter Type Required Description
number1 Number Yes Required first number argument for the sample population
number2, ... Number No Optional additional number arguments (2-254) for the sample

Using the VAR.S Function

VAR.S is used when analyzing sample data to estimate population variance. Perfect for quality control, research sampling, and statistical analysis where your dataset represents only part of the total population.

Common VAR.S Examples

Sample Variance from Range

=VAR.S(A2:A11)

Calculates sample variance for tool breaking strength data in A2:A11. Returns 754.27, treating the data as a sample from a larger population.

Direct Value Calculation

=VAR.S(1345,1301,1368,1322,1310)

Calculates variance directly from individual measurements without using cell references.

Compare Sample vs Population

=VAR.S(A2:A11)&" (sample)"&CHAR(10)&VAR.P(A2:A11)&" (population)"

Shows difference: VAR.S returns higher value (754.27) than VAR.P (678.84) due to n-1 vs n denominator.

Frequently Asked Questions

VAR.S uses n-1 (sample divisor) for unbiased population estimate. VAR.P uses n (population divisor). Use VAR.S for sample data.

No. VAR.S ignores text, logical values, and empty cells in ranges. Only numbers are used in calculation.

VAR.S divides by n-1 (sample), VAR.P by n (population). Sample variance is always larger or equal.

Common Errors and Solutions

#DIV/0!

Cause: Sample contains fewer than 2 values

Solution: Provide at least 2 numeric values for variance calculation

#VALUE!

Cause: Arguments contain text that can't convert to numbers

Solution: Ensure all arguments are numbers or numeric ranges

Notes

  • Uses formula: σ² = Σ(xi - x̄)²/(n-1) where x̄ is sample mean
  • Available in Excel 2010 and later versions
  • Ignores empty cells, text, and logical values in ranges
  • Directly typed logical values ARE counted (unlike range references)
  • Maximum 254 arguments total

Compatibility

Available in: Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Microsoft 365

Not available in: Excel 2007 and earlier

Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2010+