Math calculators

Variance Calculator

Updated Jun 26, 2026 By Jehan Wadia
Formulas
Variance Type
Data Input
Separate values with commas, spaces, or new lines — all three are accepted together.

Introduction

Variance tells you how spread out a set of numbers is from the average. A small variance means the values are close together. A large variance means they are far apart. It is one of the most useful ideas in statistics and shows up in science, finance, and everyday data analysis.

This variance calculator lets you find the variance and standard deviation of any dataset in seconds. Just type in your numbers, and the tool does the rest. It works in two modes. The Standard Variance mode takes a list of numbers and calculates both sample variance and population variance. The Discrete Random Variable mode lets you enter values along with their probabilities to find the variance of a probability distribution.

For every calculation, you get a full step-by-step solution, a deviation table, and a chart so you can see exactly how the answer was found. You can also copy or download your results. Whether you are a student checking homework or a professional working with data, this calculator makes finding variance quick and simple.

How to Use Our Variance Calculator

Enter your numbers and this calculator will find the variance, standard deviation, mean, and sum of squares. It also shows a step-by-step solution and a deviation table so you can see exactly how each result is found.

Choose a tab. Pick "Standard Variance" if you have a list of numbers. Pick "Discrete Random Variable" if each number has its own probability.

Standard Variance

Select the variance type. Choose "Sample" if your data is a subset of a larger group. Choose "Population" if your data includes every value in the group. Sample divides by n−1, and population divides by N.

Enter your data. Type or paste your numbers into the text box. You can separate them with commas, spaces, or new lines. The calculator will count how many valid numbers it finds.

Click "Calculate." The tool will show your variance, standard deviation, mean, a deviation table, a bar chart, and a full step-by-step breakdown. You can switch between sample and population results at any time using the toggle above the results.

Copy or download your results. Use the "Copy Results" button to copy key values to your clipboard, or click "Download Results" to save them as a text file.

Discrete Random Variable

Enter each probability. In the P(X) column, type the probability for each outcome. Each value must be between 0 and 1, and all probabilities should add up to 1.

Enter each data value. In the X column, type the matching outcome value for that probability.

Add or remove rows. Click "Add Row" to enter more outcomes. Click the trash icon to remove a row you no longer need.

Click "Calculate." The tool will display the expected value (μ), variance (σ²), standard deviation (σ), a computation table, and a step-by-step solution.

What Is Variance?

Variance measures how far a set of numbers is spread out from their average (mean). A small variance means the numbers are close together. A large variance means they are spread far apart. It is one of the most important ideas in statistics.

How Variance Is Calculated

To find variance, you follow these steps:

  1. Find the mean (average) of all your numbers.
  2. Subtract the mean from each number. This gives you the deviation for each value.
  3. Square each deviation (multiply it by itself). This removes negative signs and gives more weight to values far from the mean.
  4. Add up all the squared deviations. This total is called the sum of squares.
  5. Divide the sum of squares by the count of values. This gives you the variance.

Sample Variance vs. Population Variance

There are two types of variance. Population variance (σ²) is used when your data includes every member of the group you are studying. You divide by N, the total number of values. Sample variance (s²) is used when your data is only a portion of a larger group. You divide by n − 1 instead of n. This adjustment, called Bessel's correction, makes the result more accurate when working with a sample. If you need to determine the right number of observations before collecting data, a sample size calculator can help.

Standard Deviation

Standard deviation is the square root of the variance. It tells you the same thing as variance — how spread out the data is — but in the same units as the original data. For example, if your data is in pounds, the standard deviation is also in pounds, while the variance would be in "pounds squared." This makes standard deviation easier to interpret in everyday use.

Variance of a Discrete Random Variable

A discrete random variable is a value that can only take specific outcomes, each with a known probability. For example, the result of rolling a die. You can explore similar outcome-based calculations with a dice probability calculator. To find its variance, you first calculate the expected value (μ) by multiplying each outcome by its probability and adding the results. Then, for each outcome, you find the squared distance from the expected value, multiply it by the probability, and add everything up. This gives you the variance of the distribution. For more complex probability models, you may also want to explore the binomial distribution calculator or the normal distribution calculator.

Why Variance Matters

Variance helps you understand risk, consistency, and reliability. In school, it shows how spread out test scores are. In finance, it measures how much a stock price changes. In science, it tells researchers how much their measurements vary. Any time you need to know whether data points are tightly grouped or widely scattered, variance gives you a clear answer. Related tools like the IQR calculator, Z score calculator, and outlier calculator can help you dig even deeper into your data's distribution and identify unusual values.


Formulas used

Sample Variance
s^2 = \frac{\sum (x_i - \bar{x})^2}{n - 1}
Population Variance
\sigma^2 = \frac{\sum (x_i - \mu)^2}{N}
Mean
\bar{x} = \frac{\sum x}{n}
Standard Deviation
s = \sqrt{s^2}
Expected Value (Discrete)
\mu = \sum x_i \, P(x_i)
Variance of a Discrete Random Variable
\sigma^2 = \sum P(x_i) \, (x_i - \mu)^2

Frequently asked questions

What is the difference between sample and population variance?

Sample variance divides by n − 1 and is used when your data is only part of a larger group. Population variance divides by N and is used when your data covers the entire group. Sample variance uses n − 1 to correct for bias, which gives a more accurate estimate.

How do I enter my data into the calculator?

Type or paste your numbers into the text box. You can separate them with commas, spaces, or new lines. The calculator accepts all three at the same time. It will count how many valid numbers it finds and show you a preview.

Can I switch between sample and population results after calculating?

Yes. After you click Calculate, use the toggle above the results to switch between Sample and Population. The results, deviation table, and step-by-step solution will update right away.

What does it mean when the probabilities do not add up to 1?

In the Discrete Random Variable mode, all probabilities should add up to exactly 1. If they don't, the calculator will show a warning. Your results may not be valid because the probability distribution is incomplete or incorrect.

Why do I need at least 2 data points for sample variance?

Sample variance divides by n − 1. If you only have 1 data point, that means dividing by zero, which is not possible. You need at least 2 values. If you only have 1 value, switch to Population mode instead.

What is the sum of squares (SS)?

The sum of squares is the total you get when you subtract the mean from each value, square the result, and add them all up. It measures the total squared distance of all data points from the mean. Variance is calculated by dividing this number by n − 1 or N.

Can this calculator handle negative numbers?

Yes. You can enter negative numbers in both modes. The calculator will include them in all calculations, including the mean, deviations, and variance.

What are potential outliers and how are they detected?

The calculator flags any value that is more than 2 standard deviations away from the mean as a potential outlier. These are data points that are unusually far from the rest of the data. Outliers can have a big effect on your variance.

Can I download or copy my results?

Yes. In the Standard Variance mode, click Copy Results to copy key values to your clipboard or Download Results to save a text file. In the Discrete Random Variable mode, you can copy results to your clipboard.

What is the deviation table?

The deviation table shows each data value, how far it is from the mean (Xᵢ − mean), and the square of that distance (Xᵢ − mean)². It lets you see exactly how each value contributes to the total sum of squares and the final variance.

What does a variance of zero mean?

A variance of zero means every value in your data is exactly the same. There is no spread at all. The standard deviation will also be zero.

How is the expected value (μ) calculated for a discrete random variable?

Multiply each outcome value by its probability, then add all the products together. The result is the expected value, also called the mean of the distribution. It represents the long-run average if the experiment were repeated many times.

Does the calculator show the formula used?

Yes. The step-by-step solution section shows the exact formula, the substitution of your numbers into it, and every intermediate calculation. This makes it easy to follow along and learn how the answer was found.

What happens if I enter text or invalid characters?

The calculator ignores any entry that is not a valid number. It will show a note listing the ignored values so you know what was skipped. Only valid numbers are used in the calculation.

Can I use decimals and fractions?

You can use decimals like 3.5 or 0.75. The calculator does not accept written fractions like 1/2 directly. Convert fractions to decimals before entering them.