Variance Calculator
Calculate population variance and sample variance from a data set.
Understand how spread out your data is with this fundamental statistics measure.
What Is Variance?
Variance measures how far a set of numbers is spread out from their average (mean). A variance of zero means all values are identical. A large variance means the values are very spread out.
Variance is the foundation of standard deviation, the most widely used measure of spread in statistics.
The Two Variance Formulas
Population Variance (σ²): use when you have data for every member of the group:
σ² = Σ(xᵢ − μ)² / N
Sample Variance (s²): use when your data is a sample from a larger population:
s² = Σ(xᵢ − x̄)² / (N − 1)
Where:
- xᵢ = Each individual value
- μ (or x̄) = Mean of the data
- N = Number of values
Why Divide by N−1 for Samples?
Dividing by N−1 (instead of N) is called Bessel’s correction. When estimating population variance from a sample, the sample mean is already optimized to minimize the sum of squared deviations, making it systematically underestimate the true population variance. Dividing by N−1 corrects this bias. Friedrich Bessel, a German mathematician and astronomer, introduced this correction in the 19th century.
Standard Deviation
Standard deviation is simply the square root of variance:
σ = √σ² (population) or s = √s² (sample)
Standard deviation has the same units as the original data (e.g., dollars, centimeters), making it easier to interpret than variance. Variance is squared units, which is harder to reason about directly.
Standard Error
The standard error estimates how much the sample mean varies from sample to sample:
SE = s / √N
A smaller standard error means you can be more confident that your sample mean is close to the true population mean.
Coefficient of Variation
For comparing variability between datasets with different means or units:
CV = (Standard Deviation / Mean) × 100
A CV of 5% means the standard deviation is 5% of the mean. That makes it the right tool when the two datasets are not on the same scale, such as comparing the consistency of a bakery’s loaf weights against its oven temperatures.
The CV is undefined when the mean is zero, and unreliable when the mean is merely close to zero. Data that straddles zero, like temperature changes or profit and loss, is the classic case where it misleads.
Practical Example
Test scores: 72, 85, 90, 78, 88, 95, 74, 82, 88, 79
Mean = 831 / 10 = 83.1
Now square each deviation from that mean:
| Score | Deviation | Squared |
|---|---|---|
| 72 | −11.1 | 123.21 |
| 85 | 1.9 | 3.61 |
| 90 | 6.9 | 47.61 |
| 78 | −5.1 | 26.01 |
| 88 | 4.9 | 24.01 |
| 95 | 11.9 | 141.61 |
| 74 | −9.1 | 82.81 |
| 82 | −1.1 | 1.21 |
| 88 | 4.9 | 24.01 |
| 79 | −4.1 | 16.81 |
| Σ | 490.90 |
- Sample variance = 490.90 / 9 = 54.544
- Sample standard deviation = √54.544 = 7.385
Treat the same ten scores as the whole population and you divide by 10 instead of 9: variance 49.090, standard deviation 7.006.
Bessel’s correction costs a fixed ratio of n/(n−1), so at n = 10 the sample variance sits 11.1% above the population figure and the standard deviation 5.4% above. At n = 3 those gaps widen to 50% and 22.5%. Which divisor you pick barely matters on a large dataset and matters enormously on a small one, which is exactly when people are most tempted not to think about it.
Roughly two thirds of a normally distributed set falls within one standard deviation of the mean, so most of these scores sit between 75.7 and 90.5.
Real-World Uses
- Finance: variance and standard deviation measure investment risk (volatility). A portfolio with higher variance has less predictable returns.
- Manufacturing: quality control uses variance to monitor product consistency. High variance means inconsistent production.
- Science: error analysis and experimental repeatability.
- Education: comparing how spread out student performance is across classes or schools.
One warning that catches people out. Variance is in squared units, so a variance of 54.5 on test scores is not “54.5 points” of anything. Only the standard deviation is back in the original units and safe to compare against the data.
How we build and check this calculator
This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.
SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.