Variance Calculator

Variance Calculator

Calculate population and sample variance, standard deviation, and sum of squares from your dataset.

Last updated: March 2026

Variance Calculator

Min 2 values. Separate by commas or spaces.

Variance

Population (σ²)4.0000
Sample (s²)4.5714

Standard Deviation

Population (σ)2.0000
Sample (s)2.1381

Mean

5.0000

Sample Size (n)

8

Sum of Squares (SS)

32.0000

What is Variance?

Variance measures how spread out data is from its mean. It's the average of the squared deviations from the mean. A small variance means data points cluster near the mean; large variance means they're scattered far from it.

There are two types: Population variance (σ²) describes all members of a complete population, dividing by n. Sample variance (s²) estimates the population variance from a sample, dividing by (n−1) to reduce bias. The (n−1) correction is called Bessel's correction.

Standard deviation (σ or s) is the square root of variance. It has the same units as the original data, making it more interpretable than variance. Most analyses use standard deviation, but variance appears in statistical formulas.

How to Calculate Variance

Formulas

Mean: μ = Σx / n
Sum of Squares: SS = Σ(x − μ)²
Population Variance: σ² = SS / n
Sample Variance: s² = SS / (n − 1)
Standard Deviation: σ = √(σ²) or s = √(s²)

Step-by-Step

Step 1: Calculate mean (μ) = sum of all values / count
Step 2: For each value, calculate (value − mean)²
Step 3: Sum all squared deviations (SS)
Step 4: For population: divide SS by n. For sample: divide SS by (n−1)
Step 5: Take square root to get standard deviation (optional)

Population vs Sample

Use population variance (σ²) when analyzing the entire dataset or complete population. Use sample variance (s²) when your data is a sample from a larger population. The (n−1) denominator corrects for sample bias (Bessel's correction).

Example Calculation

Data: 2, 4, 4, 4, 5, 5, 7, 9

Step 1:
Calculate mean:
μ = (2+4+4+4+5+5+7+9) / 8 = 40 / 8 = 5.0
Step 2:
Squared deviations (x − 5)²:
(2−5)²=9, (4−5)²=1, (4−5)²=1, (4−5)²=1, (5−5)²=0, (5−5)²=0, (7−5)²=4, (9−5)²=16
Step 3:
Sum of squares:
SS = 9+1+1+1+0+0+4+16 = 32
Step 4:
Calculate variances:
σ² = 32 / 8 = 4.0 (population)
s² = 32 / 7 = 4.571 (sample)
Result:
Population: σ² = 4.0, σ = 2.0
Sample: s² = 4.571, s = 2.138

Frequently Asked Questions

Why divide by (n−1) for sample variance?

Sample variance divides by (n−1) to correct for bias. Using n underestimates the true population variance. Bessel's correction makes the sample variance an unbiased estimator of the population parameter.

Why square the deviations?

Squaring makes all deviations positive (so they don't cancel out) and penalizes large deviations more. It turns the problem into calculus-friendly form and makes variance the mathematical foundation of many statistical tests.

What does high variance mean?

High variance indicates data is spread out far from the mean. Low variance means data clusters tightly around the mean. High variance suggests high variability or uncertainty in the dataset.

Can variance be zero?

Yes, variance is zero only if all data values are identical (no variability). In practice, this rarely happens. Even slight differences in values produce non-zero variance.

Why use standard deviation instead of variance?

Standard deviation has the same units as the original data, making it more interpretable. Variance is in 'squared units' which is harder to understand. Both measure spread; SD is more practical for communication.

Does variance work for non-normal data?

Yes, variance is a general measure of spread. Unlike some tests that assume normality, variance calculation works for any distribution. However, for highly skewed data, median and IQR may be more informative than mean and variance.

Related Tools