CORREL, PEARSON and what r means
=CORREL(array1, array2) takes two ranges of equal length with matching pairs in the same rows. The order of the arrays does not matter. Behind the function is r = covariance ÷ (standard deviation of x × standard deviation of y), which you can check with =COVARIANCE.S(B2:B13,C2:C13)/(STDEV.S(B2:B13)*STDEV.S(C2:C13)). The example returns 0.971 all three ways.
Common rough labels for |r| are: below 0.3 weak, 0.3 to 0.7 moderate, above 0.7 strong. These are conventions; what counts as strong depends on the field. A correlation of 0.3 between a customer trait and churn can be very useful, while two sensors measuring the same thing should correlate above 0.99. The sign gives the direction: negative r means one variable tends to fall as the other rises.
R², slope and the link to regression
=RSQ(C2:C13,B2:B13) returns R², the square of r: 0.944 here, meaning that a straight line through the points explains 94.4% of the variation in weekly orders. R² is the same number that a trendline in a chart or LINEST reports for a simple regression.
Correlation is symmetric and unit-free; regression is not. =SLOPE(C2:C13,B2:B13) says how many orders go with each extra 1k of ad spend, 38.8 in the example, and it changes if you swap x and y. Use r to describe the strength of a relation and the slope to describe its size.
A quick way to see both at once is a scatter chart with a linear trendline: tick "Display R-squared value on chart" in the trendline options and the chart shows the same 0.944. If you need correlations between many columns, such as five marketing channels and revenue, the Analysis ToolPak's Correlation tool builds the full matrix in one step; with formulas, combine CORREL with INDEX or fixed references and fill the grid. A correlation matrix is symmetric, with 1 on the diagonal, because each variable correlates perfectly with itself.
Worked example: twelve weeks of ad spend and orders
Ad spend and orders are yellow. Columns D and E rank both variables for Spearman's coefficient; the summary calculates r three ways, R², the t test and the slope.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Week | Ad spend (k) | Orders | Rank spend | Rank orders |
| 2 | W1 | 2.0 | 210 | 3.0 | 3.0 |
| 3 | W2 | 3.5 | 265 | 7.0 | 7.0 |
| 4 | W3 | 1.5 | 190 | 2.0 | 2.0 |
| 5 | W4 | 4.0 | 300 | 9.0 | 10.0 |
| 6 | W5 | 2.5 | 228 | 5.0 | 4.0 |
| 7 | W6 | 5.0 | 330 | 12.0 | 11.0 |
| 8 | W7 | 3.0 | 262 | 6.0 | 6.0 |
| 9 | W8 | 4.5 | 290 | 10.0 | 9.0 |
| 10 | W9 | 1.0 | 175 | 1.0 | 1.0 |
| 11 | W10 | 3.8 | 270 | 8.0 | 8.0 |
| 12 | W11 | 2.2 | 240 | 4.0 | 5.0 |
| 13 | W12 | 4.8 | 345 | 11.0 | 12.0 |
| 14 | |||||
| 15 | Summary | Value | |||
| 16 | Pearson r (CORREL) | 0.971 | |||
| 17 | Pearson r (PEARSON, same result) | 0.971 | |||
| 18 | r from covariance ÷ (SD × SD) | 0.971 | |||
| 19 | R² (RSQ) | 0.944 | |||
| 20 | n (pairs) | 12 | |||
| 21 | t statistic = r × √((n − 2) ÷ (1 − r²)) | 12.93 | |||
| 22 | p-value, two-tailed (T.DIST.2T) | 0.000 | |||
| 23 | Spearman rank correlation (CORREL of ranks) | 0.979 | |||
| 24 | Slope: extra orders per 1k ad spend (SLOPE) | 38.8 | |||
- E16
=CORREL(B2:B13,C2:C13)Pearson correlation coefficient - E18
=COVARIANCE.S(B2:B13,C2:C13)/(STDEV.S(B2:B13)*STDEV.S(C2:C13))Definition check - E19
=RSQ(C2:C13,B2:B13)R² = r² - E21
=E16*SQRT((E20-2)/(1-E16^2))t statistic for r - E22
=T.DIST.2T(ABS(E21),E20-2)Two-tailed p-value - D2
=RANK.AVG(B2,$B$2:$B$13,1)Ascending rank, ties averaged - E23
=CORREL(D2:D13,E2:E13)Spearman rank correlation
Fictional weekly data. A p-value shown as 0.000 means below 0.0005.
Is the correlation significant?
With few data points, a sizeable r can appear by chance. Test it with t = r × √((n − 2) ÷ (1 − r²)) and n − 2 degrees of freedom. In Excel: =E16*SQRT((E20-2)/(1-E16^2)) gives t = 12.93, and =T.DIST.2T(ABS(E21),E20-2) gives the two-tailed p-value, about 0.00000014. Below 0.05, the correlation is called significant at the 5% level.
Significance depends heavily on n. With 12 pairs, r must exceed about 0.58 to reach p < 0.05; with 100 pairs, about 0.2 is enough; with thousands of rows almost any correlation is significant but may be too small to matter. Report r together with n and the p-value, not the p-value alone.
Spearman rank correlation and the pitfalls
Pearson r measures linear relations and is sensitive to outliers: a single extreme point can make r look strong or weak. Spearman's rank correlation uses ranks instead of values. Excel has no SPEARMAN function, but you can rank both columns with =RANK.AVG(B2,$B$2:$B$13,1) and apply CORREL to the ranks. RANK.AVG gives tied values their average rank, which is what the Spearman method requires. Use Spearman for monotonic but curved relations, ordinal data such as ratings, or data with outliers.
Always plot a scatter chart before trusting r: very different patterns, including a curve or two clusters, can share the same coefficient. And remember that correlation is not causation. In the example, ad spend may have been raised in weeks with seasonal demand, so both variables follow a third one. Only an experiment, such as switching ads off in a test region, shows the causal effect.
Common mistakes
- Misaligned rows. CORREL pairs values by position. If one column is sorted and the other is not, the result is meaningless.
- Reading r as a percentage. r = 0.5 does not mean 50% explained. R² = 0.25 means 25%.
- Treating correlation as causation. A third factor, such as season, can drive both variables.
- Skipping the scatter chart. Outliers and curved patterns can distort r completely.
- Ignoring sample size. r = 0.5 with 8 points is not significant; with 200 points it is. Always report n.
- Using RANK.EQ for Spearman with ties. Tied values need average ranks, so use RANK.AVG.
Frequently asked questions
How do I calculate the correlation coefficient in Excel?
Use =CORREL(range1, range2) with two ranges of equal length that hold matching pairs. PEARSON returns the same value.
What is the difference between CORREL and RSQ?
CORREL returns r, the correlation coefficient between -1 and 1. RSQ returns r squared, the share of variation explained by a straight line, between 0 and 1.
How do I find the p-value of a correlation in Excel?
Calculate t = r × SQRT((n - 2) / (1 - r^2)) and then =T.DIST.2T(ABS(t), n - 2). A p-value below 0.05 means the correlation is significant at the 5% level.
How do I calculate Spearman correlation in Excel?
Rank each column with RANK.AVG and apply CORREL to the two rank columns. Excel has no dedicated Spearman function.
What is a good correlation coefficient?
It depends on the field. As a rough guide, absolute values above 0.7 are called strong and below 0.3 weak, but even weak correlations can be useful and strong ones can be spurious.