# PEARSON Function

> Calculate the Pearson correlation coefficient of two data sets with PEARSON in TX Sheet Control: values from -1 to 1, CORREL and #N/A and #DIV/0! errors.

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

---

Return the Pearson product moment correlation coefficient of two data sets, a value from -1 to 1 that measures how linearly they are related. `known_y` and `known_x` are two arrays or ranges with the same number of values; PEARSON takes two arguments and returns the same result as `CORREL`. Data sets of different lengths return `#N/A`, and a data set whose values are all equal returns `#DIV/0!`.

### Syntax

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

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

Available for supported offline calculation.

### Examples

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

The formula returns 1, because the second data set is exactly twice the first.

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:** [PDURATION Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/pduration/llms-full.txt)
- **Next:** [PERCENTILE Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/percentile/llms-full.txt)
