Variance measures how far data points are spread out from the mean. Comparing variance between two or more data sets in Excel allows you to see which set has a wider spread. A higher variance means there is more variability in the numbers while a lower variance indicates the data points are clustered more closely around the mean.
Table of Contents
Calculating Variance in Excel
There are two main ways to find variance in Excel:
- Using the VAR or VAR.P function
- Manually calculating the variance
Using Excel’s Variance Functions
Excel has two built-in functions for calculating variance:
- VAR: Estimates variance based on a sample. For a full population dataset use VAR.P instead.
- VAR.P: Calculates variance for an entire population of data.
The syntax for both is:
=VAR(number1, [number2], ...)
=VAR.P(number1, [number2], ...)
To find the variance between two data sets:
- Select a blank cell and type
=VAR(
- Select the first data set
- Type a comma (,)
- Select the second data set
- Type
)
and press Enter
For example, to get the variance between the numbers in cells A1:A10 and B1:B10:
=VAR(A1:A10, B1:B10)
This returns the pooled variance between both datasets.
Manually Calculating Variance
You can also manually find the variance with these steps:
- Determine the mean of each dataset
- Subtract the mean from each data point
- Square each result
- Find the average of the squared differences
- Take the square root of the average
Follow along below to see the manual calculation.
Comparing Variance Between Data Sets
Once you’ve found the variance for each set, you can easily compare them to see which has more variability.
For example, here are two data sets:
Data Set 1
| Value |
|-|-
| 5 |
| 7 |
| 10 |
Data Set 2
| Value |
|-|-
| 2 |
| 4 |
| 5 |
| 8 |
| 10 |
The mean (average) of Set 1 is 7.33.
The mean of Set 2 is 5.8.
To find the variance of each:
- Subtract the mean from each data point
- Square the differences
- Find the average of the squared differences
Set 1 Calculations
| Value | Difference from Mean | Squared Difference |
|-|-|-|
| 5 | -2.33 | 5.43 |
| 7 | -0.33 | 0.11 |
| 10 | 2.67 | 7.13 |
|Sum | 0 | 12.67 |
- Average of squared differences = Total Sum / Number of values
- Here: 12.67 / 3 = 4.22
- Take square root to find standard deviation
- SQRT(4.22) = 2.05
Set 2 Calculations
| Value | Difference from Mean | Squared Difference |
|-|-|-|
| 2 | -3.8 | 14.44 |
| 4 | -1.8 | 3.24 |
| 5 | -0.8 | 0.64 |
| 8 | 2.2 | 4.84 |
| 10 | 4.2 | 17.64 |
|Sum | 0 | 40.8 |
- Average of squared differences = Total Sum / Number of values
- Here: 40.8 / 5 = 8.16
- Take square root to find standard deviation
- SQRT(8.16) = 2.86
The variance is the average of the squared differences.
- Set 1 Variance = 4.22
- Set 2 Variance = 8.16
Set 2 has a higher variance between the values and the mean. This indicates there is more variability and spread in the data set compared to Set 1.
Interpreting and Comparing Variance
Key things to know when comparing variance:
- A higher variance means data points are more spread out from the mean
- Lower variance indicates values are clustered more closely around the mean
- Data sets with similar means can have very different variances
- Differences in variance may indicate patterns, changes, or anomalies in the data
For example, Set 1 and Set 2 above have similar means near 5. However, Set 2 has nearly double the variance. This indicates the values fluctuate more widely in Set 2.
When analyzing two data sets:
- Compare means to see if there is a shift in the center point
- Compare variances to see if there is a change in spread
- Differences could indicate patterns, trends, or issues needing investigation
Real-World Examples
Comparing variance is useful in many situations:
Financial Analysis
- Compare variance in sales numbers week-over-week or year-over-year
- Higher variability could indicate unstable performance or external factors affecting sales
Quality Control
- Compare variance in product dimensions or test results over time
- Increased variance could indicate issues with equipment calibration or process consistency
Public Health Surveillance
- Track variance in case counts or mortality rates by region over time
- Spikes in variability may reflect outbreaks or clusters needing intervention
Psychology Research
- Compare pre-test and post-test score variance between treatment and control groups
- Similar means but differences in variance can indicate an effect on performance consistency
Limitations of Variance
While variance reveals spread, there are some key limitations:
- Doesn’t indicate whether extreme scores are positive or negative outliers
- Can be misleading if data contains significant skewness
- Sensitive to extreme scores which may not reflect typical observations
- Doesn’t account for patterns over time such as trends or cycles
Combining variance with visualization methods like scatter plots provides more context for interpretation.