Practice free

CORREL function

CORREL measures how strongly two series move together in a straight-line way, returning a value from -1 to 1. Close to 1 means they rise together, close to -1 means one rises as the other falls.

Example

Read it as a sentence: find how closely the values in G1:G5 and F1:F5 move together, on a scale from -1 to 1.

Practice this in the app

Syntax

CORREL(array1, array2)

array1 (required)
First set of values.
array2 (required)
Second set, same length.

Returns: The correlation coefficient between two data sets, from -1 to 1.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=CORREL({2,4,5,4,5},{1,2,3,4,5}) 0.774596669 Array constants
=CORREL(Data!G1:G5,Data!F1:F5) 0.774596669 Two ranges (y,x order as written)
=CORREL(Data!I1:I5,Data!H1:H5) 0.866025404 Blank and text-number pairs dropped
=CORREL(Data!G1:G2,Data!F1:F2) 1 Two pairs
=CORREL({2,4,5,4,5},Data!F1:F5) 0.774596669 Row vs column same count
=CORREL(Data!G1:G5,Data!K1:K3) #N/A Different sizes
=CORREL(Data!G1:G5,Data!J1:J5) #DIV/0! Constant x
=CORREL(Data!C1:C5,Data!F1:F5) #N/A Range containing #N/A

The Data sheet these formulas read

A cell that starts with = holds that formula.

Watch out for

  • Arrays must have equal length or you get #N/A.
  • Correlation does not prove one thing causes the other.
  • Pairs with text or blanks are skipped.

Where it works

Excel
CORREL is in every version of Excel from 2007 on.
Google Sheets
Same name, same behaviour for everyday use.

Part of Statistical functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .