# COVAR Function

> Calculate the population covariance of two data sets with COVAR, the compatibility version of COVARIANCE.P, in TX Sheet Control: ignored pairs and #N/A.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > COVAR Function
- **224 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/covar/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/covar/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/covar/llms-full.txt

---

Return the population covariance of two data sets. The covariance is the average of the products of the deviations of each pair of values from their means. `known_y` and `known_x` are ranges or arrays with the same number of values; a pair that contains text or a logical value is ignored. Sets of different size return `#N/A`. COVAR is the compatibility version of [COVARIANCE.P](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/covariance-p/llms-full.txt).

### Syntax

```text
COVAR(known_y, known_x, x)
```

Category: Statistics. Minimum arguments: 2. Maximum arguments: 2.

Available for supported offline calculation.

### Examples

```text
=COVAR({1,2,3},{2,4,6})
```

The formula returns 1.3333333333.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [COUPPCD Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/couppcd/llms-full.txt)
- **Next:** [COVARIANCE.P Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/covariance-p/llms-full.txt)
