How to Use the Variance Calculator
This variance calculator helps you find the sample variance or population variance of a dataset
To use the calculator:
- Enter your data values. You can either type or paste your numbers into the data input field. This calculator accepts data values separated using commas, spaces, tabs, or line breaks. You can also paste values directly from Excel or Google Sheets.
- Select the correct type of data. You should select the Sample option if the data values are drawn from a larger population. However, if the data values represent the entire group you want to study, select the Population option.
- Click Calculate.
The calculator will instantly return the variance, along with a clear, step-by-step solution explaining how to find the variance manually using your own data.
Want to find the standard deviation instead? Just take the square root of the variance or use the standard deviation calculator to get an instant result, with a clear, step-by-step solution.
What Is Variance?
Variance is a measure of dispersion that helps us understand how much the values in a dataset vary from the mean. In other words, it measures the average squared distance between each data value and the mean.
Variance is useful because it helps you understand the spread of data. However, because variance uses squared deviations, its units are also squared. This is why many people also calculate the standard deviation by finding the square root of the variance to express this variation in the original units of the data.
The two common types of variance are:
- Population variance, which measures the spread of all values in an entire population.
- Sample variance, which measures the spread of values in a sample taken from a larger population.
The calculation process is almost the same for both. The main difference is the denominator, where we divide the sum of squared deviations by N for the population variance and by n-1 for the sample variance.
How to Find Variance
Whether you are finding population or sample variance, the basic process is similar:
- Calculate the mean of the data.
- Subtract the mean from each observation.
- Square each deviation.
- Add the squared deviations.
- Divide the sum of squared deviations by N for population data or n − 1 for sample data.
The main difference is the denominator. Population variance divides by the total number of observations, N, while sample variance divides by n − 1.
The sections below explain population and sample variance, the formulas used for each, and how to calculate both types step by step.
Population Variance
The population variance is a measure of dispersion, which tells us how much the entire population varies from the population mean. In statistics, the population variance symbol is σ2.
Since every member of the population is studied, we divide the sum of squared deviations from the population mean by N, where N is the total number of observations in the population.
In simple terms, the population variance tells you the average squared distance between the population values and the population mean.
Population Variance Formula
The population variance formula is:

Where:
- σ² is the population variance.
- μ is the population mean.
- xi is each individual data value.
- N is the total number of values in the population.
- Σ is the summation symbol.
The population variance can also be calculated using an alternative formula, sometimes called the shortcut formula or computational formula. This formula is common in statistics work because it allows you to quickly find the population variance from summary statistics such as Σxi2, N, and μ.
The shortcut population variance formula is:

Where:
- σ² is the population variance.
- xi is each individual data value.
- Σxi2 is the sum of the squared values.
- μ is the population mean.
- N is the total number of values in the population.
This alternative formula gives the same answer as the main population variance formula. While the main formula is often easier to understand because it clearly shows that variance is based on distance from the mean, the alternative formula can be faster when you already have the sum of squares, Σxi2, and the population mean, μ.
How to Find Population Variance
To find population variance by hand:
- Find the population mean
- Subtract the population mean from each observation, then square each deviation.
- Sum the squared deviations
- Divide the sum of squared deviations by the total number of observations, N.
Example 1.0 Finding Population Variance
Find the population variance for the following dataset: 10, 12, 14, 16, 18.
Solution
Since the values represent the entire group being studied, we use the population variance formula.
To find the population variance of the data manually, follow these steps:
Step 1: Calculate the Population Mean, μ
The population mean formula is: μ = Σxi / N
Substituting the values, the population mean, μ =(10 + 12 + 14 + 16 + 18)/5
= 70/5
= 14
You can also verify the above result using the mean calculator.
Step 2: Subtract the Population Mean from Each Observation and Square the Deviation
Here, we subtract the population mean, μ = 14, from each observation in the population data, and square the results. The table below shows the complete process.
| Observation, xi | Deviation from the mean, xi − μ | Squared deviation, (xi − μ)2 |
|---|---|---|
| 10 | 10 − 14 = -4 | (-4)² = 16 |
| 12 | 12 − 14 = -2 | (-2)² = 4 |
| 14 | 14 − 14 = 0 | 0² = 0 |
| 16 | 16 − 14 = 2 | 2² = 4 |
| 18 | 18 − 14 = 4 | 4² = 16 |
Step 3: Sum the squared deviations
Adding all the values in the (xi − μ)2 column gives Σ(xi − μ)2.
Therefore, Σ(xi − μ)2 = 16 + 4 + 0 + 4 + 16
= 40
Step 4: Divide the Sum of Squared Deviations by N
Recall. The population variance formula is: σ2 = Σ(xi − μ)2 / N
From step 3, Σ(xi − μ)2 = 40 and N = 5, since there are 5 observations in the population data.
Hence, population variance, σ2 = 40/5
= 8
Therefore, the population variance, σ2 = 8
The formula above is usually the easiest way to understand population variance. However, you can also calculate it using the shortcut formula below.
Example 1.1. Population Variance using the Shortcut formula
Recall that the shortcut formula for population variance is: σ2= [Σxi2 − Nμ2] / N
Using the same data from Example 1.0, we can demonstrate that both formulas arrive at the same result.
From Example 1.0, we know that:
- Population size, N = 5
- Population mean, μ = 14
From the shortcut formula, the only unknown value is Σxi2.
To find Σxi2, we need to square each value in the data and add them.
Therefore, Σxi2 = 102 + 122 + 142 + 162 + 182
= 100 + 144 + 196 + 256 + 324
= 1020
Since we now know all the parameter values in the shortcut formula, we can find the population variance as follows:
σ2= [1020− 5(14)2] / 5
= (1020-980)/5
= 40/5
Hence, σ2 = 8
Notice. Both formulas yield the same population variance of 8.
Sample Variance
The sample variance is a measure of dispersion that tells us how much the values in a sample vary from the sample mean. It is commonly used to estimate the population variance when it is not possible or practical to collect data from the whole population. In statistics, the sample variance symbol is s².
Unlike the population variance, which includes every member of the population, the sample variance is based on only part of the population. Because of this, we divide the squared deviations by n − 1 instead of N, where n is the total number of values in the sample data. This adjustment is known as Bessel’s correction.
In simple terms, the sample variance tells you the average squared distance between the sample values and the sample mean, adjusted for the fact that the data are only a sample.
Sample Variance Formula
The sample variance formula is:

Where:
- s² is the sample variance.
- x̄ is the sample mean.
- xi is each individual data value.
- n is the total number of values in the sample.
- Σ is the summation symbol.
Similar to the population variance, there is also a shortcut to calculating the sample variance. The shortcut sample variance formula is:

Where:
- s² is the sample variance.
- xi is each individual data value.
- Σxi2 is the sum of the squared values.
- x̄ is the sample mean.
- n is the total number of values in the sample.
How to Find Sample Variance
To find sample variance by hand:
- Find the sample mean.
- Subtract the sample mean from each observation, then square each deviation.
- Add the squared deviations.
- Divide the sum of squared deviations by n − 1, where n is the sample size.
Example 2.0. Finding Sample Variance
Find the sample variance for the following dataset:
10, 8, 11, 16, 14
Solution
Since the values are treated as a sample drawn from a larger population, we use the sample variance formula. Therefore, to calculate the sample variance for the above data manually, follow these steps:
Step 1: Calculate the Sample Mean, x̄
The sample mean formula is: x̄ = Σxi / n
There are 5 observations in the sample. Hence, n = 5
We can also find the sum of all values as follows:
Σxi = 10 + 8 + 11 + 16 + 14
= 59
Substituting the values into the sample mean formula, x̄ = 59 / 5
= 11.8
Therefore, the sample mean, x̄ = 11.8. You can also verify this result using the mean calculator.
Step 2: Subtract the Sample Mean from Each Observation and Square the Deviation
Next, we need to subtract the sample mean, x̄ = 11.8, from each observation and then square each deviation to obtain (xi − x̄)². The table below shows the complete calculation.
| Observation, xi | Deviation, xi − x̄ | Squared deviation, (xi − x̄)² |
|---|---|---|
| 10 | 10 − 11.8 = -1.8 | (-1.8)² = 3.24 |
| 8 | 8 − 11.8 = -3.8 | (-3.8)² = 14.44 |
| 11 | 11 − 11.8 = -0.8 | (-0.8)² = 0.64 |
| 16 | 16 − 11.8 = 4.2 | (4.2)² = 17.64 |
| 14 | 14 − 11.8 = 2.2 | (2.2)² = 4.84 |
Step 3: Add the Squared Deviations
The term Σ(xi − x̄)² represents the sum of squared deviations.
Adding the values in the final column gives:
Σ(xi − x̄)² = 3.24 + 14.44 + 0.64 + 17.64 + 4.84
= 40.8
Therefore, Σ(xi − x̄)² = 40.8
Step 4: Divide the Sum of Squared Deviations by n − 1
Recall that the sample variance formula is: s² = Σ(xi − x̄)² / (n − 1)
From the previous steps:
- Sum of squared deviations, Σ(xi − x̄)² = 40.8
- Sample size, n = 5. Hence, n-1 = 4
Substituting the values into the sample variance formula gives: s2 = 40.8 / (5 − 1)
= 40.8 / 4
= 10.2
Therefore, the sample variance, s² = 10.2.
Example 2.1. Sample Variance Using the Shortcut Formula
The main sample variance formula shows how variance is calculated from the squared deviations from the sample mean. You can also calculate sample variance using the shortcut formula: s2 = [Σxi2 − nx̄2] / (n − 1)
Using the same dataset from Example 2.0, we can show that the shortcut formula gives the same result.
From Example 2.0, we already know that:
- Sample size, n = 5
- Sample mean, x̄ = 11.8
We only need to find the sum of squared values, Σxi2. To find this value, square each observation and then add the squared values:
Σxi2 = 102 + 82 + 112 + 162 + 142
= 100 + 64 + 121 + 256 + 196
= 737
Therefore, Σxi2 = 737
Notice that Σxi² means square each observation first and then add the results. It is different from (Σxi)², which means adding the observations first and then squaring the total.
Substituting Σxi² = 737, n = 5, and x̄ = 11.8 gives:
s² = [737 − 5(11.8)²] / (5 − 1)
= [737 − 696.2] / 4
= 40.8 / 4
s² = 10.2
Therefore, the sample variance, s² = 10.2.
Notice: Both formulas give the same sample variance of 10.2. The main formula makes it easier to see how variance is based on squared deviations from the mean, while the shortcut formula can reduce the amount of arithmetic required. You can use either method unless the question specifies which formula to use.
Sample Variance vs Population Variance
Both the sample variance and population variance are measures of dispersion (variability). While the population variance measures the actual variability based on all data values in the population, the sample variance measures the variability within the population using a subset of the population called a sample.
The main difference between sample variance and population variance lies in the formula. Specifically, while the sum of squared deviations in the population variance formula is divided by the population size, N, the sum of squared deviations in the sample variance formula is divided by n-1, where n is the sample size. Dividing by n − 1 helps correct the bias that can occur when using sample data to estimate population variance.
The table below provides a quick summary of the key differences between the sample and population variance.
| Feature | Sample Variance | Population Variance |
|---|---|---|
| Symbol | s² | σ² |
| Data used | A sample from a larger population | The entire population |
| Mean used | Sample mean, x̄ | Population mean, μ |
| Denominator | n − 1 | N |
| Purpose | Estimate population spread | Describe the actual population spread |
Relationship Between Variance and Standard Deviation
Variance and standard deviation are closely related measures of dispersion. While the variance measures the average squared distance from the mean, the standard deviation is the square root of the variance.
In other words, Standard deviation = √variance
Frequently Asked Questions
This variance calculator finds the sample variance or population variance of a dataset. It also shows you how to find the variance for your dataset manually, using a step-by-step approach.
Choose Sample Variance if your data values are a sample from a larger population or Population Variance if your data values represent the entire group you want to study.
The sample variance formula is: s² = Σ(xi − x̄)² / (n − 1), where s² is the sample variance, x̄ is the sample mean, xi is each data value, and n is the sample size.
The population variance formula is: σ² = Σ(xi − μ)² / N, where σ² is the population variance, μ is the population mean, xi is each data value, and N is the population size.
Sample variance uses n − 1 because sample data are used to estimate the spread of a larger population. Dividing by n − 1 helps correct the bias that can occur when estimating population variance from a sample.
Standard deviation is the square root of variance. For example, if the variance is 25, the standard deviation is √25 = 5.
