Variance Calculator

Get sample and population variance from raw data, plus the sum of squares and a deviation table you can copy straight into your homework.

Separate numbers with commas, spaces or line breaks. You can paste a column from Excel or Sheets. 8 values read.

Try:
Sample variance, s²
27.428571
Population variance, σ²24
Sum of squares, SS192
Mean18
n8
Standard deviation (s, σ)5.237229, 4.898979

Working

  1. Mean: x̄ = 144 ÷ 8 = 18
  2. Sum of squared deviations: SS = Σ(x − x̄)² = 192. Check with the shortcut: Σx² − (Σx)²/n = 2,784 − 2,592 = 192
  3. Sample variance: s² = 192 ÷ 7 = 27.428571
  4. Population variance: σ² = 192 ÷ 8 = 24
xx − x̄(x − x̄)²x²
10−864100
12−636144
23525529
23525529
16−24256
23525529
2139441
16−24256
14401922,784

Explain my result

An AI tutor reads your numbers and explains what they mean in plain words. Sends only the inputs and results shown above.

Why n − 1? Watch the bias shrink

Dividing by n systematically underestimates the population variance, because the sample mean is fitted to the very points you measure from. The expected value of the “divide by n” estimate is (n − 1)/n × σ². Slide n to see how large that shortfall is.

With 2 values you lose half the variance; with 30 values the gap is about 3%. Bessel’s correction multiplies back by n/(n − 1), so the average estimate hits σ² exactly.

Missing: 20% of the true variance. Correction factor n/(n − 1) = 1.25

Variance formulas

s² = Σ(x − x̄)² ÷ (n − 1)    σ² = Σ(x − μ)² ÷ N

The numerator, Σ(x − x̄)², is the sum of squares (SS). It turns up again in ANOVA and regression, where total variation is split into explained and unexplained parts, so it is worth being comfortable with it.

Worked example

For 10, 12, 23, 23, 16, 23, 21, 16 the mean is 144 ÷ 8 = 18. The squared deviations are 64, 36, 25, 25, 4, 25, 9 and 4, adding to 192. Sample variance is 192 ÷ 7 ≈ 27.43; population variance is 192 ÷ 8 = 24. Take square roots for the standard deviation: 5.237 and 4.899.

Why square the deviations?

Raw deviations always add to zero, so their average says nothing. You could use absolute values instead, which gives the mean absolute deviation. Squares win in most of statistics because they have convenient algebra: variances of independent variables add, which is the root of the standard error formula and the whole of least-squares regression.

Frequently asked questions

What is the difference between variance and standard deviation?

Variance is the average squared distance from the mean, so its units are squared (cm², dollars²). Standard deviation is the square root of the variance, which puts it back in the original units and makes it easier to interpret. They carry the same information.

When do I use sample variance (n − 1) versus population variance (n)?

Use sample variance, dividing by n − 1, when your data are a sample from a larger population. Use population variance, dividing by N, only when you have every member of the population. Most statistics coursework and all inference methods use the sample version.

What is the shortcut (computational) formula for variance?

Σ(x − x̄)² equals Σx² − (Σx)²/n, so s² = (Σx² − (Σx)²/n) ÷ (n − 1). It saves subtraction by hand but can lose precision on a computer when values are large and close together, which is why this calculator uses the deviation form.

Can variance be larger than the mean?

Yes. Variance and mean measure different things and have different units, so either can be larger. Count data with variance much bigger than the mean are called overdispersed.

How do I calculate variance in Excel?

Use =VAR.S(range) for sample variance and =VAR.P(range) for population variance.