What Is Variance?
Two classes get the same average. One has scores packed between 78 and 82. The other runs from the low 40s into the 90s. Variance is the statistic that tells those two classes apart — the mean does not. The same property is what makes variance, not standard deviation, the anchor for the math in ANOVA, regression, and anywhere else error has to decompose into additive pieces. Adding standard deviations the way you add variances would return nonsense.
Drop your numbers into the input. Any separator works. You get sample and population variance alongside the intermediate sum-of-squares. Square-root either for the standard deviation.
The Formulas
Population Variance (σ²)
σ² = Σ(xᵢ − μ)² / N
Use when your dataset includes every value in the group — the entire class, every item shipped from a warehouse on a given day, all the games a single player has played.
Sample Variance (s²)
s² = Σ(xᵢ − x̄)² / (n − 1)
Use when your data is a subset of a larger group. Bessel's correction — dividing by (n−1) instead of n — removes the bias that otherwise pulls the estimate too low.
How to Calculate Variance by Hand
- Calculate the mean of the dataset (sum of values divided by the count).
- Subtract the mean from each value to find the deviation from the mean.
- Square each deviation. Squaring is what makes variance variance — it removes negative signs and amplifies the influence of values far from the center.
- Sum the squared deviations. This intermediate is called the sum of squares (SS).
- Divide SS by N for population variance, or by (n−1) for sample variance.
The "Show step-by-step solution" button on the calculator above walks through each line of arithmetic with your numbers — useful for double-checking homework or building intuition for what a sum of squares actually represents.
Sample vs Population: Bessel's Correction
Every intro stats class walks you through the (n−1) denominator without really saying why it's (n−1) and not n. Honest answer: the sample mean always sits in the thick of the data you actually measured. The true population mean rarely does.
There is a shortcut here. Default to sample variance. Picking it when the data actually covered the whole population costs you a tiny amount of conservatism. Picking population variance on real sample data breaks confidence intervals downstream.
The practical rule is simple: if you are calculating variance to describe a complete group, use N. If you are using the calculation to infer something about a larger group from a subset, use (n−1). Most homework problems and almost all research data calls for the sample formula.
Variance vs Standard Deviation
Variance and standard deviation describe the same property of a dataset, just on different scales. Standard deviation is the square root of variance, which means it stays in the original units — if your data is in centimeters, the SD is in centimeters and the variance is in cm². The squared units make variance awkward to interpret directly but indispensable for the math behind ANOVA, regression error decomposition, and any model that adds variances together (you cannot add standard deviations the same way).
Use variance when you are doing the math. Use standard deviation when you are reporting the result — squared units rarely match anyone's intuitive sense of spread, and reports for non-specialist audiences read more clearly when the number shares units with the underlying data.
Common Mistakes
- Forgetting to square the deviations: A common slip is to sum the raw deviations from the mean, which always equals zero by construction. The squaring is the whole point — it converts every deviation into a positive contribution that grows quadratically with distance from the center.
- Using N when you needed (n−1): This understates the variance, narrows confidence intervals downstream, and makes statistical tests reject the null too often. The smaller the sample, the worse the bias.
- Reporting variance in squared units as if they were original units: Heights with a variance of 36 cm² are not "36 cm of variance." If you want a number in the same units as the data, report the standard deviation (6 cm in this case).
- Computing variance on already-aggregated data: If your dataset shows means or totals from groups, the variance you compute from those summaries is not the variance of the underlying observations. Pooled variance formulas exist for exactly this situation.
Frequently Asked Questions
What is variance?
Variance is the average squared distance between each data point and the mean. Squaring the deviations is what gives variance its character — it turns every gap into a positive contribution and weights large gaps more heavily, which is exactly the property that makes ANOVA, regression, and the rest of inferential statistics work.
Sample variance vs population variance — which one do I use?
Population variance (σ²) divides by N and applies when you have every value in the group. Sample variance (s²) divides by (n−1) instead — Bessel's correction — and applies when you are estimating from a subset. The default in research and in most homework is sample variance unless the problem explicitly says you have the whole population.
When should I use variance instead of standard deviation?
Variance is the right tool when the math itself depends on additivity — ANOVA partitions total variance into between-group and within-group pieces that have to add up cleanly, and standard deviations cannot do that. For everything else, including any number you are putting in front of a non-specialist reader, standard deviation is easier to interpret because it shares units with the data.
Can variance ever be negative?
No. Variance is an average of squared numbers, so the smallest value it can take is zero, which happens only when every data point equals the mean. A negative variance always means a calculation error — most often a sign mistake during the squaring step or a programming bug that summed the deviations before squaring them.
How do I calculate variance in Excel?
Excel uses =VAR.S() for sample variance and =VAR.P() for population variance — for instance, =VAR.S(A1:A10) gives the sample variance of cells A1 through A10. The legacy =VAR() defaults to sample variance, which catches people off guard when they expected the population formula from such a generic name.
What does a high variance mean?
High variance means the data points spread out far from the mean — and how high is "high" depends entirely on the scale of measurement. A variance of 100 is huge for body temperatures (the SD would be 10 degrees) but negligible for annual incomes. The coefficient of variation, which divides standard deviation by the mean, is the comparable metric across different scales.