Covariance Calculator
Calculate sample and population covariance to see how two paired numerical variables vary together.
About covariance
Covariance examples
These paired data sets demonstrate positive, negative, and zero covariance.
| Paired Data | Covariance | Interpretation |
|---|---|---|
| X: 1,2,3,4,5; Y: 2,4,5,4,5 | Sample 1.5; population 1.2 | The two variables generally rise together. |
| X: 1,2,3,4; Y: 8,6,4,2 | Sample -3.33333333; population -2.5 | Y falls consistently as X rises. |
| X: 1,2,3; Y: 4,4,4 | Sample 0; population 0 | Y has no variation, so every centered product is zero. |
How to calculate covariance
- Enter the first variable's observations in their original paired order.
- Enter the matching second-variable observations with the same number of values.
- Select Calculate Covariance to get sample covariance, population covariance, and both means.
- Choose the sample or population result according to whether the data are a sample or the complete population.
Covariance FAQ
What is the difference between sample and population covariance?
Population covariance divides by n because all members are included. Sample covariance divides by n minus 1 to correct estimation bias.
What does negative covariance mean?
It means the variables tend to move in opposite directions around their means. The magnitude depends on measurement units and should not be judged with a universal cutoff.
Is covariance the same as correlation?
No, covariance retains the product of the variables' units. Correlation standardizes covariance and always falls between negative one and positive one.
Why must both lists have equal length?
Covariance is calculated from matched pairs, so every X requires one corresponding Y. Unequal lists leave observations unpaired and do not define the statistic.
Can covariance prove one variable causes another?
No, it only summarizes observed linear co-movement. Confounding, time trends, selection, or coincidence can produce covariance without causation.