Σ
SDCalc

Variance Calculator: Sample s² and Population σ²

Paste your data to get sample variance (n − 1) or population variance (N), with a step-by-step table for your own numbers that you can copy.

Only need sample variance s²? Use the sample variance calculator

12 values
Instant Math
Sample (n-1) / Population (N)

Use when your data represents a subset of a larger population. Applies Bessel's correction.

No Data Detected

Enter your numbers above to see the mean, standard deviation, variance and other statistics.

Worked variance examples

Computed with this calculator on 2026-11-02 from illustrative datasets. Each button loads the same values above.

Five values from the walkthrough

4, 8, 6, 5, 7

n
5
Mean
6
Sample variance s² (n−1)
2.5
Population variance σ² (N)
2
Sample SD s
1.5811
Load this example

Twelve quiz scores (the calculator default)

12, 15, 14, 10, 18, 22, 14, 13, 11, 19, 15, 14

n
12
Mean
14.75
Sample variance s² (n−1)
11.8409
Population variance σ² (N)
10.8542
Sample SD s
3.4411
Load this example

Seven daily high temperatures (°C)

21.4, 23.1, 19.8, 22.6, 24, 20.5, 22.2

n
7
Mean
21.9429
Sample variance s² (n−1)
2.1729
Population variance σ² (N)
1.8624
Sample SD s
1.4741
Load this example

Variance formulas: sample (n − 1) and population (N)

Sample variance: s² = Σ(x − x̄)² / (n − 1)

Population variance: σ² = Σ(x − μ)² / N

Variance is the average squared distance of the values from their mean. Use the sample formula (the default) when your data is a sample from a larger group; use the population formula only when you have every value. For example, for 4, 8, 6, 5, 7 the mean is 6, the squared deviations add up to 10, so s² = 10 / 4 = 2.5 and σ² = 10 / 5 = 2. Enter your own numbers above to get the same breakdown for your data.

Variance calculator FAQ

What is the difference between sample and population variance?

Both start from the sum of squared deviations from the mean. Population variance (σ²) divides it by N, the number of values, and describes a complete group. Sample variance (s²) divides by n − 1 and estimates the variance of a larger population from a sample. For the five values 4, 8, 6, 5, 7 the sum of squared deviations is 10, so σ² = 2 and s² = 2.5.

Why does sample variance divide by n − 1?

Deviations from the sample mean are on average smaller than deviations from the true population mean, because the sample mean is fitted to the same data. Dividing by n − 1 instead of n (Bessel’s correction) makes s² an unbiased estimate of the population variance.

Can variance be negative?

No. Variance is an average of squared deviations, and squares are never negative. It is zero only when every value is the same.

How is variance related to standard deviation?

Standard deviation is the square root of variance. Here s² = 2.5, so s = √2.5 ≈ 1.5811.

Only need s²? The sample variance calculator walks through the n − 1 steps and the Excel, TI-84 and Python functions. Background reading: standard deviation vs variance and variance explained.