Function · Forecasting and trends

Excel CORREL function

The Excel CORREL function returns the Pearson correlation of two ranges. Sales that are exactly twice the ad spend correlate at 1. Reverse the sales and the correlation is -1.

All current Excel versions. Also in Excel for the web and Google Sheets.

Syntax =CORREL(array1, array2)

CORREL
=CORREL(A2:A5,B2:B5)

Arguments

NameRequiredWhat to pass
array1RequiredThe first range. Text, blanks, and logicals are ignored, and the paired cell in array2 is ignored with them.
array2RequiredThe second range. It does not have to be the same shape on the sheet, but the values that remain must pair up.

Examples

Weekly ad spend and sales that move in exact proportion

=CORREL(A2:A5,B2:B5)

Result 1

=CORREL(B2:B5,C2:C5)B6
Ads
ABC
1WeekAdsSales
21100200
32200400
43300600
54400800
6Correlation1
A picture of the sheet, not a live calculator. A correlation of 1 is a straight line with a positive slope. It is not proof that the ads caused the sales.

CORREL returns the Pearson correlation, a number from -1 to 1. Ad spend of $100, $200, $300, and $400 with sales of exactly twice that is a straight line sloping up, and the correlation is 1. Reverse the sales and the line slopes down, and the correlation is -1. Zero would mean no linear relationship. A value near 1 still does not mean the ads caused the sales. It means the two columns moved together in a straight line.

Text and blanks are dropped in pairs. A missing sales figure should be a blank in both columns or in neither, or you will pair the wrong weeks. If one column does not vary, there is nothing to correlate and the result is #DIV/0!. FORECAST.LINEAR uses the same pairs when you want a predicted number rather than the strength of the line.