Variance Calculator

The Building Block Behind Standard Deviation

Variance measures dispersion the same way standard deviation does — by averaging squared distances from the mean — but it stops one step earlier, before taking the square root. That makes it less intuitive to read on its own (the units are squared, so "variance in dollars" is actually in dollars squared), but it's the form that appears directly inside most statistical formulas, from ANOVA to regression to portfolio theory.

The Formula

Population: σ² = Σ(x − mean)² ÷ N
Sample: s² = Σ(x − mean)² ÷ (n − 1)

As with standard deviation, the sample version divides by n−1 rather than n. This Bessel's correction compensates for the fact that a sample's own mean is, by construction, closer to its data points than the true population mean would be.

Worked Example

Sample vs. population variance for the same data set
ValuesMeanSample VariancePopulation Variance
2, 4, 4, 4, 5, 5, 7, 954.5714.000

The sample variance is always equal to or larger than the population variance computed from the same numbers, since it divides by a smaller denominator (n−1 instead of n).

Where This Matters

  • Finance — variance of returns underlies portfolio risk models and the calculation of a security's volatility.
  • Analysis of variance (ANOVA) — the entire technique is built from comparing between-group and within-group variance.
  • Regression analysis — R² is defined in terms of how much variance in the outcome variable is explained by the model.
  • Process engineering — minimizing variance in a manufacturing output is often as important as hitting the target average.

How to Use This Calculator

  1. Choose Sample Variance or Population Variance from the dropdown.
  2. Enter your numbers into the values field, separated by commas.
  3. Select Calculate to get the variance and the mean it was measured from.

Related Calculations

Take the square root of this result with the Standard Deviation Calculator, or normalize it for comparison across different scales with the Coefficient of Variation Calculator.