COVARIANCE.P Function
Returns the population covariance of two sets of numbers.
Category
Statistical
Available in
Excel 2010+, Microsoft 365
Returns
A number
Overview
COVARIANCE.P measures how two sets of numbers move together, treating the pairs as the whole population: it averages the products of each pair's deviations from their means, dividing by n.
Positive means they rise together, negative means one falls as the other rises. Use COVARIANCE.S for a sample.
Syntax
Arguments
| Argument | Required? | What it does |
|---|---|---|
| array1 | Yes | The first range of numbers. |
| array2 | Yes | The second range, the same size as array1. |
Examples
Example 1 — Covariance for the eight months
These eight months are all the data of interest.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Ad spend ($k) | Sales ($k) | Measure | Result |
| 2 | Jan | 2 | 21 | Population | 14.375 |
| 3 | Feb | 3 | 25 | × 8 ÷ 7 | 16.43 |
| 4 | Mar | 5 | 33 | ||
| 5 | Apr | 4 | 28 | ||
| 6 | May | 6 | 38 | ||
| 7 | Jun | 7 | 40 | ||
| 8 | Jul | 8 | 46 | ||
| 9 | Aug | 5 | 31 |
Multiplying by n ÷ (n − 1) converts it to the sample version, COVARIANCE.S.
Common mistakes
- #DIV/0! There are no pairs of numbers.
- #N/A The ranges are different sizes.
Notes
- COVARIANCE.P replaces the older COVAR function.
- Related functions: COVARIANCE.S, CORREL, VAR.P.

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.