The Excel COVARIANCE.P function returns the population covariance of two data sets — the average of the products of each pair's deviations from their means. It measures how two variables vary together.
Syntax
| Argument | Description | |
|---|---|---|
array1 | Required | The first set of values. |
array2 | Required | The second set of values — the same length as array1. |
How to use it
COVARIANCE.P computes the population covariance: it divides by n (the count of pairs) rather than n-1. A positive result means the variables tend to rise together; a negative result means one falls as the other rises.
Covariance reflects both the direction and the scale of the relationship, so its magnitude is hard to interpret on its own. For a standardized, unit-free measure between -1 and 1, use CORREL instead.
Population vs. sample: use COVARIANCE.P for an entire population (divide by n) and COVARIANCE.S for a sample (divide by n-1). The sample version gives a slightly larger magnitude.
Try it: interactive demo
Pick a COVARIANCE.P example to see the formula and its result.
Practice workbook
Frequently asked questions
What is the difference between COVARIANCE.P and COVARIANCE.S?
COVARIANCE.P divides by n (the whole population), while COVARIANCE.S divides by n-1 (a sample). The sample version returns a slightly larger value.How do I interpret the sign of covariance?
Why use CORREL instead of covariance?
CORREL standardizes covariance to a -1 to 1 range, making the strength of the relationship comparable.Is COVARIANCE.P the same as the old COVAR?
COVAR function computed the population covariance, so COVARIANCE.P is its direct modern replacement.Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class