Category: FUNCTION | Updated: 2026-11-22
How to Use the CORREL Function in Google Sheets | Calculate the Correlation Coefficient
Syntax
=CORREL(data_y, data_x)
- data_y: The range representing the array or matrix of dependent data (outcome).
- data_x: The range representing the array or matrix of independent data (cause).
Example with a Table
Here is an example of calculating the correlation coefficient between daily high temperature (A2:A6) and ice cream units sold (B2:B6).
| Cell | A (High Temp °C) | B (Units Sold) | C (Metric) | D (Formula) | E (Result) |
|---|---|---|---|---|---|
| 1 | Temp (°C) | Units Sold | Metric | Formula | Result |
| 2 | 22 | 50 | Correlation Coefficient | =CORREL(B2:B6, A2:A6) |
0.992 |
| 3 | 25 | 72 | |||
| 4 | 28 | 95 | |||
| 5 | 30 | 115 | |||
| 6 | 33 | 130 |
The correlation coefficient is 0.992 (very close to 1), indicating a very strong positive correlation between temperature and units sold.
Common Errors and Notes
#N/AError: Occurs ifdata_yanddata_xdo not contain the same number of cells (range size mismatch).#DIV/0!Error: Occurs if there are fewer than 2 valid numeric pairs, or if either dataset has a standard deviation of0(all values are identical).- Correlation vs. causation: Even if the correlation coefficient is high, it does not necessarily mean one caused the other (causation). Creating a scatter plot as well is recommended to visually inspect the distribution.
Frequently Asked Questions
Q. How should I interpret the correlation coefficient returned by CORREL?
A. Values closer to 1 indicate a strong positive correlation (as one increases, the other increases), values closer to -1 indicate a strong negative correlation (as one increases, the other decreases), and values near 0 indicate no correlation.
Q. Does swapping the order of data_y and data_x change the result?
A. No, it does not. CORREL(A2:A10, B2:B10) and CORREL(B2:B10, A2:A10) return the exact same correlation coefficient.