Skip to main content

How to Calculate Variance

Variance measures how far a set of numbers spreads out from its mean. Here is the method, step by step, with a worked example you can check in the calculator.

Open the variance calculator

Frequently asked questions

What is the formula for variance?

Population variance is σ² = Σ(x − μ)² / N. Sample variance is s² = Σ(x − x̄)² / (n − 1). Both add up the squared distances from the mean; the sample version divides by n − 1 instead of n.

Why do we divide by n − 1 for sample variance?

A sample's own mean sits closer to its data than the true population mean does, so dividing by n underestimates the spread. Dividing by n − 1 (Bessel's correction) removes that bias.

Can variance be negative?

No. Variance is an average of squared values, so it is zero or positive. It is zero only when every value is identical.

How is variance related to standard deviation?

Standard deviation is the square root of variance. It is expressed in the same units as the data, which makes it easier to interpret.