Sample Variance Calculator
Sample and population variance and standard deviation from a list of numbers, step by step.
Variance measures spread as the average squared distance from the mean, and the one decision that changes the answer is the divisor. Divide the sum of squared deviations by n and you have described the list in front of you (population variance). Divide by n − 1 — Bessel’s correction — and you have an unbiased estimate of the variance of the larger population the list was sampled from (sample variance), compensating for the fact that a sample’s own mean sits closer to its values than the true mean does. The difference is not pedantry: for the list 2, 4, 6 the sum of squared deviations is 8, so the sample variance is 8 ÷ 2 = 4 while the population variance is 8 ÷ 3 ≈ 2.667.
Which one do you need? Sample variance (÷ n − 1) when your numbers are a sample and you want to estimate the spread of the larger group they came from — that is the default in most statistics work. Population variance (÷ n) when your numbers are the entire group and nothing is being estimated. When in doubt, the sample figure is the safer report: it is slightly larger and does not pretend you measured everything.
Quick answers
How do you calculate sample variance?
Find the mean, subtract it from each value, square the differences, add them up and divide by n − 1. For 2, 4, 6: mean 4, squared deviations 4 + 0 + 4 = 8, sample variance 8 ÷ 2 = 4.
Divide by n instead and you get the population variance (8 ÷ 3 ≈ 2.667), which describes only the list itself rather than estimating a larger population.
When should I use population variance instead?
Only when your numbers are the entire group you care about — every student in this class, every day of this year — and nothing is being inferred beyond them.
If the list is a sample standing in for something larger, the n − 1 version is the honest estimate, and it is always the larger of the two figures.
How to use
- Paste your numbers into the box, separated by commas, spaces or new lines — a column copied from a spreadsheet works as-is.
- Confirm there are at least two values; a single value has no spread and the page will say so instead of inventing a result.
- Read the headline sample variance s² and its square root, the sample standard deviation.
- Use the population figures instead only if your list is the complete group, not a sample from it.
About this tool
Two working notes. First, variance lives in squared units (cm², dollars²), which is why its square root, the standard deviation, is the figure usually reported in the original units. Second, variance is outlier-hungry: because deviations are squared, one wild value can dominate the whole sum, and with very small samples the estimate itself is noisy — a variance from three numbers is a rough sketch, not a measurement. This page shows its working (mean, sum of squared deviations, n) so you can audit the arithmetic; interpreting what a variance means for any particular study or decision remains your call.
Frequently asked questions
Why does sample variance divide by n − 1 instead of n?
Because the deviations are measured from the sample mean, which was itself estimated from the same data and sits closer to the values than the population mean would. Dividing by n would therefore underestimate the population variance on average; dividing by n − 1 (Bessel’s correction) removes that bias.
What is the variance of 2, 4, 6?
Sample variance 4 (standard deviation 2); population variance 8/3 ≈ 2.667 (standard deviation ≈ 1.633). The mean is 4, the squared deviations are 4, 0 and 4, summing to 8 — divide by 2 for the sample figure or by 3 for the population figure.
Can variance be negative?
No. It is an average of squares, and a square is never negative, so variance is zero (all values identical) or positive. A negative variance in anyone’s output means an arithmetic error, full stop.
What is the difference between variance and standard deviation?
Standard deviation is the square root of variance. Variance is convenient for algebra; standard deviation is in the same units as your data, so it is the one to quote in a sentence like “results typically vary by about 2 points”. This page reports both, for both divisors.
First time embedding? Read the step-by-step guide →
More free tools
Percentage Calculator
Work out percentages, increases and discounts in one click.
Age Calculator
Find your exact age in years, months and days.
BMI Calculator
Check your Body Mass Index in seconds.
Tip Calculator
Split the bill and work out the tip in seconds.
Discount Calculator
See the sale price and how much you save, instantly.
Scientific Calculator
Full scientific calculator: trig, logs, powers, factorial. Free, private, runs in your browser.