The Excel COVAR function calculates the covariance of two supplied sets of values.
Syntax: COVAR( array1, array2 )
Where array1 and array2 are two arrays of numeric values. Note that the Covar function ignores text values and logical values that are supplied as part of an array.
Covar Function Example
Columns A and B of the spreadsheet on the right contain two sets of values. The Covariance of the values in columns A and B of the spreadsheet can be calculated using the Excel Covar function, as follows:
This gives the result 16.633125, which indicates a positive correlation between the two sets of values.
Covar Function Common Errors
If you get an error from the Excel Covar Function, this is likely to be one of the following:
|#N/A||–||Occurs if the two supplied data arrays have different lengths|
|#VALUE!||–||Occurs if one or both of the supplied data arrays are empty|