COVARIANCE.P Function

Returns the population covariance of two sets of numbers.

Category

Statistical

Available in

Excel 2010+, Microsoft 365

Returns

A number

Want to practice COVARIANCE.P in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox

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

=COVARIANCE.P(array1, array2) Explain

Arguments

ArgumentRequired?What it does
array1YesThe first range of numbers.
array2YesThe second range, the same size as array1.

Examples

Example 1 — Covariance for the eight months

These eight months are all the data of interest.

E2fx=COVARIANCE.P(B2:B9,C2:C9)
ABCDE
1MonthAd spend ($k)Sales ($k)MeasureResult
2Jan221Population14.375
3Feb325× 8 ÷ 716.43
4Mar533
5Apr428
6May638
7Jun740
8Jul846
9Aug531
=COVARIANCE.P(B2:B9,C2:C9) Explain

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

Kyle Stott

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.