Variance Calculator
Compute population variance and sample variance from any list of numbers. Enter values separated by commas, spaces, or line breaks — get mean, standard deviation, and a full step-by-step breakdown instantly.
Calculating...
Enter your values above and click Calculate to see variance results.
How Variance Is Calculated
The only difference between population and sample variance is the denominator: N vs N-1.
What Is Variance?
Variance measures how spread out a set of numbers is from their mean. A variance of zero means every value is identical. A large variance means values are widely scattered. It is the squared average of each value's distance from the mean — squaring ensures negative and positive deviations do not cancel each other out.
Variance is the foundation of standard deviation: take the square root of variance and you get standard deviation, which is expressed in the same units as your data. The variance calculator above computes both simultaneously.
In statistics, variance appears in linear regression, ANOVA, machine learning feature scaling, financial risk modelling, and quality control. Understanding whether to use population or sample variance is crucial — the wrong formula inflates or deflates your measure of spread.
Population Variance vs Sample Variance
The two formulas look almost identical but differ in one critical place: the denominator.
| Property | Population (σ²) | Sample (s²) |
|---|---|---|
| Denominator | N | N - 1 |
| Use when | You have every member of the group | You have a subset of a larger group |
| Example | All 28 students in your class | 500 survey respondents from a city |
| Bias | Unbiased for the population | Corrects for underestimation bias |
| Symbol | σ² (sigma squared) | s² |
The reason sample variance uses N-1 is called Bessel's correction. When you use a sample to estimate a population's variance, the sample values tend to cluster closer to the sample mean than to the true population mean. Dividing by N-1 inflates the result slightly, compensating for that natural bias and producing an unbiased estimate of the population variance.
Variance Reference Table
Verify your calculations with these worked examples.
| Dataset | N | Mean | Pop Var (σ²) | Sample Var (s²) |
|---|---|---|---|---|
| 2, 4, 4, 4, 5, 5, 7, 9 | 8 | 5 | 4 | 4.5714 |
| 1, 2, 3, 4, 5 | 5 | 3 | 2 | 2.5 |
| 85, 90, 92, 88, 95 | 5 | 90 | 11.6 | 14.5 |
| 10, 40, 70, 100, 130 | 5 | 70 | 1800 | 2250 |
| 9.8, 10.0, 10.1, 9.9, 10.2 | 5 | 10 | 0.02 | 0.025 |
Frequently Asked Questions
What is the variance formula?
Population variance is σ² = ∑(xᵢ - μ)² / N. You subtract the mean from each value, square the result, sum all squared deviations, then divide by the number of values N. Sample variance is identical except the denominator is N-1. Both are computed simultaneously by this calculator.
When should I use sample variance instead of population variance?
Use sample variance (s²) whenever your dataset is a subset of a larger group and you want to infer something about that larger group. Use population variance (σ²) when your data is the complete group. For most real-world surveys, experiments, and datasets you collect from the internet, sample variance is the right choice.
Why is variance always non-negative?
Each deviation (xᵢ - μ) is squared before summing, so every term is either zero or positive. Squaring also gives more weight to large deviations than small ones, which is why variance is sensitive to outliers. Variance is zero only if every value is exactly equal to the mean.
What is the relationship between variance and standard deviation?
Standard deviation is simply the square root of variance. Population standard deviation σ = √σ² and sample standard deviation s = √s². Standard deviation is usually preferred for interpreting results because it is in the same units as the original data (e.g. metres, kilograms, dollars), while variance is in squared units.
What is Bessel's correction and why does it matter?
Bessel's correction is the use of N-1 instead of N in the sample variance formula. When you estimate a population's variance from a sample, the sample deviations are measured from the sample mean, not the true population mean. This causes a systematic underestimation of the true variance. Dividing by N-1 inflates the estimate just enough to remove that bias, producing what statisticians call an unbiased estimator.
How do outliers affect variance?
Outliers disproportionately inflate variance because deviations are squared. A single value far from the mean contributes a very large squared deviation. For example, adding the value 100 to the dataset 1, 2, 3, 4, 5 would increase the mean slightly but cause the variance to jump dramatically. This sensitivity to outliers is both a strength (it flags unusual data) and a weakness (it can mislead if the outlier is an error).
Related Calculators
Standard Deviation Calculator
Sample and population std dev, mean, and median
Percent Error Calculator
Compare experimental vs theoretical values
Correlation Coefficient Calculator
Pearson r, r-squared, and covariance
Binomial Probability Calculator
P(X=k), P(X≤k), expected value and variance
Percentage Calculator
Percentage of a number, increase, decrease, and change
Tip Calculator
Split a restaurant bill and calculate tip per person