# COVAR

Spread for WinForms provides advanced software components that support Excel import/export, full cell customization, an extensive calculation engine with over 450 functions and more, all with zero dependencies on Excel.

## Content



This function returns the covariance, which is the average of the products of deviations for each data point pair in two sets of numbers.

## Syntax

COVAR(*array1*,*array2*)

## Arguments

The two arrays of data in the arguments of this function should meet these criteria:

* The data should contain numbers, names, arrays, or references that are numeric. If some cells do not contain numeric data, they are ignored.
* The data sets should be the same size, with the same number of data points.
* The data sets should not be empty, nor should the standard deviation of their values equal zero.

## Remarks

Use this covariance function to determine the relationship between two sets of data. For example, you can examine whether greater income accompanies greater levels of education in a population.
The covariance is calculated as follows, where *n* is the size of the arrays and mu is the mean.
![COVAR Equation](https://cdn.mescius.io/document-site-files/images/0ed25d3e-6b2a-4cf0-8f1b-7ed5ab18cf12/artwork/func-covar.png)

## Data Types

Accepts arrays of numeric data for both arguments. Returns numeric data.

## Examples

`COVAR(J2:J5,L2:L5)`
`COVAR(R2C12:R15C12,R2C14:R15C14)`
`COVAR({7,5,6},{7,4,4})` gives the result 1
`COVAR({5,10,15,20,25},{4,8,16,32,64})` gives the result 144

## Version Available

This function is available in product version 1.0 or later.

## See Also

[CORREL](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsAtoC/FunctionCORREL) \| [VAR](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsTtoZ/FunctionVAR) \| [Statistical Functions](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functsstats)