Variance answers a simple question — how spread out is your data? — but the exact formula depends on whether you're looking at an entire population or just a sample of it. This calculator computes both, walks through every step, and explains why the two answers are never quite the same.

How variance is calculated

Variance starts with the mean, then measures how far every value sits from it. Simply averaging those distances would cancel out — a value 3 below the mean and a value 3 above it sum to zero — so variance squares each deviation first. That also has the effect of weighting large deviations more heavily than small ones, which is why a single outlier can pull variance up sharply. The squared deviations are summed into the sum of squares (SS), and that sum is divided by either N (population) or n − 1 (sample) to get the final variance. Standard deviation, the square root of variance, converts the answer back into the same units as the original data, which is why it's usually the number quoted alongside a mean.

Why sample variance divides by n − 1

When you only have a sample, you don't know the true population mean — you're using the sample's own mean as a stand-in. But a sample's mean is, on average, slightly closer to its own data points than the true population mean would be, which makes the sum of squared deviations a little too small. Dividing by n − 1 instead of n (a correction named after the statistician Friedrich Bessel) inflates the result just enough to offset that bias, so the sample variance is an unbiased estimate of the true population variance. The difference matters most with small samples — with just a handful of data points, dividing by n − 1 instead of n changes the answer noticeably; with hundreds of points, the difference becomes negligible.

When to use variance vs standard deviation

Variance is the mathematically fundamental quantity — it's what most statistical formulas (confidence intervals, hypothesis tests, ANOVA) are built from directly — but its squared units make it hard to interpret intuitively. If your data is in dollars, variance is in dollars squared, which isn't a meaningful real-world unit. Standard deviation solves that by taking the square root, putting the spread back into the original units. In practice, most people report standard deviation for readability and use variance internally for further calculations.