Advertisement

Variance Calculator

Calculate the sample or population variance of a data set, with the standard deviation, mean, sum of squares and a table of squared deviations.

Separate numbers with commas, spaces or new lines. Use a dot for decimals.
Your data is

Variance is the average squared distance of the values from their mean — the basic measure of spread that the standard deviation is built on. This calculator gives the sample variance (divide by n − 1) or the population variance (divide by n), along with the standard deviation, the mean, the sum of squares and a table of every squared deviation.

How to use this tool

  1. Enter your values separated by commas, spaces or new lines.
  2. Choose “sample” if the data is a subset of a larger group, or “whole population” if it covers every member.
  3. Read the variance and standard deviation for your choice; both variances are listed underneath for comparison.
  4. Check the table to see which values contribute most to the spread.

Formula

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

xᵢ are the values, x̄ (or μ) is their mean and n is the count. The shortcut SS = Σxᵢ² − (Σxᵢ)² ÷ n gives the same sum of squares, but subtracting the mean first, as this tool does, avoids rounding trouble with large numbers. The standard deviation is the square root of the variance.

Example

For the six values 4, 8, 6, 5, 3, 7 the mean is 33 ÷ 6 = 5.5. The squared deviations are 2.25, 6.25, 0.25, 0.25, 6.25 and 2.25, which add to 17.5. The sample variance is 17.5 ÷ 5 = 3.5 (standard deviation 1.870829) and the population variance is 17.5 ÷ 6 ≈ 2.916667 (standard deviation 1.707825).

Frequently asked questions

Why is variance in squared units?

Each deviation is squared before averaging, so data in centimetres gives a variance in square centimetres. Take the square root — the standard deviation — to get back to the original unit.

Which variance does Excel use?

VAR.S (and the older VAR) divide by n − 1, the sample variance. VAR.P divides by n, the population variance.

Can variance be negative?

No. It is an average of squares, so the smallest possible value is 0, which happens only when every value is the same.

Should I use sample or population variance?

If you will use the result to describe or estimate a larger group, use the sample variance. Use the population variance only when your list contains every member of the group.

Last updated: 2026-10-30

Advertisement