free tool, no sign-up
Variance Calculator
Calculate sample variance and population variance for a list of numbers, with the mean, the sum of squares, and each squared deviation.
Separate numbers with commas, spaces, or new lines. Sample variance divides by n − 1. Population variance divides by N. Write 1000, not 1,000.
Enter numbers to see the sample variance and the population variance.
Enter numbers to see the sample variance and the population variance.
This variance calculator is for statistics class and homework that asks for the variance of a data set. Paste the numbers and the page shows the sample variance, which divides by n − 1, and the population variance, which divides by N. It also shows the mean, the sum of squared deviations, and, for a short list, each deviation and its square. An integer list keeps an exact fraction, and a long decimal is rounded to eight significant figures.
How to calculate variance
Variance measures how far a list of numbers sits from its mean. Find the mean, subtract it from each value, square those differences, add the squares, and divide. Squaring keeps a value below the mean from canceling a value above it, and it gives extra weight to values that sit farther away.
Take five quiz scores: 6, 7, 8, 9, 10. The sum is 40, so the mean is 40 / 5 = 8. The deviations from 8 are −2, −1, 0, 1, and 2. Their squares are 4, 1, 0, 1, and 4. The sum of squared deviations is 10.
Sample variance and population variance
The population variance formula divides that sum by N, the number of values in the whole group: σ² = Σ(x − μ)² / N. For the quiz scores, N is 5, and 10 / 5 = 2, so the population variance is 2. Use it when the list is everyone you care about, such as every quiz score in one class.
The sample variance formula divides by n − 1 instead: s² = Σ(x − x̄)² / (n − 1). Here that is 10 / 4 = 5/2, which is 2.5. Dividing by n − 1 is Bessel's correction. A sample tends to sit closer together than the population it came from, and dividing by n instead of n − 1 would underestimate the population variance. Use the sample variance when the list is only part of a larger group. One value has a population variance of 0, because it is the mean. The sample variance is undefined, because n − 1 is 0 and the formula would divide by zero.
Variance and standard deviation
Variance is measured in squared units. The quiz scores are in points, so their population variance of 2 is 2 points squared. That makes variance awkward to read on its own, but it is the quantity that adds up cleanly: the variance of a sum of independent values is the sum of their variances. Standard deviation is the square root of variance, which brings the result back to points. The standard deviation calculator finds it directly.
The mean is the starting point for every variance. Add the values and divide by how many there are before you subtract. A low variance means the numbers cluster near that mean. A high variance means they spread out. The mean, median, and mode calculator is the place to check the average on its own when a problem asks for the center of the list as well as the spread.
Related calculators
Frequently Asked Questions
How do you find the variance of a data set?
Add the squared distances from the mean, then divide. Divide by N for the population variance, or by n − 1 for the sample variance. For 6, 7, 8, 9, 10 the mean is 8 and the sum of squares is 10, so the population variance is 2 and the sample variance is 2.5.
What is the sample variance formula?
The sample variance formula is s² = Σ(x − x̄)² / (n − 1). Square the distance from each value to the sample mean, add those squares, and divide by one less than the count. The list needs at least two numbers. With one number, n − 1 is 0 and the sample variance is undefined.
What is the population variance formula?
The population variance formula is σ² = Σ(x − μ)² / N. It uses the same squared distances from the mean as the sample formula, then divides by N, the number of values. For 6, 7, 8, 9, 10 that is 10 / 5, which equals 2. A single value has population variance 0.
What is the variance of 6, 7, 8, 9, and 10?
The mean is 8 and the squared deviations add to 10. The population variance is 10 / 5 = 2. The sample variance is 10 / 4 = 2.5.
Why is variance in squared units?
Each deviation from the mean is squared before the deviations are added, so the units are squared too. Scores in points give a variance in points squared, and lengths in meters give square meters. Standard deviation, the square root of variance, returns to the original units.