What is variance?
Variance is a number that describes the spread of a data set. It is the average squared distance from the mean. Because distances are squared, bigger gaps count much more than small gaps.
There are two versions. Use the population version if your list is everyone you care about. Use the sample version if your list is a part of a larger group.
Variance formula: population and sample
How to use the variance calculator
- Type your numbers, separated by commas or spaces.
- Choose population or sample.
- Read the variance in the answer.
- Read the steps for the mean, the sum of squares, the division and the standard deviation.
- Compare both types with the same data to see the difference.
Variance examples
Example 1: Population variance
Find the population variance of 2, 4, 4, 4, 5, 5, 7, 9. The mean is 5. The squared distances are 9, 1, 1, 1, 0, 0, 4 and 16, and they add up to 32. Divide by n = 8: variance = 4. The standard deviation is 2.
Example 2: Sample variance
Use the same list as a sample. Divide 32 by n − 1 = 7 to get 4.571429. The standard deviation is about 2.138. The sample value is larger, which corrects for the missing data.
Example 3: A classic data set
Find the variance of 10, 12, 23, 23, 16, 23, 21, 16. The mean is 18. The squared distances add up to 192. Population variance = 192 ÷ 8 = 24. Sample variance = 192 ÷ 7 = 27.428571.
Example 4: No spread
Find the variance of 5, 5, 5, 5. The mean is 5, every distance is 0, and the variance is 0. Identical values have no spread.
How to read a variance
Variance is in squared units. If your data is in centimeters, the variance is in square centimeters, which is hard to picture. Take the square root to get the standard deviation, which is back in centimeters. Use variance when you add spreads together, since variances of independent quantities add, and use the standard deviation when you describe the data to someone.
How many decimal places to keep
Keep full precision for the mean and every squared deviation, and round only the final variance. Rounding the mean early can shift the answer noticeably, especially for a small sample. Report one or two more decimal places than the original data had. The calculator works with the full values and rounds only for display.
Variance of a probability distribution
This calculator works on a list of data values. For a discrete random variable with probabilities, the variance is E[X²] − (E[X])². For a fair die, E[X] = 3.5 and E[X²] = 91 ÷ 6 ≈ 15.17, so the variance is about 15.17 − 12.25 = 2.92. For the standard deviation and the standard error, use the standard deviation calculator.
Tips
- Choose sample if you are not sure. Most real data sets are samples.
- The standard deviation is shown in the last step.
- Use the same unit for every number.
- A single outlier can make the variance much larger.
- For the full picture of spread, read standard deviation explained.
Common mistakes
- Dividing by n for a sample.
- Forgetting to square the distances.
- Reporting the variance when the question asks for the standard deviation.
- Mixing units.
Real-life uses
Variance is used in statistics, finance and science. Investors use it to measure how much an asset’s returns vary. Scientists use it to describe measurement error. Quality teams use it to check whether a process is steady. It is also the building block for many tests in statistics. For a version in the original units, use the standard deviation calculator.