Practice free

PEARSON function

PEARSON measures how strongly two series move together in a straight line and returns a correlation coefficient between -1 and 1. It gives the same result as CORREL.

Example

Read it as a sentence: find the correlation between the G1:G5 values and the F1:F5 values, which gives 0.774596669.

Practice this in the app

Syntax

PEARSON(array1, array2)

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

Returns: The correlation coefficient between -1 and 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
=PEARSON({2,4,5,4,5},{1,2,3,4,5}) 0.774596669 Array constants
=PEARSON(Data!G1:G5,Data!F1:F5) 0.774596669 Two ranges (y,x order as written)
=PEARSON(Data!I1:I5,Data!H1:H5) 0.866025404 Blank and text-number pairs dropped
=PEARSON(Data!G1:G2,Data!F1:F2) 1 Two pairs
=PEARSON({2,4,5,4,5},Data!F1:F5) 0.774596669 Row vs column same count
=PEARSON(Data!G1:G5,Data!K1:K3) #N/A Different sizes
=PEARSON(Data!G1:G5,Data!J1:J5) #DIV/0! Constant x
=PEARSON(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 of different length give #N/A.
  • Correlation does not prove causation.
  • Blank or text pairs are dropped.

Where it works

Excel
PEARSON 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 .