If you need calculate the variance of a data setour online calculator allows you to obtain the result immediately.

All you have to do is write each number separated by spaces or by a comma. If you are going to enter a decimal number, you will have to use the point as decimal separator (example: 3.14).

What is variance

Calculate variance

The variance (σ2) of a random variable is a measure of dispersion used in probability theory and is defined as the expectation of the square of the deviation of that variable from its mean.

Variance can also be defined as the arithmetic mean of the square of the deviations from the mean of a statistical distribution.

Finally, we can look at the variance as the square of the standard deviation.

Variance formula

For to calculate the variance, the following formula must be applied mathematics:

Formula for calculating the variance

How to calculate the variance

To calculate the variance in a simple way, the following steps can be followed:

  1. Calculate the average or the average of the numbers involved.
  2. Subtract the average obtained from each number and square the result.
  3. Calculate the average of the previous results.

That way you can calculate the variance in a simple and fast way.

Solved exercise to calculate variance

Imagine that we have the following set of numbers and we want to to obtain the value of the variance:

2, 4, 6, 8, 10

We will follow the steps seen in the previous step one by one, therefore, the first thing we must do is to obtain the arithmetic mean of the set of values:

x̄ = (2 + 4 + 6 + 8 + 10) / 5 = 6

The next step consists of subtract the value of the average from each number we have obtained and square it:

(2 - 6)2 = 16

(4 - 6)2 = 4

(6 - 6)2 = 0

(8 - 6)2 = 4

(10 - 6)2 = 16

The following we calculate the average of the previous resultswhich will give us the variance:

σ2 = (16 + 4 + 0 + 4 + 16 ) / 5 = 8

Easy, isn't it?

Calculate variance in Excel

As it could not be otherwise, we can also calculate the variance in Excel. To do so, we can make use of several functions depending on what we want to calculate.

If what we want is to calculate the variance as a function of the entire population, ie, all arguments represent the total populationthen we have to use the following function:


If, on the other hand, we find that data represent a sample of the populationthen we will have to use the following formula in excel that will give us as a result the sample variance:


Sample variance

When we talk about sample variance we are taking into account the calculation of the variance from a sample and not from the entire total population.

In this case, we have to apply the following mathematical formula:

Sample variance formula

Leave a Comment

Information on data protection

  • Responsible: Ignacio Cuesta
  • Purpose of processing: Spam control, comment management, etc.
  • Legitimation: Your consent
  • Communication of data: Data will not be communicated to third parties except by legal obligation.
  • Rights: Access, rectification, portability, forgetfulness.
  • Contact us:
  • Additional information: More information at our privacy policy.