
Variance Calculator
Easily calculate the variance, standard deviation, and mean of any sample or population data set. Get step-by-step solutions with our Variance Calculator!
| Sample | Population | |
|---|---|---|
| Variance | σ2 = 28.5 | s2 = 24.9375 |
| Standard Deviation | σ = 5.3385 | s = 4.9937 |
| Count | n = 8 | n = 8 |
| Mean | μ = 18.25 | x̄ = 18.25 |
| Sum of Squares | SS = 199.5 | SS = 199.5 |
There was an error with your calculation.
Last updated: June 26, 2026
Table of Contents
- Variance as a variability measure
- The rules for using this calculator
- The formula for variance: population variance vs. sample variance
- Steps to calculate the variance
- Example of Variance Calculation for a Sample
- The significance of variance
Variance as a variability measure
When analyzing a dataset, a fundamental aspect of statistical inference is measuring how much the data varies from its average. The most popular metrics for measuring this variability are:
- Variance is the average of the squared deviations from the mean.
- Standard deviation is the square root of the variance. Standard deviation is a commonly used metric to measure dispersion and overall variability.
- The coefficient of variation, also known as the relative standard deviation. The coefficient of variation is calculated as the ratio of the standard deviation σ to the mean μ, or $C_v=\frac{\sigma}{\mu}$.
Our online variance calculator easily finds the variance of a given data set and provides a detailed, step-by-step breakdown of the calculation process.
The rules for using this calculator
The variance calculator accepts input as a list of numbers separated by a delimiter. A few examples of supported formatting are shown in the table below:
| row input | column input | column input | column input |
|---|---|---|---|
| 44, 63, 72, 75, 80, 86, 87, 89 | 44 | 44, | 44,63,72 |
| 44 63 72 75 80 86 87 89 | 63 | 63, | 75,80 |
| 44,, 63,, 72, 75, 80, 86, 87, 89 | 72 | 72, | 86,87 |
| 44 63 72 75, 80, 86, 87, 89 | 75 | 75, | 89 |
| 44; 63; 72, 75,, 80, 86, 87, 89 | 80 | 80, | |
| 44,,, 63,, 72, 75, 80, 86, 87, 89 | 86 | 86, | |
| 44 63,, 72,,,, 75, 80, 86, 87, 89 | 87 | 87, | |
| 89 | 89, |
You can separate numbers using a comma, a space, a line break, or a combination of these delimiters. You can use either a row or a column format. For all the data formats shown in the table above, the calculator accurately processes the input as 44, 63, 72, 75, 80, 86, 87, and 89.
After entering your data, choose whether it represents a sample or a full population. Once you hit the calculate button, the tool displays five core statistical parameters: count (number of observations), mean, sum of squared deviations, variance, and standard deviation.
This calculator is specifically designed to calculate the variance of a data set. Furthermore, it provides valuable insight into the underlying statistical theory by clearly showing all the steps involved.
For highly reliable statistical inferences, it is always preferable to use a large data set. However, it is often impractical to obtain population data representing all possible observations. Because of this, statisticians typically take a "sample" from the population, allowing conclusions about the entire population to be drawn directly from the sample data.
Variance measures a dataset's average dispersion relative to its mean. It is traditionally denoted by σ² for a population and by s² for a sample. A larger value of σ² or s² indicates a wider dispersion of data points from the mean, whereas a smaller value indicates that the data points are grouped closely around the mean.
Consider the following example data sets:
(Set I) 11, 3, 5, 21, 10, 15, 20, 25, 13, 26, 27,
(Set II) 12, 14, 14, 15, 15, 16, 16, 17, 18, 19, 20
Plugging Set I into the variance calculator yields:
n=11
x̄=16
SS=704
s²=70.4
s=8.39
for a sample, and
n=11
μ=16
SS=704
σ²=64
σ=8
for the population.
Similarly, plugging Set II into the calculator yields:
n=11
x̄=16
SS=56
s²=5.6
s=2.36
for a sample, and
n=11
μ=16
SS=56
σ²=5.09
σ=2.25
for the population.
- In Set I, the numbers deviate significantly from the sample mean, resulting in a higher variance:
s²=70.4
σ²=64
- In Set II, the overall variability is much smaller:
s²=5.6
σ²=5.09
The formula for variance: population variance vs. sample variance
Population variance
In statistics, a population refers to all possible observations within an experiment. For N observations, the population variance formula is:
$$\sigma^2=\frac{\sum_{i}^{N}{{(x_i-\ \mu)}^2\ }}{N}$$
where:
- σ² is the population variance,
- Σ represents the summation,
- xᵢ is each individual observation,
- μ is the population mean,
- N is the total number of observations in the population.
Sample variance
The sample variance is defined by the following formula:
$$s^2=\frac{\sum_{i}^{n}{{(x_i-\ \bar{x})}^2\ }}{n-1}$$
where:
- s² is the sample variance,
- Σ represents the summation,
- xᵢ is each individual observation,
- x̄ is the sample mean,
- n is the total number of observations in the sample.
Steps to calculate the variance
Calculating variance manually involves the following standard steps:
Step 1: Calculate the sample or population mean. This is the sum of all data points divided by the number of data points (n for a sample and N for a population), i.e.,
Sample mean:
$$\bar{x}=\frac{\sum_{i=1}^{n} x_i}{n}$$
Population mean:
$$\mu=\frac{\sum_{i=1}^{N} x_i}{N}$$
Step 2: Calculate the individual deviations by subtracting the sample or population mean from each data point, i.e.,
Sample deviations:
$$(x_1-\bar{x}), (x_2-\bar{x}), (x_3-\bar{x}), \ldots, (x_n-\bar{x})$$
Population deviations:
$$(x_1-\mu), (x_2-\mu), (x_3-\mu), \ldots, (x_N-\mu)$$
Step 3: Calculate the squared deviations for each data point.
Sample squared deviations:
$$(x_1-\bar{x})^2, (x_2-\bar{x})^2, (x_3-\bar{x})^2, \ldots, (x_n-\bar{x})^2$$
Population squared deviations:
$$(x_1-\mu)^2, (x_2-\mu)^2, (x_3-\mu)^2, \ldots, (x_N-\mu)^2$$
Step 4: Calculate the sum of the squared deviations.
Sample sum of squared deviations:
$$SS=\sum_{i=1}^{n}(x_i-\bar{x})^2$$
Population sum of squared deviations:
$$SS=\sum_{i=1}^{N}(x_i-\mu)^2$$
Step 5: Divide the sum of the squared deviations by n-1 for a sample and N for the population to find the final variance.
Sample variance:
$$s^2=\frac{SS}{n-1}$$
Population variance:
$$\sigma^2=\frac{SS}{N}$$
Example of Variance Calculation for a Sample
Let's consider a practical example using the following data set: 1, 2, 4, 5, 6, and 12. To calculate the sample variance, we follow these steps:
Step 1: Compute the sample mean (average).
$$\bar{x}=\frac{1+2+4+5+6+12}{6}=\frac{30}{6}=5$$
Step 2: Compute the deviations from the mean for each data point.
| x₁-x̄ | x₂-x̄ | x₃-x̄ | x₄-x̄ | x₅-x̄ | x₆-x̄ |
|---|---|---|---|---|---|
| 1 - 5 | 2 - 5 | 4 - 5 | 5 - 5 | 6 - 5 | 12 - 5 |
| -4 | -3 | -1 | 0 | 1 | 7 |
Step 3: Compute the squares of the deviations.
| (x₁-x̄)² | (x₂-x̄)² | (x₃-x̄)² | (x₄-x̄)² | (x₅-x̄)² | (x₆-x̄)² |
|---|---|---|---|---|---|
| 16 | 9 | 1 | 0 | 1 | 49 |
Step 4: Sum the squared deviations.
$$SS=\sum_{i=1}^{n}{(x_i-\bar{x})}^2=16+9+1+0+1+49=76$$
Step 5: Calculate the sample variance by dividing the sum of squared deviations by the degrees of freedom (n-1).
$$s^2=\frac{SS}{n-1}=\frac{76}{6-1}=\frac{76}{5}=15.2$$
For a population, you would divide by N (the total number of data points) rather than n-1 to calculate the population variance.
The significance of variance
Variance and dispersion are crucial metrics in the world of investing. They empower asset managers to optimize their investment performance and manage portfolios effectively. Financial analysts heavily rely on variance to evaluate the individual risk and historical performance of specific assets within an investment portfolio.
When considering a new purchase, investors calculate variance to determine whether a potential investment is worth the associated risk. Dispersion metrics help analysts quantify uncertainty—a factor that is nearly impossible to evaluate accurately without variance and standard deviation.
While uncertainty itself isn't directly measurable, variance and standard deviation (the square root of variance) allow investors to determine the perceived volatility and impact a particular stock will have on a broader portfolio.
Beyond finance, variance is an essential tool for scientists, statisticians, mathematicians, and data analysts. It provides profound mathematical insights into experiments and sample populations.
Scientists frequently rely on variance to identify structural differences between test groups, determining whether they are similar enough to test a hypothesis successfully. The higher the variance, the more scattered the values in the data set. Data researchers utilize this information to understand how accurately the mean represents the data set as a whole.
However, one disadvantage of using variance is its sensitivity to large outliers. Because deviations from the mean are mathematically squared, outliers are given disproportionately heavy weight, which can inadvertently distort the data's overall representation.
For this reason, many researchers and financial professionals prefer to work with standard deviation. Because it is calculated as the square root of the variance, standard deviation is expressed in the same units as the original data. It provides a smaller, more intuitive figure that is much easier to interpret while remaining slightly less distorted by extreme outliers.




