COVARIANCE.P Function

Excel Functions › Statistical

Excel 2010+ Statistical

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.


Quick answer:
=COVARIANCE.P({3,2,4,5,6},{9,7,12,15,17}) ~5.2

Syntax

=COVARIANCE.P(array1, array2)
ArgumentDescription
array1RequiredThe first set of values.
array2RequiredThe 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.P({3,2,4,5,6}, {9,7,12,15,17}) // ~5.2

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

Live demo

Pick a COVARIANCE.P example to see the formula and its result.

Result:

Practice workbook

📊
Download the free COVARIANCE.P practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

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?
A positive covariance means the two variables tend to move in the same direction; a negative one means they move oppositely. A value near zero suggests little linear co-movement.
Why use CORREL instead of covariance?
Covariance depends on the units and scale of the data, so its size is hard to judge. 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?
Yes — the legacy 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

Related functions: COVARIANCE.S · CORREL · PEARSON · VAR.P · SLOPE · RSQ