How standard deviation and variance are calculated
Both formulas start the same way: find the mean, then measure how far each value strays from it. Population variance divides that total spread by n; sample variance divides by n−1 instead, a correction that keeps a sample's variance from systematically underestimating the true population variance.
- xᵢ — each entered value
- n — count of values entered
- mean — the arithmetic average of all xᵢ
More detail
Why sample variance divides by n − 1
A sample's mean is itself estimated from the same data, which pulls the data slightly closer to that mean than it is to the true population mean — so dividing by n would understate the real spread. Dividing by n − 1 instead (Bessel's correction) counteracts that bias, which is why it only matters when you're inferring a population's variance from a sample rather than measuring a complete population directly.
Which mode to pick. Use "Sample" whenever your numbers are a subset of a larger population you're trying to describe (test scores from some students, not all; a handful of measurements). Use "Population" only when your list is the complete, entire set — nothing left out.
Frequently asked questions
What's the standard deviation of 2, 4, 4, 4, 5, 5, 7, 9?
The mean is 5, and the sum of squared deviations is 32. Population standard deviation (÷8) is exactly 2; sample standard deviation (÷7) is √(32/7) ≈ 2.1381. Both are shown together above with these exact default values.
Why are sample and population standard deviation different numbers?
Sample standard deviation divides the squared deviations by n − 1 instead of n (Bessel's correction), which always produces an equal or larger value — for the default 8-value dataset, sample std. dev. ≈ 2.1381 versus population std. dev. = 2 exactly.
What happens with only 1 number entered?
Population standard deviation is 0 (a single point has no spread from itself), but sample standard deviation shows "—" — Bessel's correction divides by n − 1, which is 0 and undefined when n = 1.
Should I use variance or standard deviation?
They measure the same spread; standard deviation is just variance's square root, so it's back in the original units (e.g. cm rather than cm²) and easier to compare directly against the mean. This calculator shows both.