Skip to content
Math & Statisticsstatistics

Variance Calculator

Variance and standard deviation on both conventions. Dividing by n-1 rather than n is Bessel correction, and on small samples the two answers differ substantially.

Also called: standard deviation calculator, sample variance.

Separate values with commas or spaces.

Treat the data as
Variance
182

Variance 182 and standard deviation 13.49, treating the data as a sample. On the other convention it would be 151.67, a difference of 20%.

Standard deviation
13.49
On the other convention
151.67
Mean
18
How many values
6
Difference between the conventions
20%
Basis used
a sample
Method and background

How this is calculated

Variance is the average squared distance from the mean. The divisor is the whole question: a sample uses n-1 because the sample mean is itself estimated from the data, which uses up a degree of freedom and would otherwise bias the estimate downwards. A population uses n because the mean is known rather than estimated. On five values the two differ by twenty-five percent, which is why both are shown.

sample variance divides by n-1; population variance divides by n
x
Each value
n
How many values

Worked examples

Each of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.

six values as a sample

Values
4, 8, 15, 16, 23, 42
Treat the data as
A sample

Variance182

Sum of squares 910 over 5, computed independently

Open this example

the population divisor gives a smaller figure

Values
4, 8, 15, 16, 23, 42
Treat the data as
The whole population

Variance151.67

boundary: 910 over 6, the same data on the other convention

Open this example

Method and limits

What it assumes

  • Numeric values, with non-numeric entries ignored.

What it deliberately does not model

  • Variance is in squared units, which is why standard deviation is usually reported instead.

Formula version 1.0.0 · definition 1.0.0 · United States · Report a problem with this calculator

Frequently asked questions

Why divide by n-1?
Because the mean was estimated from the same data. Using it uses up one degree of freedom, and dividing by n would systematically underestimate the spread. That correction is named after Bessel.
Which should I use?
Sample, almost always. You use the population divisor only when your data genuinely is every member of the group rather than a draw from it.