Statistics
Calculate population and sample variance from a data set
Last reviewed: How we build & verify
0 values
How it works
Variance averages the squared distances of each value from the mean, giving a measure of spread in squared units. Standard deviation is its square root, which is why variance is what the underlying math actually uses.
Formula
Population: σ² = Σ(xᵢ − μ)² / N Sample: s² = Σ(xᵢ − x̄)² / (N − 1)
Variables
σ²population variances²sample variance, using Bessel correctionxᵢeach observationNnumber of observations
Worked example
Inputs: 4, 8, 15, 16, 23, 42
- Mean: 108 / 6 = 18
- Deviations: −14, −10, −3, −2, 5, 24
- Squared: 196, 100, 9, 4, 25, 576 → sum 910
- Population: 910 / 6 = 151.67
- Sample: 910 / 5 = 182
Result: σ² = 151.67 (σ = 12.32), s² = 182 (s = 13.49)
Notes
- Dividing by N − 1 for samples corrects a downward bias, because deviations from the sample mean are always slightly smaller than deviations from the unknown true mean.
- Variance is in squared units, so a variance of 182 on a dataset of dollars is 182 squared dollars. Report standard deviation when you need something interpretable.
- Variances of independent variables add, but standard deviations do not. That is why portfolio and error-propagation math is done in variance space.
- Squaring gives outliers heavy weight: the value 42 alone contributes 576 of the 910 total here. Use interquartile range for a resistant measure of spread.
Related Tools
Most Searched Today
Frequently Asked Questions
Variance Calculator runs right in the browser tab you already have open. No install, no account, no cost.
Variance Calculator follows the standard method used in textbooks and technical references for this calculation, and we show the formula or approach on the page itself so you can check the working rather than trust a black box. Found an edge case that breaks it? Use the feedback button in the bottom-right corner.