Variance Calculator
Sample divides by n−1, and it matters.
Work out Variance. Sample divides by n−1, and it matters. Names the misconception directly.
Sample variance
4.571429
Standard deviation 2.13809 · mean 5
Sample variance divides by n − 1 rather than n. That is Bessel's correction, and it exists because the sample mean is itself estimated from the data, so deviations from it are systematically a little too small. Using n for a sample underestimates the true variance, which is the most common statistical error in a spreadsheet — and the two functions sit next to each other in every spreadsheet menu.
How the Variance Calculator works
Variance and standard deviation for both sample and population, with the standard error and coefficient of variation. Both denominators are shown, because picking the wrong one is the most common statistical error in a spreadsheet.
Also known as: standard deviation calculator · should i divide by n or n minus 1 · sample versus population variance · bessel correction calculator
Bessel's correction, and why n − 1
Sample variance divides by n − 1 rather than n. The reason is that the sample mean is itself estimated from the same data, so deviations measured from it are systematically a little too small.
The sample mean sits, by construction, at the centre of its own sample — closer to the data than the true population mean generally is. Dividing by n − 1 inflates the result just enough to correct that bias.
Using n for a sample underestimates the true variance, and it is the most common statistical error in a spreadsheet — largely because the two functions sit adjacent in every menu with almost identical names.
Why deviations are squared
Squaring stops positive and negative deviations cancelling, which they would do exactly if simply summed. It also penalises large deviations more heavily than small ones, which is frequently the desired behaviour.
Absolute deviations avoid cancellation too and have worse mathematical properties — they are not differentiable at zero, which makes optimisation harder. That is the main reason squaring won.
The decisive property is additivity: variances of independent variables add, while standard deviations do not. That is why variance survives despite its awkward squared units, and why standard deviation is what gets reported.
Standard error and what large samples buy
The standard error of the mean is the standard deviation divided by the square root of n. It measures how precisely the sample mean estimates the population mean, which is a different question from how spread the data is.
That square root is why precision is expensive. Quadrupling the sample halves the error; getting another factor of two costs another quadrupling. Very large samples buy sharply diminishing precision.
The empirical rule — 68, 95 and 99.7 percent within one, two and three standard deviations — applies only to normal distributions. Applying it to skewed data is a common error, and the interquartile range is the better summary there.
Where to go next
The Variance question rarely arrives on its own. These are the ones that usually come with it:
- Mean Median Mode Calculator — The mean is dragged by outliers; the median is not.
- Interquartile Range Calculator — Robust because it ignores how extreme the extremes are.
- Percentile Calculator — There is more than one definition, and they disagree.
- Percentage Calculator — Every common percentage question in one place.
Frequently asked questions
What is the difference between sample and population variance?
Sample variance divides the sum of squared deviations by n − 1; population variance divides by n. Using n for a sample systematically underestimates the true variance.
What is Bessel's correction?
The n − 1 denominator. It exists because the sample mean is itself estimated from the data, so deviations measured from it are systematically a little too small. Dividing by n − 1 corrects the bias.
When should I use population variance?
Only when you genuinely have every member of the population — every employee in a company, every item in a finished batch. If the data is a sample of something larger, use the sample formula.
What is standard deviation?
The square root of variance, which returns it to the original units. Variance is in squared units, which is why standard deviation is the figure usually reported.
What is the standard error of the mean?
The standard deviation divided by the square root of the sample size. It measures how precisely the sample mean estimates the population mean, and it shrinks as the sample grows.
What is the coefficient of variation?
Standard deviation as a percentage of the mean, which makes spread comparable between datasets with different units or very different scales.
Why square the deviations?
To stop positive and negative deviations cancelling, and to penalise large deviations more than small ones. Absolute deviations avoid the cancelling too and have worse mathematical properties.
What is the empirical rule?
For a normal distribution, about 68% of values fall within one standard deviation of the mean, 95% within two and 99.7% within three. It does not hold for skewed data.
What is a z-score?
How many standard deviations a value sits from the mean. It makes values from different distributions comparable, which is why standardised tests report them.
Does standard deviation work for skewed data?
It can be computed and it describes the spread poorly, because it assumes symmetry around the mean. For skewed data the interquartile range is more informative.
What is variance used for?
It adds for independent variables, which standard deviation does not — the variance of a sum is the sum of the variances. That property is why variance survives despite its awkward squared units.
How does sample size affect the standard error?
It falls with the square root of n, so quadrupling the sample halves the error. That square root is why very large samples buy diminishing precision.
Put this calculator on your own site
Free to use, on any site, commercial or not. Paste this where you want it to appear. It is a plain iframe, so it works in WordPress, Squarespace, Wix, Webflow, Ghost and anything else that accepts HTML.
<iframe src="https://www.thecalclibrary.com/embed/variance-calculator" width="100%" height="640" style="border:1px solid #e2e8f0;border-radius:12px" loading="lazy" title="Variance Calculator"></iframe>
<p style="font:13px/1.5 system-ui,sans-serif;margin:6px 0 0;color:#64748b">Powered by <a href="https://www.thecalclibrary.com/variance-calculator" style="color:#64748b">Variance Calculator</a> from The Calc Library</p>The only condition is that the credit line below the frame stays in place. That one line is what pays for the tool being free — it is how anyone else finds it.
Related calculators
Mean Median Mode Calculator
The mean is dragged by outliers; the median is not.
OpenInterquartile Range Calculator
Robust because it ignores how extreme the extremes are.
OpenPercentile Calculator
There is more than one definition, and they disagree.
OpenPercentage Calculator
Every common percentage question in one place.
Open