Variance Calculator


How to use this variance calculator?

To use this variance calculator, follow the steps that are given below.

  • Enter the comma-separated values in the input box.
  • Select for which data you want to calculate variance, i-e (sample or population)
  • Hit the "calculate" button to get the result on the right side.

This variance finder will give you the number of samples, mean, standard deviation, and variance in one click. Using this calculator, you will get step-by-step results of standard deviation, mean, and variance.

Variance --
Number of samples (n) --
Mean --
Standard deviation --
Sum of Squares (SS) --
Calculation of Mean:
Calculation Standard Deviation:
Calculation of Variance:

Get Custom Built Calculator For Your Website

Get Now


Get Variance Calculator For Your Website

Get Now

This variance finder will give you the number of samples, mean, standard deviation, and variance in one click. Using this variance calculator with steps, you will get step-by-step results of standard deviation, mean, and variance.

Variance calculator is an online free tool to calculate the variation of each number in a data set from the mean value of that data set. You can use this tool to understand and solve complex and lengthy variance problems.

What is Variance?

In statistics, the variance of a random variable is the mean value of the squared distance from the mean. It shows the distribution of the random variable by the mean value.

A small variance indicates the distribution of the random variable close to the mean value. If the variance is greater, it shows that the random variable is far from the average value.

For example, the narrow bell curve has a small variance in the normal distribution, and the wide bell curve has a large variance.

Variance Formula:

The population variance of a finite size N population is calculated using the following formula:

population variance formula

Population Variance =σ2=1Ni=1n(xiμ)2=\sigma^2 = \dfrac{1}{N}\displaystyle\sum_{i=1}^n (x_i - \mu)^2  

In this equation, σ2 refers to population variance, xi is the data set of population, μ is the mean of the population data set, and N refers to the size of the population data set.

The following formula is used to calculate the sample variance.

sample variance formula

Sample Variance = s2=1N1i=1n(xixˉ)2=\ s^2 = \dfrac{1}{N-1} \displaystyle\sum_{i=1}^n (x_i - \bar{x})^2  

In this equation, s2 is the sample variance xi is the sample data set is the mean value of a sample set of values, and N refers to the size of the sample data set.

Difference between population and sample:

The term "population" refers to the entire number of relevant observations. Analyzing Tokyo's residents' age, for example, would include the age of every Tokyo resident in the population.

A data sample is a collection of data from a population in statistics. The population is typically very large, making it impossible to list all the values in the population.

The solution is to collect a sample of the population and perform statistics on these samples. These samples then reflect the whole population.

How to find the variance?

Calculating variance manually is a tedious task. You will need the mean of the data set, arithmetic difference, and many additions and subtractions to find variance.

You can also use the population variance calculator above to calculate variance for your set of data. The first example is of population variance and the second example is of sample variance.

Example no 1:

Suppose there are exactly five guest rooms in a hotel. Every room is accommodating the following numbers of people:

x1=6,x2=5,x3=6,x4=7,andx5=4x_1 = 6, x_2 = 5, x_3 = 6, x_4 = 7, \text{and} x_5 = 4

Find variance.


Let's use the formula for the population variance given above.
Variance Formula

Since there is all the information you need in a population, this formula gives you the exact population variance.

Follow these steps to measure the variance for the given data set using this formula.

  • Find the mean of the data set

The symbol μ is the arithmetic mean when analyzing a population. To find the mean, sum up all the values in the data set and divide the sum by the total number of values in the data set.

You may think of mean as the average, but the average is considered differently in various fields.

Mean(=M=xn=(6+5+6+7+45)=285=5.6(= M = \dfrac{\sum x}{n} = \Big({6 + 5 + 6 + 7 + 4}{5}\Big) = \dfrac{28}{5} = 5.6

  • Subtract the mean value from every number in data set

The near to mean data points lead to a difference nearer to zero. Repeat each data point's subtraction problem and you might begin to understand how the data are spread. It is also called arithmetic difference.

x1μ=65.6=0.4x_1 - \mu = 6 - 5.6 = 0.4

x2μ=55.6=0.6x_2 - \mu = 5 - 5.6 = -0.6

x3μ=65.6=0.4x_3 - \mu = 6 - 5.6 = 0.4

x4μ=75.6=1.4x_4 - \mu = 7 - 5.6 = 1.4

x5μ=45.6=1.6x_5 - \mu = 4 - 5.6 = -1.6

  • Take the square of each arithmetic difference

Some of your numbers will be negative right now, and others will be positive. These two categories are numbers on the left of the mean and numbers on the right of the mean if your data is visualized in a number line.

For calculating variance, this is not good since both groups are mutually exclusive. Make them positive by taking the square of each value.

Get (xiμ)2(x_i - \mu)^2 for each value.

(xiμ)2(x_i - \mu)^2 

(0.4)2=0.16(0.4)^2 = 0.16

(0.6)2=0.36(-0.6)^2 = 0.36

(0.4)2=0.16(0.4)^2 = 0.16

(1.4)2=1.96(1.4)^2 = 1.96

(1.6)2=2.56(-1.6)^2 = 2.56

  • Find the mean value of all of these values or use formula

You now have an indirect value for each data point, related to the distance between that data point and the mean. Take the mean by adding all these values and dividing them by the number of values. Note that we have evaluated the terms which are in the formula step by step.

Variance = σ2={0.16+0.36+0.16+1.96+2.565}=5.25=1.04\sigma^2 = \Big\{\dfrac{0.16 + 0.36 + 0.16 + 1.96 + 2.56}{5}\Big\} = \dfrac{5.2}{5} = 1.04

Example no 2:

The shopkeeper sold this number of apples every day for seven days: 42,48,30,36,46,53,62.42, 48, 30, 36, 46, 53, 62.. Use this sample data to calculate the sample variance for the number of apples sold per day by a shopkeeper.

Let's use the formula for the sample variance given above.

sample variance formula

  • Write the formula for sample variance

The variance in a set of data shows how the data points are distributed. If the variance is closer to zero, it means that the points in a data set are close enough. Use the following formula to calculate sample variance when dealing with sample data sets.

We have explained all the terms in the formula above.

  • Compute the mean value for the sample data

The mean of a sample is denoted by . Find the mean value of the sample taken from the shop by adding all values dividing it by the total number of days.

xˉ=xn=42+48+30+36+46+53+627=3177=45.28\bar{x} = \dfrac{\sum x}{n} = \dfrac{42 + 48 + 30 + 36 + 46 + 53 + 62}{7} = \dfrac{317}{7} = 45.28

The sample mean for the given values is 45.28 in this case. We will use this value in the next steps to complete the process. The mean can be considered as the central value of the sample data.

If the data is around the average value or the mean value, there is a minimal variation. If it is distributed far from the mean value, the variance will be high.

  • Subtract the mean value from each number in the data set

Calculate xixˉx_i - \bar{x}, where xi represents the values in the data set. In our example, xi is the number of apples sold each day. Each result of this calculation will describe how far it is from the mean value of the data set.

x1xˉ=4245.28=3.8x_1 - \bar{x} = 42 - 45.28 = -3.8

x2xˉ=4845.28=2.72x_2 - \bar{x} = 48 - 45.28 = 2.72

x3xˉ=3045.28=15.8x_3 - \bar{x} = 30 - 45.28 = -15.8

x4xˉ=3645.28=9.28x_4 - \bar{x} = 36 - 45.28 = -9.28

x5xˉ=4645.28=0.72x_5 - \bar{x} = 46 - 45.28 = 0.72

x6xˉ=5345.28=7.72x_6 - \bar{x} = 53 - 45.28 = 7.72

x7xˉ=6245.28=16.72x_7 - \bar{x} = 62 - 45.28 = 16.72

Your job is easy to check because your answers should be zero if you have these values. That is due to the concept of calculating average because the negative answers, which are the difference from average to smaller numbers, cancel precisely the positive answers.

  • Take a square of each result from the previous step

As discussed above, the sum of all deviations will be zero because of the nature of the mean. This means that the mean deviation is always zero so that nothing tells how the results are distributed.

Find the square of each resulting deviation to resolve this problem. Making all the deviations positive will ensure that summing up will not result in zero.

(x1xˉ)2=3.82=14.44(x_1 - \bar{x})^2 = -3.8^2 = 14.44

(x2xˉ)2=2.722=7.40(x_2 - \bar{x})^2 = 2.72^2 = 7.40

(x3xˉ)2=15.82=249.64(x_3 - \bar{x})^2 = -15.8^2 = 249.64

(x4xˉ)2=9.282=86.11(x_4 - \bar{x})^2 = -9.28^2 = 86.11

(x5xˉ)2=0.722=0.52(x_5 - \bar{x})^2 = 0.72^2 = 0.52

(x6xˉ)2=7.722=59.60(x_6 - \bar{x})^2 = 7.72^2 = 59.60

(x7xˉ)2=16.722=279.56(x_7 - \bar{x})^2 = 16.72^2 = 279.56

For each data point in your sample, now you have the value (xixˉ)2(x_i - \bar{x}) 2.

  • Calculate the sum of all values of (xixˉ)2(x_i - \bar{x}) 2

In this step, we will evaluate the expression (xixˉ)2\sum (x_i - \bar{x})^2, which is the numerator in the formula for sample variance.

The \sum (upper case sigma) refers to the sum of the values. We have already calculated the (xixˉ)2\sum (x_i - \bar{x})^2 expression, now add all the values of (xixˉ)2\sum (x_i - \bar{x})^2 to get the sum.

(xixˉ)2=14.44+7.40+249.64+86.11+0.52+59.60+279.56=697.27\sum (x_i - \bar{x})^2 = 14.44 + 7.40 + 249.64 + 86.11 + 0.52 + 59.60 + 279.56 = 697.27

  • Divide the (xix)2(n1)\dfrac{\sum (x_i - x)^2}{(n - 1)}

There are seven values in the data set in the sample, so n=7n = 7.

Variance of the sample =s2=697.2771=116.21= s^2= \dfrac{697.27}{7 - 1} = 116.21

Remember that because the exponent was present in the variation formula, a squared unit of original data reflects the variance.


Bhandari, P. (2020, October 12). Understanding and calculating variance | Scribbr
How to calculate variance | wikiHow
What is the Difference Between Population and Sample | Statistics Solutions
User Ratings
  • Total Reviews 0
  • Overall Rating 0/5
  • Stars

Thank You! For Your Review

Your Review Will Appear Soon.

Submit Your Review Close
No Review Yet