Variance Calculator Formula

Understand the math behind the variance calculator. Each variable explained with a worked example.

Formulas Used

Variance Pop

variance_pop = ((a - mean_val)^2 + (b - mean_val)^2 + (c - mean_val)^2) / 3

Variance Sample

variance_sample = ((a - mean_val)^2 + (b - mean_val)^2 + (c - mean_val)^2) / 2

Std Dev

std_dev = sqrt(((a - mean_val)^2 + (b - mean_val)^2 + (c - mean_val)^2) / 3)

Mean

mean = mean_val

Variables

VariableDescriptionDefault
aValue 14
bValue 28
cValue 36
mean_valDerived value= (a + b + c) / 3calculated

How It Works

How to Calculate Variance

Formula (Population Variance)

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

Steps

1. Find the mean (μ) 2. Subtract the mean from each value 3. Square each difference 4. Find the average of the squared differences

Variance is the square of the standard deviation.

Worked Example

Find the variance of 4, 8, and 6.

a = 4b = 8c = 6
  1. 01Mean = (4 + 8 + 6) / 3 = 6
  2. 02Squared differences: (4-6)² = 4, (8-6)² = 4, (6-6)² = 0
  3. 03Variance (population) = (4 + 4 + 0) / 3 = 2.6667
  4. 04Variance (sample) = (4 + 4 + 0) / 2 = 4

Ready to run the numbers?

Open Variance Calculator