Variance Calculator

Calculate population or sample variance with mean, standard deviation, sum of squares, and complete calculation steps.

Separate values with commas, spaces, tabs, or new lines. Negative numbers, decimals, and scientific notation are supported.

Example: 4, 8, 6, 5, 3, 7

Variance Result

No result yet
Enter values and press Calculate.
Count —
Mean —
Sum of Squares —
Standard Deviation —

Calculation Steps

  1. Your calculation steps will appear here after you press Calculate.

Deviation Table

# x x − mean (x − mean)²
Calculation details will appear here.

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

Population variance divides by N. Sample variance divides by n−1. Standard deviation is the square root of variance.

How to Use the Variance Calculator

  1. Choose Population Variance if your data contains the full population you want to describe.
  2. Choose Sample Variance if your values are a sample from a larger population.
  3. Paste or type your dataset using commas, spaces, tabs, or new lines.
  4. Press Calculate to see the variance, standard deviation, mean, sum of squares, and each squared deviation.

For related measures of spread, use the Standard Deviation Calculator. To review the center of a dataset, try the Mean Median Mode Calculator.

Population and Sample Variance Formulas

Population variance:

σ² = Σ(xᵢ − μ)² / N

Sample variance:

s² = Σ(xᵢ − x̄)² / (n − 1)

Here, μ is the population mean, x̄ is the sample mean, N is the population size, and n is the sample size.

Variance measures how spread out values are around their mean by averaging squared deviations. A larger variance means the values are more dispersed, while a variance of zero means every value in the dataset is identical.

How to Calculate Variance Step by Step

  1. Find the arithmetic mean of the dataset.
  2. Subtract the mean from each observation.
  3. Square each deviation so negative and positive differences do not cancel out.
  4. Add the squared deviations to get the sum of squares.
  5. Divide by N for population variance or n−1 for sample variance.
  6. Take the square root of variance to obtain the standard deviation.

Population Variance Example

Suppose the complete population is: 2, 4, 6.

Mean: μ = (2 + 4 + 6) / 3 = 4

Squared deviations: (2 − 4)² = 4, (4 − 4)² = 0, (6 − 4)² = 4

Sum of squares: 4 + 0 + 4 = 8

Population variance: σ² = 8 / 3 ≈ 2.6667

Population standard deviation: σ = √2.6667 ≈ 1.6330

Sample Variance Example

For the sample dataset 1, 2, 5, 6, 9, 10:

Mean: x̄ = 5.5

Sum of squared deviations: SS = 65.5

Sample variance: s² = 65.5 / (6 − 1) = 13.1

Sample standard deviation: s = √13.1 ≈ 3.6194

Sample vs Population Variance

Feature Population Variance Sample Variance
Use when You have the entire population of interest. You have a sample used to estimate population variability.
Symbol σ² s²
Denominator N n − 1
Mean symbol μ x̄

Why n−1? In sample variance, the sample mean is estimated from the same data. Dividing by n−1 applies Bessel's correction and removes the systematic downward bias that would occur when estimating population variance with a denominator of n.

Variance vs Standard Deviation

Variance and standard deviation measure the same underlying spread in different units. Variance is expressed in squared units, while standard deviation is the positive square root of variance and therefore uses the original measurement units. For practical interpretation, standard deviation is usually easier to read, while variance is widely used in statistical formulas.

Common Variance Mistakes

  • Using the wrong denominator: choose N only for a complete population and n−1 when estimating population variance from a sample.
  • Forgetting to square deviations: without squaring, positive and negative deviations can cancel each other.
  • Confusing variance and standard deviation: variance is in squared units; standard deviation returns to the original units.
  • Ignoring bad input: every token in the dataset should be a valid number rather than silently discarded.

How to Verify the Answer

Variance can never be negative because each deviation is squared. If every data value is identical, variance should be zero. You can also square the displayed standard deviation to confirm it matches the variance apart from normal rounding differences.

Calculation Methodology

The calculator uses a numerically stable online variance calculation to obtain the mean and sum of squared deviations. It then divides by N for population variance or n−1 for sample variance. Standard deviation is calculated as the square root of the resulting variance.

Last reviewed: July 22, 2026

Frequently Asked Questions

Use sample variance when your dataset is a sample drawn from a larger population and you want to estimate that population's variance.

Use population variance when your dataset contains every member of the population you want to describe.

Using n−1 applies Bessel's correction. Because the sample mean is estimated from the sample itself, one degree of freedom is used, and dividing by n−1 removes the downward bias in the estimate of population variance.

No. Variance is based on squared deviations, so its value is always zero or positive.

A variance of zero means every observation in the dataset has the same value, so there is no spread around the mean.

Standard deviation is the positive square root of variance. Variance uses squared units, while standard deviation uses the original measurement units.

Yes. The calculator supports negative numbers, decimals, scientific notation, commas, spaces, tabs, and new lines.