Variance Calculator
Find the variance of any data set. Choose population or sample, enter your values, and see the mean, the sum of squares, the variance and every calculation step.
Variance Calculator
Enter your numbers below and get your result instantly.
Step-by-Step Solution
What Is Variance?
Variance is a number that shows how far the values in a data set are spread out from their mean. It is the average of the squared distances between each value and the mean.
A small variance means the values are close to the mean and to each other. A large variance means the values are widely scattered. If every value is the same, the variance is zero.
Our calculator applies the correct formula for you and shows the work behind the answer.
How to Calculate Variance
You can calculate variance by hand in four steps.
1. Find the mean
Add all the values and divide by how many there are.
2. Subtract the mean from each value
This gives how far each value is from the mean.
3. Square each difference
Squaring removes negative signs, so values below the mean do not cancel out values above it.
4. Add the squares and divide
Add up the squared differences. Divide by N for a population, or by n − 1 for a sample. The result is the variance.
Variance Calculator Example
Find the variance of these eight numbers:
The sum is 40 and there are 8 values, so the mean is 40 ÷ 8 = 5.
Square each value's distance from the mean:
Sum of squares = 32
Population variance: 32 ÷ 8 = 4.
Sample variance: 32 ÷ 7 ≈ 4.5714.
Population vs. Sample Variance
Use population variance when your data includes every member of the group you care about, such as the scores of all students in one class. Divide by N.
Use sample variance when your data is only a part of a larger group, such as a survey of 100 people from a city. Divide by n − 1. This adjustment corrects for the fact that a sample usually shows less spread than the full group.
If you are not sure which to choose, sample variance is the usual choice for homework and real-world data.
Variance vs. Standard Deviation
The standard deviation is simply the square root of the variance. Both measure spread, but they are used differently.
- Variance is measured in squared units. If your data is in centimeters, the variance is in square centimeters. It is widely used in formulas and in many statistical tests.
- Standard deviation is in the same units as your data, so it is easier to picture and explain.
Our calculator shows both. You can also use our dedicated Standard Deviation Calculator, or find the mean with the Average Calculator.
The square root of the variance is the standard deviation. Try our Standard Deviation Calculator to find it directly.
More Variance Examples
These extra worked examples show variance step by step. Each one gives the sample variance (divide by n − 1) and the population variance (divide by N). Remember that variance is measured in squared units, so it is not in the same units as your data.
Example 2: Variance of 2, 4, 6, 8, 10
Answer: the sample variance is 10, and the population variance is 8.
The mean is (2 + 4 + 6 + 8 + 10) ÷ 5 = 6. The deviations are −4, −2, 0, 2 and 4. The squared deviations are 16, 4, 0, 4 and 16, and they add up to 40. For a sample, the variance is 40 ÷ 4 = 10. For a population, the variance is 40 ÷ 5 = 8.
Example 3: Variance of 3, 7, 7, 19
Answer: the sample variance is 48, and the population variance is 36.
The mean is (3 + 7 + 7 + 19) ÷ 4 = 36 ÷ 4 = 9. The deviations are −6, −2, −2 and 10. The squared deviations are 36, 4, 4 and 100, and they add up to 144. For a sample, the variance is 144 ÷ 3 = 48. For a population, the variance is 144 ÷ 4 = 36. One large value (19) pulls the variance up a lot.
Example 4: Step-by-step calculation for 10, 12, 23, 23, 16, 23, 21, 16
Answer: the sample variance is about 27.4286, and the population variance is 24.
Step 1: find the mean. The sum is 144 and there are 8 values, so the mean is 144 ÷ 8 = 18.
Step 2: subtract the mean from each value. The deviations are −8, −6, 5, 5, −2, 5, 3 and −2.
Step 3: square each deviation. The squares are 64, 36, 25, 25, 4, 25, 9 and 4, and their sum is 192.
Step 4: divide. Sample: 192 ÷ 7 ≈ 27.4286. Population: 192 ÷ 8 = 24.
Example 5: Negative numbers
Find the variance of −3, −1, 0, 2, 2.
Answer: the sample variance is 4.5, and the population variance is 3.6.
The mean is (−3 − 1 + 0 + 2 + 2) ÷ 5 = 0. Because the mean is 0, each deviation equals the value itself. The squared deviations are 9, 1, 0, 4 and 4, and they add up to 18. For a sample, the variance is 18 ÷ 4 = 4.5. For a population, the variance is 18 ÷ 5 = 3.6. Negative values work exactly like positive ones, because every deviation is squared.
Example 6: What happens to variance if you change the data?
Start with 2, 4, 6, 8, 10, which has a sample variance of 10 (see Example 2).
Answer: adding a constant does not change the variance, but multiplying every value by 3 multiplies the variance by 9.
Add 100 to every value: 102, 104, 106, 108, 110. The mean becomes 106, but the deviations are still −4, −2, 0, 2 and 4, so the sample variance is still 10. Now multiply the original values by 3: 6, 12, 18, 24, 30. The mean is 18, the deviations are −12, −6, 0, 6 and 12, the squared deviations are 144, 36, 0, 36 and 144, and their sum is 360. The sample variance is 360 ÷ 4 = 90, which is 9 times 10.
Common mistakes when finding variance
A common mistake is dividing by n when your data is a sample, instead of n − 1. Another is forgetting that variance is in squared units, so a variance of 10 cm² is not 10 cm. If you want a number in the same units as your data, take the square root, or use our Standard Deviation Calculator.
Created by Sajid Ali, SmartStatCalc · Last updated: 7 November 2026
Found a mistake or have a suggestion? Contact us.
How to Use Our Variance Calculator
- Type or paste your numbers into the Data Values box.
- Choose Sample or Population in the Data Type menu.
- Click the Calculate Variance button.
- Read the count, mean, sum of squares, variance and standard deviation.
- Use the step-by-step solution to check each stage of the calculation.
Click Reset at any time to clear your data and start again.
Why Use SmartStatCalc?
SmartStatCalc is built to make everyday statistics quick and easy to understand. Instead of squaring and adding every value by hand, you can enter your data and see a clear result right away.
Who Can Use a Variance Calculator?
Students use variance in statistics, science and economics courses. Teachers use it to see how much class scores differ. It is also used to compare how consistent two sets of measurements are, such as test results, prices or production times.
Frequently Asked Questions
What does a high variance mean?
It means the values are spread far from the mean. A low variance means the values are close to the mean.
Can variance be negative?
No. Variance is an average of squared numbers, so it is always zero or positive.
When is the variance zero?
The variance is zero only when every value in the data set is the same.
What is the difference between variance and standard deviation?
Standard deviation is the square root of the variance. It is in the same units as your data, while variance is in squared units.
Should I use sample or population variance?
Use population if your data is the whole group. Use sample if it is only part of a larger group. When unsure, sample is the usual choice.
Why do we divide by n − 1 for a sample?
A sample tends to show less spread than the full group, so dividing by n − 1 instead of n corrects for this.
How many numbers do I need?
Population needs at least one number. Sample needs at least two, because it divides by n − 1.
Is this Variance Calculator free?
Yes. SmartStatCalc's Variance Calculator is free to use online.
Contact SmartStatCalc
Have a question, suggestion, or feedback about our calculators? We want to make SmartStatCalc more useful, accurate, and easier for everyone to use.
If you spot a mistake or have an idea for another statistics tool, we would be happy to hear from you.
Cite this calculator
If you use this calculator in your work, you can cite it like this:
SmartStatCalc. (2026). Variance Calculator. https://smartstatcalc.com/variance-calculator/
Related Calculators
Explore more free statistics tools from SmartStatCalc.