Variance Calculator
Enter your data values below and choose whether you want population variance or sample variance.
Sample variance: s² = Σ(x − x̄)² / (n − 1)
What Is Variance?
Variance is a measure of spread. It tells you how far data points are from the mean, on average, in squared units. If every number in your dataset is close to the mean, variance is low. If numbers are spread out, variance is high.
In plain language, variance answers this question: How much do these values vary from the center? It is one of the core concepts in statistics, finance, quality control, science, and machine learning.
How to Calculate Variance Step by Step
Whether you use a calculator, spreadsheet, or do it by hand, the process is the same:
- Find the mean (average) of your data.
- Subtract the mean from each value to get deviations.
- Square each deviation.
- Add all squared deviations together.
- Divide by the right denominator:
- N for population variance
- n − 1 for sample variance
Quick Worked Example
Data: 4, 8, 6, 5, 3
- Mean: (4 + 8 + 6 + 5 + 3) / 5 = 5.2
- Deviations: -1.2, 2.8, 0.8, -0.2, -2.2
- Squared deviations: 1.44, 7.84, 0.64, 0.04, 4.84
- Sum of squared deviations: 14.8
- Population variance: 14.8 / 5 = 2.96
- Sample variance: 14.8 / 4 = 3.70
Sample Variance vs Population Variance
Population variance (σ²)
Use this when your data includes every single value in the full population you care about. Example: all 120 employees in a small company.
Sample variance (s²)
Use this when your data is only a sample from a larger population. In this case, dividing by n − 1 (Bessel’s correction) gives a less biased estimate of true population variance.
Why Do We Square Deviations?
If you simply added raw deviations from the mean, positives and negatives would cancel out to zero. Squaring solves this and gives more weight to larger differences, which helps identify truly spread-out datasets.
How to Interpret Variance
- Small variance: Data points are tightly grouped around the mean.
- Large variance: Data points are more dispersed.
- Variance of zero: Every value is identical.
Because variance is in squared units (like dollars squared or centimeters squared), many people also report standard deviation, which is the square root of variance and easier to interpret in original units.
Common Mistakes to Avoid
- Using population formula when your data is actually a sample.
- Forgetting to square deviations.
- Rounding too early in hand calculations.
- Using sample variance with only one data point (not defined).
- Mixing units or entering text accidentally in your data list.
Variance in Real Life
Variance shows up everywhere:
- Finance: Measuring volatility of investment returns.
- Manufacturing: Tracking consistency of product dimensions.
- Education: Understanding score spread across students.
- Healthcare: Monitoring variability in lab measurements.
- Data science: Feature scaling, model diagnostics, and distribution analysis.
FAQ
Can variance be negative?
No. Since deviations are squared, variance is always zero or positive.
What if all numbers are the same?
Then every deviation is zero, so variance is exactly zero.
Should I report variance or standard deviation?
Often both are useful. Variance is mathematically convenient, while standard deviation is usually easier to explain because it is in original units.
Final Takeaway
To calculate variance, find the mean, square each distance from the mean, sum those squares, and divide by either N (population) or n − 1 (sample). Use the calculator above to check your work quickly and see each result clearly.