Statistics & Probability

Variance Calculator

Paste your numbers to get the sample and population variance side by side.

Your numbers

Separate numbers with commas, spaces or new lines. You can paste a column from a spreadsheet.

Your results

Sample variance (s²)
Sample variance (s²)
—
Population variance (σ²)
—
Mean
—
Sum of squared deviations
—
Sample standard deviation
—
Count
—

Variance Calculator by TheCalcTools

How the Variance Calculator works

Variance is the average squared distance of the values from their mean. Squaring makes every distance positive and gives more weight to values far from the mean.

The sum of squared deviations is divided by n − 1 for the sample variance or by n for the population variance. Its square root is the standard deviation, which is in the same units as the data.

The formula

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

Worked example

Using the default values shown in the calculator:

Your data4, 8, 6, 5, 3, 7
  1. Mean = 33 ÷ 6 = 5.5.
  2. Squared deviations: 0.25, 6.25, 0.25, 0.25, 6.25, 2.25, sum 17.50.
  3. Sample variance = 17.50 ÷ 5 = 3.50; population variance = 17.50 ÷ 6 = 2.9167.

Result:

Sample variance (s²)3.5000
Population variance (σ²)2.9167
Mean5.5000
Sum of squared deviations17.5000
Sample standard deviation1.8708
Count6

Frequently asked questions

Why is variance in squared units?

Because the deviations are squared. If your data are in metres, the variance is in square metres. Take the square root to get the standard deviation in metres.

Can variance be negative?

No. It is a sum of squares divided by a positive number, so it is zero when all values are equal and positive otherwise.

Sources and further reading

More in Statistics & Probability · All calculators

This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.