The Excel COVAR function returns the population covariance — the average of the products of paired deviations — measuring how two variables move together. It is the legacy name of COVARIANCE.P, introduced in Excel 2010.
Syntax
| Argument | Description | |
|---|---|---|
array1 | Required | The first range or array of integer values. |
array2 | Required | The second range or array of integer values, the same size as array1. |
How to use it
COVAR returns the population covariance: it pairs each value of array1 with its partner in array2, multiplies their deviations from the respective means, and averages over all n pairs.
A positive result means the variables tend to rise together; a negative result means one rises as the other falls. Because COVAR divides by n (not n−1), its modern equivalent is COVARIANCE.P; for the sample version use COVARIANCE.S.
Use COVARIANCE.P instead: =COVARIANCE.P({3,2,4,5,6},{9,7,12,15,17}) in Excel 2010+ returns the same 5.2. The 2010 release also added COVARIANCE.S for the sample covariance (divides by n−1).
Try it: interactive demo
Pick a COVAR example to see the formula and its result.
Practice workbook
Frequently asked questions
What is the modern replacement for COVAR?
COVARIANCE.P, added in Excel 2010, which computes the same population covariance. =COVARIANCE.P(a,b) equals =COVAR(a,b).Is COVAR the population or sample covariance?
n. For the sample covariance (divide by n−1) use the newer COVARIANCE.S.What does the sign of covariance mean?
How is covariance different from correlation?
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