How to use the Sample Variance Calculator
Paste your numbers separated by commas, spaces or new lines. The result is the sample variance, which divides by n − 1.
Worked example
For 2, 4, 4, 4, 5, 5, 7 and 9, the mean is 5. The squared distances from 5 add up to 32. Dividing by n − 1 = 7 gives a sample variance of about 4.57. The standard deviation is its square root, about 2.14, which is back in the original units.
Why n − 1?
A sample tends to sit a little closer to its own mean than to the true population mean, so dividing by n would underestimate the spread. Dividing by n − 1, known as Bessel’s correction, fixes that bias. With large samples the difference between the two formulas becomes tiny.
The formula
s² = Σ(x − x̄)² ÷ (n − 1)
Examples
- 2, 4, 6, 8, 10
Sample variance: 10
- 4, 8, 6, 5, 3, 7
Sample variance: 3.5
- 120, 135, 128, 141, 119
Sample variance: 90.3
Limitations and assumptions
Uses the sample formula. If your numbers are the whole population rather than a sample of it, divide by n instead.
Frequently asked questions
What is variance?
The mean of the squared differences from the mean, a measure of spread.
Sample or population variance?
Use sample variance for a subset of data (divide by n − 1) and population variance for all of it (divide by n).
Why are units squared?
Because the differences are squared, so take the square root to return to the original units.
How do I get the standard deviation?
Take the square root of the variance.