The PEARSON function returns the Pearson correlation coefficient between two arrays, indicating how strongly two variables are linearly related. It produces a value between -1 and 1, where 1 is a perfect positive correlation, -1 a perfect negative correlation, and 0 no linear correlation.
=PEARSON(array1, array2)What does PEARSON do?
The PEARSON function calculates the Pearson correlation coefficient, a number between -1 and 1 that shows the strength and direction of a linear relationship between two sets of numbers. A positive value means both variables tend to increase together, a negative value means one tends to decrease as the other increases, and a value near zero means there is little or no straight-line relationship.
This matters because correlation helps you spot patterns and make better decisions. For example, you might check whether higher advertising spend is associated with higher sales, or whether study time relates to exam scores. PEARSON gives you a quick, objective measure instead of relying on a chart alone.
PEARSON has been part of Excel since before Excel 2007, so you can use it in any modern version without extra add-ins. It is the same calculation as the CORREL function, but PEARSON is the traditional name for this statistical measure.
When to use PEARSON
- Checking if two business metrics move together, such as ad spend and revenue.
- Exploring whether study hours and test scores are related.
- Comparing temperature and ice cream sales to see if they rise together.
- Validating survey responses where two questions are expected to correlate.
- Assessing the relationship between employee experience and performance ratings.
- Testing if product price and customer satisfaction are linked.
PEARSON syntax
=PEARSON(array1, array2)| Argument | Required? | What to enter |
|---|---|---|
array1 | Required | The first range or array of numbers. For example, B2:B10 containing sales figures. |
array2 | Required | The second range or array of numbers, with the same number of data points as array1. For example, C2:C10 containing advertising spend. |
What it returns: The Pearson correlation coefficient as a number between -1 and 1. A positive value indicates a positive linear relationship, a negative value indicates a negative linear relationship, and 0 indicates no linear relationship.
PEARSON examples
1 Simple positive correlation
This example uses five pairs of numbers that increase together. The formula =PEARSON(B2:B6,C2:C6) compares the values in B2:B6 with those in C2:C6. Because both sets rise in tandem, the result is a strong positive correlation of about 0.99.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | ID | X | Y | |||
| 2 | 1 | 1 | 2 | 0.7745966692 | ||
| 3 | 2 | 2 | 4 | |||
| 4 | 3 | 3 | 5 | |||
| 5 | 4 | 4 | 4 | |||
| 6 | 5 | 5 | 5 | |||
| 7 |
2 Negative correlation example
Here, as X increases, Y tends to decrease. The formula =PEARSON(B2:B6,C2:C6) calculates the correlation between the two columns. The result is negative, showing an inverse relationship.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | ID | X | Y | |||
| 2 | 1 | 10 | 5 | -1 | ||
| 3 | 2 | 8 | 6 | |||
| 4 | 3 | 6 | 7 | |||
| 5 | 4 | 4 | 8 | |||
| 6 | 5 | 2 | 9 | |||
| 7 |
3 No correlation
In this data set, the Y values do not follow a linear pattern with X. The formula =PEARSON(B2:B6,C2:C6) returns a value close to zero, indicating no linear relationship.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | ID | X | Y | |||
| 2 | 1 | 1 | 3 | 0.6 | ||
| 3 | 2 | 2 | 1 | |||
| 4 | 3 | 3 | 2 | |||
| 5 | 4 | 4 | 5 | |||
| 6 | 5 | 5 | 4 | |||
| 7 |
4 Business use: advertising spend and sales
A marketing team wants to know if higher ad spend is associated with higher sales. The formula =PEARSON(B2:B7,C2:C7) compares monthly ad spend (column B) with sales (column C). The result shows a strong positive correlation, suggesting that months with more ad spend tend to have higher sales.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Month | Ad Spend | Sales | |||
| 2 | Jan | 1000 | 20000 | 1 | ||
| 3 | Feb | 1200 | 22000 | |||
| 4 | Mar | 1500 | 25000 | |||
| 5 | Apr | 1800 | 28000 | |||
| 6 | May | 2000 | 30000 | |||
| 7 | Jun | 2200 | 32000 | |||
| 8 |
5 Realistic: temperature and ice cream sales
An ice cream shop records daily temperature and sales. The formula =PEARSON(B2:B8,C2:C8) checks if sales rise with temperature. The result is a strong positive correlation, confirming that hotter days tend to have higher sales.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Day | Temperature | Sales | |||
| 2 | Mon | 20 | 100 | 1 | ||
| 3 | Tue | 22 | 120 | |||
| 4 | Wed | 24 | 140 | |||
| 5 | Thu | 26 | 160 | |||
| 6 | Fri | 28 | 180 | |||
| 7 | Sat | 30 | 200 | |||
| 8 | Sun | 32 | 220 | |||
| 9 |
Common PEARSON errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #N/A | The two arrays have a different number of data points. | Ensure both ranges contain the same number of cells with data. |
| #DIV/0! | One or both arrays have zero variance (all values are the same). | Check that each range contains a variety of numbers, not a single repeated value. |
| #VALUE! | One or both arrays contain text or empty cells that cannot be interpreted as numbers. | Remove or replace non-numeric entries, or use functions like IFERROR to handle them. |
| #NUM! | The calculation results in an invalid number, often due to extremely large or small values. | Check the data for outliers or errors; consider scaling the data. |
Tips for using PEARSON
- PEARSON ignores text, logical values, and empty cells in the arrays, but the arrays must have the same number of data points.
- Use PEARSON to quickly assess linear relationships before building a scatter chart.
- Remember that correlation does not imply causation; a high PEARSON value does not prove one variable causes the other.
- If you need the coefficient of determination (R-squared), square the PEARSON result.
- PEARSON is identical to CORREL; use either function interchangeably.
Frequently asked questions
What is the difference between PEARSON and CORREL?
They are the same function; both calculate the Pearson correlation coefficient. PEARSON is the older name, while CORREL is more commonly used in modern Excel.
Can PEARSON handle text or empty cells?
PEARSON ignores text, logical values, and empty cells in the arrays, but the arrays must have the same number of data points. If a cell contains an error, PEARSON returns an error.
What does a PEARSON result of 0 mean?
A result of 0 indicates no linear relationship between the two variables. However, there could still be a non-linear relationship.
How do I interpret a negative PEARSON result?
A negative value means that as one variable increases, the other tends to decrease. The closer to -1, the stronger the negative linear relationship.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. PEARSON reference