This article introduces the COVARIANCE.P function, one of the widely used statistical functions in Excel.

Description: Returns the covariance of a set, the average product of deviations for each pair of data points in two data sets.
Syntax: COVARIANCE.P(array1,array2)
In this context:
- array1: The first range containing integers for which to calculate the covariance, is a required parameter.
- array2: The second range containing integers for which to calculate the covariance, is a required parameter.
Note:
- The parameters must be numbers, names, or reference arrays containing numbers.
- If the reference or array argument contains text, logical values, or empty cells, they will be ignored.
- If array1 and array2 have a different number of data points -> the function returns an error value #N/A
- If either of the arrays is empty -> the function returns an error value #DIV/0
Example:
Calculate the covariance and mean of the product of the deviations for each pair of data points from two datasets in the table below:

- In the cell where you want to calculate, enter the formula =COVARIANCE.P(B6:B10,C6:C10)

- Press Enter -> the covariance and mean of the product of the deviations for each pair of data points from the two datasets are:

- If either of the two arrays contains empty values -> the function returns the error value #DIV/0

- If the number of data points in the two arrays is not the same -> the function returns the error value #N/A

Above are instructions and some specific examples of using the COVARIANCE.P function in Excel.
Wishing you all success!
