Covariance Calculator
Find the sample and population covariance between two equal-length lists of paired values.
Sample covariance divides the sum of (x − x̄)(y − ȳ) by n − 1; the population version divides by n. A positive value means the two variables tend to rise together.
How it works
Covariance measures how two variables move together. When above-average x values tend to line up with above-average y values, the covariance is positive; when one rises as the other falls, it's negative; and when there's no consistent pattern, it hovers near zero.
The calculation pairs up your two lists, finds the mean of each, then averages the products of the paired deviations (x − x̄)(y − ȳ). Sample covariance divides that sum by n − 1, while population covariance divides by n. This tool reports both and reminds you if the lists aren't the same length.
Covariance shares a sign with correlation but not a scale — its size depends on the units of x and y, so a big number doesn't automatically mean a strong relationship. If you want a unit-free strength from −1 to 1, standardize it into a correlation coefficient.
Frequently asked questions
What's the difference between sample and population covariance?
Both average the products of paired deviations, but sample covariance divides by n − 1 and population covariance divides by n. Use the sample version when your data is a sample meant to estimate a larger group, and the population version when you have the entire group.
What does a positive or negative covariance tell me?
A positive value means the two variables tend to increase together; a negative value means one tends to rise as the other falls. A value near zero suggests no consistent linear relationship between them.
Why isn't covariance the same as correlation?
Correlation is covariance rescaled by the two standard deviations, which strips out the units and pins the result between −1 and 1. Covariance keeps its units, so its magnitude alone can't tell you how strong the relationship is.