Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Check Correlation in Excel: Step-by-Step

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To check correlation in Excel, put your two variables in adjacent columns with one pair per row, then use =CORREL(range1, range2) for a single number, or the Data Analysis ToolPak's Correlation tool for a matrix. The result is a coefficient between -1 and +1: near +1 means the two move together, near -1 means one rises as the other falls, and near 0 means little linear relationship. This guide covers both methods, how to read the output, and the mistakes that produce wrong or misleading numbers.

What You'll Need

  • Excel on Windows, Mac, or Excel for the web. The CORREL function works everywhere; the Analysis ToolPak is a desktop add-in (Windows and Mac) and is not available in Excel for the web.
  • Two columns of numeric data, aligned so each row is one matched pair (for example, hours studied and test score for the same student).
  • At least a few dozen pairs for a meaningful result; small samples can produce strong-looking coefficients by chance.
  • No blank cells, text, or error values inside the ranges you select.

Step-by-Step

Method 1: The CORREL Function (fastest)

  1. Lay out your data with the two variables in separate columns, for example column A for variable X and column B for variable Y, starting at row 2 with headers in row 1.
  2. Click an empty cell where you want the result, such as D2.
  3. Type =CORREL( and then select the first range, for example A2:A101.
  4. Type a comma, then select the second range, for example B2:B101.
  5. Close the parenthesis and press Enter. The formula should look like =CORREL(A2:A101,B2:B101).
  6. Read the result. A value of 0.85 means a strong positive linear relationship; -0.85 means a strong negative one; 0.05 means essentially none.

Both ranges must be the same size and must line up row for row. If A2 pairs with B2, A3 with B3, and so on, the calculation is correct. If the ranges are offset by even one row, the coefficient is meaningless.

Method 2: The Analysis ToolPak Correlation Tool (for matrices)

  1. Enable the add-in. On Windows, go to File > Options > Add-ins, set the Manage dropdown to Excel Add-ins, click Go, tick Analysis ToolPak, and click OK. On Mac, go to Tools > Excel Add-ins and tick the same box. Menu labels can differ slightly by version and region.
  2. On the Data tab, click Data Analysis in the Analysis group.
  3. Select Correlation and click OK.
  4. In Input Range, select all the columns you want compared, including the header row if you tick Labels in first row.
  5. Choose Grouped By Columns if each variable is a column.
  6. Pick an Output Range (an empty area on the same sheet) or New Worksheet Ply.
  7. Click OK. Excel writes a correlation matrix showing every pairwise coefficient.

The matrix is symmetric: the value where row X meets column Y equals the value where row Y meets column X, and the diagonal is always 1 because each variable correlates perfectly with itself.

Adding a visual check

  1. Select both columns, then insert a Scatter chart from the Insert tab.
  2. Look at the shape. A tight straight-line cloud supports a strong linear correlation; a curve, cluster, or fan shape means the single coefficient may hide the real pattern.
  3. Optionally add a trendline: right-click a data point, choose Add Trendline, and tick Display R-squared value on chart. R-squared is the square of the correlation coefficient and shows the share of variation explained.

Common Mistakes

  • Mismatched ranges. Selecting A2:A100 and B3:B101 shifts every pair and scrambles the result. Always check both ranges start and end on the same rows.
  • Leaving blanks or text in the ranges. CORREL ignores pairs where either cell is empty or non-numeric, which silently changes the sample. Clean the data first.
  • Treating correlation as causation. Two variables can move together because a third factor drives both. The coefficient says nothing about cause.
  • Assuming a straight line. CORREL only measures linear relationships. A perfect U-shaped relationship can return a coefficient near zero.
  • Ignoring outliers. A single extreme point can pull the coefficient sharply up or down. Plot the data before trusting the number.
  • Using too few pairs. A handful of rows can produce a dramatic coefficient that will not hold up with more data.

Tips

  • Use =CORREL for a quick single pair and the ToolPak matrix when you have three or more variables to compare at once.
  • Format the result cell to show two or three decimal places so the strength is easy to read.
  • Square the coefficient to get R-squared, which is easier to interpret: 0.7 squared is about 0.49, meaning roughly half the variation is shared.
  • Keep raw data on one sheet and results on another so a re-sort never breaks your formulas.
  • If you need significance testing, use =T.DIST.2T with the t-statistic derived from the coefficient and sample size; note that this is a manual calculation, not a built-in correlation test.

Troubleshooting

  • #N/A error: the two ranges are different sizes. Reselect them so they match exactly.
  • #DIV/0! error: one range has no variation (all values identical) or contains no usable numbers. Check for a constant column.
  • Result looks wrong: confirm the columns are paired by row, not sorted independently. Re-sort both columns together if needed.
  • Data Analysis button missing: the ToolPak is not enabled, or you are in Excel for the web, which does not include it. Use CORREL instead.
  • Numbers stored as text: a green triangle in the corner of cells is the clue. Convert with Data > Text to Columns or multiply by 1 in a helper column.

Frequently Asked Questions

What is a good correlation value?

There is no universal threshold. As a rough guide, absolute values around 0.7 and above are strong, 0.4 to 0.7 moderate, and below 0.3 weak for linear relationships. Context matters more than any cut-off.

Does CORREL work in Excel for the web?

Yes, the CORREL function works in Excel for the web. The Analysis ToolPak add-in does not, so use the function for each pair instead.

Can I correlate more than two columns at once?

Not with a single CORREL formula, which takes exactly two ranges. Use the ToolPak Correlation tool to produce a full matrix, or write one CORREL formula per pair.

Why does my result change when I delete a row?

Deleting a row removes that pair from the calculation, and with small samples one pair can shift the coefficient noticeably. Check that both columns still align after any edit.

What is the difference between correlation and R-squared?

Correlation measures the strength and direction of a linear relationship on a -1 to +1 scale. R-squared is the correlation squared and expresses the proportion of variation shared between the variables.