To determine correlation in Excel, use the CORREL function by entering =CORREL(array1, array2) into a cell, where array1 and array2 are the two sets of data you want to compare. This achieves a Pearson Correlation Coefficient, a number between -1 and 1 that indicates the strength and direction of a linear relationship between two variables. To get an accurate result, you need two columns of numeric data of equal length, ensuring there are no empty cells or text entries within the selected ranges.

What You'll Need

  • Microsoft Excel (any modern version).
  • Two sets of quantitative (numeric) data.
  • Data organized in columns or rows where each pair of values corresponds to the same subject or time point.

Step-by-Step

  1. Prepare Your Data: Organize your data into two adjacent columns. For example, place "Advertising Spend" in Column A and "Total Sales" in Column B. Ensure that every row represents a single entity (e.g., Month 1, Month 2). If you have missing values, delete the entire row for that entity to maintain the alignment of the pairs.
  2. Select Your Output Cell: Click on an empty cell where you want the correlation coefficient to appear. It is often helpful to label this cell first (e.g., type "Correlation Coefficient" in the cell to the left) so you remember what the number represents later.
  3. Enter the CORREL Function: Type =CORREL( into the cell. This initiates the function. Note that Excel is not case-sensitive, so =correl( works as well.
  4. Define the First Array: While the cursor is inside the parentheses, click and drag to highlight the first range of data (e.g., A2:A50). Alternatively, you can type the range manually.
  5. Insert the Separator: Type a comma (,) to separate the first data range from the second. In some regional versions of Excel (such as in parts of Europe), a semicolon (;) is used as the list separator instead of a comma.
  6. Define the Second Array: Click and drag to highlight the second range of data (e.g., B2:B50). Ensure this range is exactly the same size as the first range; if the first range is 49 cells long, the second must also be 49 cells long.
  7. Complete the Formula: Type the closing parenthesis ) and press Enter.
  8. Interpret the Result: Excel will return a decimal value.
    • 1.0: A perfect positive correlation (as one goes up, the other goes up proportionally).
    • -1.0: A perfect negative correlation (as one goes up, the other goes down proportionally).
    • 0: No linear correlation exists between the variables.
    • 0.7 to 0.9: Strong positive correlation.
    • 0.4 to 0.6: Moderate positive correlation.
    • 0.1 to 0.3: Weak positive correlation.

Common Mistakes

One of the most frequent errors is selecting ranges of different sizes. If your first range is A2:A100 but your second range is B2:B99, Excel will return a #N/A error because the function requires paired data. Every single value in the first array must have a corresponding value in the second array.

Another common mistake is attempting to find correlation between categorical data. The CORREL function only works with numbers. If you have data like "High," "Medium," and "Low," you must first convert these into numeric values (e.g., 3, 2, 1) using a Find and Replace or a VLOOKUP table before running the analysis.

Users also frequently confuse correlation with causation. A high correlation coefficient (e.g., 0.85) proves that two variables move together, but it does not prove that one variable causes the other to change. There may be a third, unseen variable influencing both, or the relationship may be entirely coincidental.

Finally, ignoring outliers is a significant mistake. Because the Pearson correlation is based on the mean and standard deviation, a single extreme value (an outlier) can drastically pull the correlation coefficient toward 1 or -1, or push it toward 0, giving a misleading impression of the overall dataset.

Tips

To better visualize the correlation, create a Scatter Plot. Highlight both columns of data, go to the Insert tab, and select the Scatter chart icon. If the dots form a rough line sloping upward, you have a positive correlation; if they slope downward, it is negative. If the dots look like a random cloud, there is likely no correlation.

For a more professional analysis, add a Trendline to your scatter plot. Right-click any data point on the chart and select Add Trendline. In the Trendline options pane, check the box for Display R-squared value on chart. The R-squared value is the square of the correlation coefficient and tells you what percentage of the variance in one variable is explained by the other.

If you have a very large dataset with many variables (e.g., 10 different columns you want to compare against each other), using the CORREL function individually is tedious. Instead, use the Data Analysis Toolpak. Go to File > Options > Add-ins, select Excel Add-ins from the Manage dropdown, click Go, and check Analysis ToolPak. Once enabled, go to the Data tab, click Data Analysis, and choose Correlation. This will generate a correlation matrix showing every possible pair of variables in your selection.

Troubleshooting

If you see a #DIV/0! error, it usually means that one of your data ranges contains constants (the same number repeated over and over). Correlation requires variation; if there is no variance in one of the sets, the mathematical formula attempts to divide by zero, which is impossible.

If you see a #VALUE! error, check your data for non-numeric characters. This often happens when numbers are formatted as text or when there are hidden spaces in the cells. To fix this, select your data columns, go to the Data tab, select Text to Columns, and simply click Finish to force Excel to re-evaluate the cells as numbers.

If the result seems impossibly high or low, check for missing data. If you have blank cells in one column but not the other, Excel may ignore the blank cell but still include the corresponding value in the other column, shifting your pairs and ruining the alignment. The safest method is to use the Filter tool to identify blanks and delete those specific rows entirely.

Frequently Asked Questions

Is CORREL the same as PEARSON?

Yes, the CORREL and PEARSON functions in Excel perform the exact same calculation and will return the same result. CORREL is generally preferred as it is the more modern standard.

Can I use correlation for non-linear relationships?

No, the CORREL function specifically measures linear correlation. If your data follows a curve (like a U-shape), the CORREL function might return a value near 0, even though a strong non-linear relationship exists. In such cases, a scatter plot is essential for discovery.

What does a correlation of 0.0 mean?

A result of 0.0 indicates that there is no linear relationship between the two variables. Changes in one variable do not reliably predict changes in the other.

How do I handle data with different scales?

You do not need to normalize your data. The Pearson correlation coefficient is dimensionless, meaning it works perfectly whether you are comparing millimeters to kilometers or cents to millions of dollars.

Does a negative correlation mean the data is bad?

Not at all. A negative correlation is just as strong as a positive one. It simply means the variables move in opposite directions (e.g., as the temperature outside drops, heating bills increase).

What is the difference between correlation and R-squared?

Correlation (r) shows the strength and direction of the relationship. R-squared (r²) shows the proportion of variance shared by the variables. For example, a correlation of 0.7 results in an R-squared of 0.49, meaning 49% of the variance is shared.