# CORREL in Google Sheets: syntax and examples

URL: https://goingstellar.ro/reference/sheets/correl/

CORREL measures how strongly two sets of numbers move together. The result runs from -1 (opposite) through 0 (no linear link) to 1 (perfect link). It does not prove that one set causes the other.

## Syntax

```
CORREL(data_y, data_x)
```

## Arguments

- `data_y` (range, required: yes): The first set of values.
- `data_x` (range, required: yes): The second set, with the same number of values.

## Examples

The examples use this table, starting in A1:

| Ads | Orders |
|---|---|
| 100 | 12 |
| 200 | 25 |
| 300 | 31 |
| 400 | 48 |
| 500 | 52 |

```
=ROUND(CORREL(B2:B6, A2:A6), 3)
```

Result: `0.985`

Ad spend against orders. A value near 1 means they rise together. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=CORREL(A2:A6, A2:A6)
```

Result: `1`

A set compared with itself is exactly 1. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=CORREL(A2:A6, ARRAYFORMULA(-A2:A6))
```

Result: `-1`

Same numbers with the sign flipped: a perfect negative link, -1. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=ROUND(CORREL(A2:A6, B2:B6)^2, 3)
```

Result: `0.97`

The square of CORREL is R squared: the share of variation explained. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=CORREL(A2:A6, {1;2;3;4;5})
```

Result: `1`

Compare a column with a typed array of 1 to 5. Run in a Google Sheet (English US locale) on 2026-11-29.

## Common errors

- Both sets need the same number of values. Different lengths return #N/A.
- If one set never changes, the correlation is undefined and the result is #DIV/0!.
- A value near 0 means no straight-line link, not no link at all. Plot the data before concluding.

## Compared with Excel

Same syntax and same result as Excel CORREL.

## Related functions

- [FORECAST](https://goingstellar.ro/reference/sheets/forecast/)
- [AVERAGE](https://goingstellar.ro/reference/sheets/average/)
- [MEDIAN](https://goingstellar.ro/reference/sheets/median/)

## Sources

- [CORREL (Docs Editors Help)](https://support.google.com/docs/answer/3093990)

