STATISTICS CALCULATOR

Variance Calculator

Calculate population or sample variance from a comma-separated dataset and see the mean used in the calculation.

Variance formula

Population variance is σ² = Σ(x − μ)² ÷ N, where μ is the population mean and N is the number of values. Sample variance is s² = Σ(x − x̄)² ÷ (n − 1) when the data is treated as a sample.

Worked example

For 2, 4, 4, 7, 9, the mean is 5.2. The population variance is the average squared deviation from 5.2. If the same values represent a sample, dividing by n − 1 gives the sample variance instead.

Population vs sample variance

Use population variance when your dataset represents the complete population of interest. Use sample variance when the observations are a sample used to estimate variability in a larger population.

What variance tells you

Variance measures the average squared distance from the mean. Because deviations are squared, variance is expressed in squared units; standard deviation is often easier to interpret because it returns to the original units.

FAQ

Why does sample variance use n − 1? The n − 1 divisor is the common unbiased estimator of population variance under standard sampling assumptions.

Can variance be negative? No. Squared deviations are non-negative, so variance cannot be negative.

What is the difference between variance and standard deviation? Standard deviation is the square root of variance.

Related calculators

Standard Deviation · Standard Error · Mean, Median & Mode

Understanding variance

Variance measures dispersion by averaging squared deviations from the mean. It is closely related to standard deviation: standard deviation is the square root of variance.

Population vs sample variance

Population variance describes the full population. Sample variance uses the degrees-of-freedom adjustment commonly applied when estimating population variability from sample data.

Why the units are squared

Because deviations are squared, variance is expressed in squared units. Standard deviation returns the spread to the original units, which often makes it easier to interpret.

Variance FAQ

Can variance be zero?

Yes. Variance is zero when every observation has exactly the same value.

Formula and calculation method

Variance measures the average squared distance from the mean. Population variance is σ² = Σ(x − μ)² ÷ N; sample variance is commonly s² = Σ(x − x̄)² ÷ (n − 1). The sample denominator adjusts for estimating the population mean from sample data.

Practical example

For values 2, 4 and 6, the mean is 4 and the squared deviations are 4, 0 and 4, summing to 8. Population variance is 8 ÷ 3 ≈ 2.6667; sample variance is 8 ÷ 2 = 4.

Frequently asked questions

Why is variance measured in squared units?

The formula squares each deviation, so a variable measured in metres produces variance in square metres.

When is variance zero?

When every observation has the same value, all deviations from the mean are zero.

Should I use sample or population variance?

Use population variance for the complete population of interest and sample variance when the observations are a sample used to estimate a wider population.