Skip to content

CORREL

Returns the correlation coefficient between two sets of numbers: a value from -1 to 1 showing how closely they move together.

Syntax

=CORREL(, )

Statistical

All versions of Excel, including Excel for Microsoft 365 and Excel for the web.

Try it

Edit the formula in B8 or change the inputs. The sheet recalculates as you type.

B8
A
B
C
1
Month
Ad spend (k)
Sales (k)
2
Jan
10
120
3
Feb
20
150
4
Mar
30
170
5
Apr
40
210
6
May
50
230
7
8
Correlation
0.995
9

B8 =ROUND(CORREL(B2:B6,C2:C6),3) returns 0.995

How CORREL works

CORREL measures how strongly two sets of numbers move together. It returns a number between -1 and 1. Use it to ask "does ad spend track sales?", "do hours studied predict exam scores?" or "do these two products sell together?".

Reading the result

  • 1 means a perfect positive relationship: when one rises, the other rises in exact proportion.
  • -1 means a perfect negative relationship: when one rises, the other falls in exact proportion.
  • 0 means no straight-line relationship.
  • Values in between show how closely the points follow a straight line. 0.9 and above is strong, around 0.5 is moderate, and below 0.3 is weak. The cut-offs are rules of thumb, and what counts as strong depends on the field.

Squaring the result gives the share of the variation in one series that a straight-line relationship with the other explains. A correlation of 0.995 gives 0.99, or 99%. Excel has RSQ for this directly.

How the arguments work

Values are paired by position: the first value in array1 goes with the first in array2, and so on. The two ranges must be the same size, or CORREL returns #N/A. If a row has text, a blank or a logical value in either range, that pair is left out. If either array is empty, or all the values in one are identical, the result is #DIV/0!, because there is no variation to measure.

Because the correlation of A with B equals the correlation of B with A, the order of the arguments does not matter. That makes CORREL different from SLOPE and INTERCEPT, where order matters.

Correlation is not causation

A high correlation shows that two series move together, not that one causes the other. Two series that both trend upward over time, such as sales and a growing customer base, correlate strongly whatever the link between them. Correlation also measures only straight-line relationships and is distorted by outliers. A single extreme pair can raise or lower the result a lot. Plot the data before relying on the number.

Next steps

To turn a relationship into a prediction, use SLOPE, INTERCEPT or FORECAST.LINEAR. For the spread of each series, see STDEV.S.

Arguments

array1
The first set of values, such as ad spend in B2:B6.
array2
The second set of values, such as sales in C2:C6. It must hold the same number of values as array1, paired by position. Because correlation is symmetric, the order of the two arrays does not matter.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Ad spend against sales

B8 =ROUND(CORREL(B2:B6,C2:C6),3)

Result: 0.995

Sales rise almost in step with ad spend, so the correlation is very close to 1.

B8
A
B
C
1
Month
Ad spend (k)
Sales (k)
2
Jan
10
120
3
Feb
20
150
4
Mar
30
170
5
Apr
40
210
6
May
50
230
7
8
Correlation
0.995
9

B8 =ROUND(CORREL(B2:B6,C2:C6),3) returns 0.995

Example 2

A perfect negative relationship

B8 =ROUND(CORREL(B2:B6,C2:C6),6)

Result: -1

Every price rise of 1 cuts sales by exactly 10 units, so the points sit on a downward straight line.

B8
A
B
C
1
Week
Price
Units sold
2
W1
5
100
3
W2
6
90
4
W3
7
80
5
W4
8
70
6
W5
9
60
7
8
Correlation
-1
9

B8 =ROUND(CORREL(B2:B6,C2:C6),6) returns -1

Example 3

The share of variation explained (r squared)

B8 =ROUND(CORREL(B2:B6,C2:C6)^2,3)

Result: 99.0%

The squared correlation is 0.9899, so about 99% of the variation in sales lines up with ad spend in this small sample.

B8
A
B
C
1
Month
Ad spend (k)
Sales (k)
2
Jan
10
120
3
Feb
20
150
4
Mar
30
170
5
Apr
40
210
6
May
50
230
7
8
r squared
99.0%
9

B8 =ROUND(CORREL(B2:B6,C2:C6)^2,3) returns 99.0%

Example 4

Ranges of different sizes

B8 =CORREL(B2:B6,C2:C5)

Result: #N/A

The sales range stops one row short, so the two arrays have different numbers of values.

B8
A
B
C
1
Month
Ad spend (k)
Sales (k)
2
Jan
10
120
3
Feb
20
150
4
Mar
30
170
5
Apr
40
210
6
May
50
230
7
8
Correlation
#N/A
9

B8 =CORREL(B2:B6,C2:C5) returns #N/A

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In B9, return the correlation between hours studied and test score.

Answer in B9.

B9
A
B
C
1
Student
Hours studied
Test score
2
S1
2
55
3
S2
4
62
4
S3
6
70
5
S4
8
74
6
S5
10
85
7
S6
12
90
8
9
Correlation
10
r squared

Common mistakes

  • The two ranges must be the same size. If one stops a row early, CORREL returns #N/A.
  • Correlation shows that two things move together, not that one causes the other. Two series that both trend upward over time correlate even if they have nothing to do with each other.
  • CORREL measures straight-line relationships only. A curved pattern can have a correlation near 0 even when the link is strong.
  • A single outlier can change the result a lot. Plot the data before trusting the number.
  • Rows where either value is text or blank are dropped in pairs. That can leave fewer pairs than you think, so check the counts.

Questions people ask

What does a correlation of 0.7 mean?

A moderately strong positive relationship: the two series tend to rise together, and about half of the variation (0.7 squared is 0.49) lines up with the other series. What counts as strong depends on your field.

Does the order of the arguments matter in CORREL?

No. `CORREL(B2:B6,C2:C6)` equals `CORREL(C2:C6,B2:B6)`. In SLOPE, INTERCEPT and FORECAST.LINEAR the order does matter.

Why does CORREL return #DIV/0!?

One of the ranges has no numbers, or all of its values are identical, so there is no variation to correlate.

Is correlation the same as causation?

No. A strong correlation can come from a third factor or from a shared trend over time. It is a reason to look closer, not proof of a cause.

How do I get r squared?

Square the correlation, `=CORREL(B2:B6,C2:C6)^2`, or use `=RSQ(C2:C6,B2:B6)`.

Learn CORREL in a real sheet.

Tracks take you from the basics to modelling, one graded exercise at a time.