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.

Population Variance Sample Variance Standard Deviation Up to 500 values
Share this tool

Enter Your Values

Separate numbers with commas, spaces, or new lines. Up to 500 values.

Formula Reference

Population

σ² = ∑(xᵢ - μ)² / N

Sample (Bessel)

s² = ∑(xᵢ - x̄)² / (N-1)

Use population variance when you have the entire dataset. Use sample variance when working with a subset.

Quick Load:

Calculating...

Enter your values above and click Calculate to see variance results.

How Variance Is Calculated

POPULATION VARIANCE Sum(xi - mu)^2/ N= sigma^2 (Pop)e.g. [2,4,4,4,5,5,7,9]: mean=5, sum-sq=32 32 / 8 = 4.0 (pop var) SAMPLE VARIANCE (BESSEL'S CORRECTION) Sum(xi - x-bar)^2/ N-1= s^2 (Sample)same data: 32 / (8-1) = 32/7 = 4.5714 (sample var)

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.

PropertyPopulation (σ²)Sample (s²)
DenominatorNN - 1
Use whenYou have every member of the groupYou have a subset of a larger group
ExampleAll 28 students in your class500 survey respondents from a city
BiasUnbiased for the populationCorrects 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.

DatasetNMeanPop Var (σ²)Sample Var (s²)
2, 4, 4, 4, 5, 5, 7, 98544.5714
1, 2, 3, 4, 55322.5
85, 90, 92, 88, 9559011.614.5
10, 40, 70, 100, 13057018002250
9.8, 10.0, 10.1, 9.9, 10.25100.020.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).