Calculate population or sample variance from a dataset with step-by-step squared deviations.
Variance measures how far a set of numbers are spread out from their mean. Sample variance divides by n−1 (Bessel's correction) to give an unbiased estimate; population variance divides by n.
Sample Variance
s² = Σ(xᵢ − x̄)² / (n − 1)
Population Variance
σ² = Σ(xᵢ − μ)² / n
Use sample variance (divides by n−1) when your data is a subset of a larger population. Use population variance (divides by n) only when you have data for every member of the population.
Standard deviation is the square root of variance. It is often preferred because it has the same units as the original data.