Skip to content

Variance Calculator

This variance calculator measures how spread out your numbers are by averaging their squared distances from the mean. Paste the data and choose population, which divides by n, or sample, which divides by n − 1. You get the variance, the standard deviation and the sum of squares, with each squared deviation listed so you can check your own work.

Last updated November 6, 2026 · Topic: Statistics

Separated by commas or spaces

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

σ2=∑(xi−μ)2Ns2=∑(xi−xˉ)2n−1\sigma^2 = \frac{\sum (x_i - \mu)^2}{N} \qquad\qquad s^2 = \frac{\sum (x_i - \bar{x})^2}{n - 1}

How to use the variance calculator

  1. Type your numbers, separated by commas or spaces.
  2. Choose population or sample.
  3. Read the variance in the answer.
  4. Read the steps for the mean, the sum of squares, the division and the standard deviation.
  5. 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.

FAQ

Frequently asked questions

01What does variance tell me?

Variance shows how far values typically sit from their mean, in squared units. A small variance means the values cluster near the mean. A large variance means they are spread out. A variance of zero means every value is the same. It is the step before the standard deviation.

02What is the difference between population and sample variance?

Population variance divides the sum of squares by n and is used when your list is the whole group. Sample variance divides by n − 1 and is used when the list is a part of a larger group. The n − 1 corrects the tendency of a sample to underestimate the spread.

03Why is variance in squared units?

Because we square the distances from the mean. If the data is in centimeters, the variance is in square centimeters. That is why the standard deviation, which is the square root of the variance, is easier to interpret: it uses the original units.

04Can variance be negative?

No. It is an average of squared numbers, and squares are never negative. The smallest possible variance is zero, which happens when all the values are equal. If you ever get a negative variance, there is an arithmetic error.

05How do I get the standard deviation from the variance?

Take the square root. A variance of 4 gives a standard deviation of 2. A variance of 27.428571 gives about 5.237. The calculator shows both numbers at the end of the steps so you do not need a second tool.

06How many values do I need?

Population variance works with one or more values, though one value gives 0. Sample variance needs at least two values, because with one value there is no spread to estimate. The tool shows a clear message if you give too few.

07What is the relationship between variance and standard deviation?

The standard deviation is the square root of the variance. A variance of 4 means a standard deviation of 2. Both describe the same spread, but the standard deviation is in the same units as the data, so it is easier to interpret.

08How many decimal places should I use for variance?

Keep all decimals while you work and round only at the end. A common habit is to report one or two more decimal places than the raw data. Rounding the mean before squaring the deviations is the most common source of small errors.