CORREL function
Returns the correlation coefficient between two sets of numbers, from −1 to +1, showing how strongly they move together in a straight line.
Available in All versions of Excel, Excel for the web, Excel for Mac
In every Excel versionWorks in Google Sheets
Syntax
CORREL(array1, array2)| Argument | What it means | |
|---|---|---|
array1 | Required | The first range of values, e.g. advertising spend. |
array2 | Required | The second range, the same size as array1, e.g. sales. Each position is paired with the same position in array1. |
Returns: A number from −1 to 1 (Pearson's correlation coefficient r).
How CORREL works
CORREL measures how closely two columns of numbers move together. A result near +1 means that when one goes up, the other reliably goes up too (advertising spend and sales). Near −1 means one goes up while the other goes down (price and units sold). Around 0 means there is no straight-line relationship. As a rough guide, 0.7 or more (either sign) is strong, 0.3 to 0.7 is moderate and below 0.3 is weak.
Under the hood it compares how each pair of values sits relative to its own average, then scales the result so it does not depend on units: correlating sales in euros or in thousands of euros gives the same answer. CORREL is identical to PEARSON; squaring it gives the R² that charts show for a linear trendline (RSQ).
Two warnings. Correlation is not causation: ice-cream sales and sunburn are correlated because both follow the weather. And CORREL only detects straight-line patterns; a perfect U-shaped relationship can still give a result close to 0, so always look at a scatter chart too.
Examples
1Advertising spend and sales
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Month | Ad spend (k€) | Sales (k€) | ||
| 2 | Jan | 2 | 41 | 0.9544 | |
| 3 | Feb | 3.5 | 58 | ||
| 4 | Mar | 1.5 | 44 | ||
| 5 | Apr | 4 | 56 | ||
| 6 | May | 3 | 53 | ||
| 7 | Jun | 5 | 66 |
Result: 0.9544
The result 0.9544 (formatted to 4 decimal places) is a strong positive correlation: months with more advertising had clearly higher sales. It does not prove the ads caused the sales (both might follow the season), but it is a good reason to test further.
2Price and units sold move in opposite directions
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Price (€) | Units sold | ||
| 2 | 8 | 520 | -0.9900 | |
| 3 | 9 | 470 | ||
| 4 | 10 | 455 | ||
| 5 | 11 | 400 | ||
| 6 | 12 | 360 |
Result: -0.9900
A value of -0.9900 is a very strong negative correlation: each price increase came with fewer units sold, almost along a straight line.
3Study hours and exam scores
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Student | Hours studied | Score | ||
| 2 | Aya | 2 | 61 | 0.7389 | |
| 3 | Ben | 5 | 74 | ||
| 4 | Cem | 1 | 58 | ||
| 5 | Dora | 8 | 77 | ||
| 6 | Eli | 4 | 80 | ||
| 7 | Fay | 6 | 69 |
Result: 0.7389
The correlation is 0.7389: more study tends to go with higher scores, but Eli (4 hours, 80 points) shows the link is far from perfect. Squaring r gives about 0.55, meaning study hours explain roughly 55% of the variation in scores.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#N/A | The two ranges contain a different number of values. | Make both ranges the same size, e.g. B2:B7 and C2:C7. |
#DIV/0! | One of the ranges is empty or all its values are identical (no variation), so correlation is undefined. | Check that both columns actually vary. |
Tips
- Before trusting r, insert a scatter chart (Insert > Scatter). One extreme outlier can create or hide a correlation.
- To test whether a correlation is real or just chance, compute t = r·√(n−2)/√(1−r²) and get a p-value with
=T.DIST.2T(ABS(t), n-2). - For a whole correlation matrix across many columns, use the Analysis ToolPak's Correlation tool.
Questions
What is a good correlation value?
It depends on the field, but as a rule of thumb |r| ≥ 0.7 is strong, 0.3–0.7 moderate and below 0.3 weak. With small samples even a moderate r can appear by chance.
What is the difference between CORREL and PEARSON?
None in modern Excel; both return the Pearson correlation coefficient. CORREL is the more commonly used name.
How do I get R-squared?
Square the result, =CORREL(B2:B7,C2:C7)^2, or use RSQ. It is the share of the variation in one variable explained by a straight-line relationship with the other.
Google Sheets
CORREL also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
CORREL in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Danish | KORRELATION |
| Dutch | CORRELATIE |
| Finnish | KORRELAATIO |
| French | COEFFICIENT.CORRELATION |
| German | KORREL |
| Hungarian | KORREL |
| Italian | CORRELAZIONE |
| Norwegian (Bokmål) | KORRELASJON |
| Polish | WSP.KORELACJI |
| Russian | КОРРЕЛ |
| Spanish | COEF.DE.CORREL |
| Swedish | KORREL |
| Turkish | KORELASYON |