UK-based online statistics and data analysis support for USA, UK, and international clients. No exams, no impersonation, no fabricated data.
Correlation Tests

Correlation in Excel: Formula, CORREL Function, Interpretation and Worked Example

Excel CORREL Function, Pearson Matrix, Spearman Ranks and Worked Statistical Interpretation Correlation in Excel: Formula, Interpretation and Fully Worked Example Correlation in Excel helps you measure...

Statistics guide Ethical learning support SPSS/R/Python/Excel friendly
Correlation in Excel: Formula, CORREL Function, Interpretation and Worked Example

Excel CORREL Function, Pearson Matrix, Spearman Ranks and Worked Statistical Interpretation

Correlation in Excel: Formula, Interpretation and Fully Worked Example

Correlation in Excel helps you measure how strongly two variables move together. This guide explains the CORREL function, Pearson correlation, Spearman rank correlation, correlation matrices, p-values, partial correlation, grouped correlation and a fully worked Excel workbook using the student performance dataset. The worked file includes 649 rows, 16 numeric variables, live formulas and interpretation notes for reporting results clearly.

AdvertisementGoogle AdSense top placement reserved here

Quick Answer: Correlation in Excel Result

The worked Excel file shows that the strongest Pearson relationship is between G2 and G3, with r = 0.9185. This means the second-period grade is very strongly and positively associated with the final grade. The next strongest relationships are G1 with G2, r = 0.8650, and G1 with G3, r = 0.8264. These results show a clear academic-performance cluster across the three grade variables.

The workbook also shows that Medu with Fedu has a strong positive correlation of r = 0.6475, and Dalc with Walc has a strong positive correlation of r = 0.6166. The strongest negative relationship in the top-ranked Pearson pairs is failures with G3, r = -0.3933. After controlling for G2, the partial correlation between G1 and G3 drops to r = 0.1606, which means much of their raw association overlaps with G2.

Rows used649
Numeric variables16
Strongest Pearson pairG2 ↔ G3
Top Pearson r0.9185

G1 ↔ G3 Pearson r0.8264
Partial r, G1-G3 | G20.1606
Canonical correlation 10.4830
Wilks Lambda0.7500

Final interpretation: The Excel workbook confirms that grade variables are the strongest part of the relationship structure. G2 is the best simple bivariate partner for G3, while failures is the clearest negative academic-warning variable. The partial correlation result shows that G1 still has a small positive relationship with G3 after controlling for G2, but the relationship is much smaller than the raw Pearson coefficient.

Table of Contents

  1. What Is Correlation in Excel?
  2. Correlation Formula and Excel CORREL Function
  3. Dataset and Workbook Structure
  4. Pearson Correlation Results in Excel
  5. Spearman and Kendall Correlation in Excel
  6. Partial and Grouped Correlation Results
  7. Canonical Correlation Note in Excel
  8. Step-by-Step: How to Calculate Correlation in Excel
  9. Excel Formula Library
  10. How to Interpret Correlation Values
  11. APA Reporting Wording
  12. Common Mistakes
  13. Download the Worked Excel File
  14. Related Guides
  15. FAQs

What Is Correlation in Excel?

Correlation in Excel is the process of calculating the strength and direction of association between two numeric variables using built-in formulas or the Data Analysis ToolPak. The most common Excel method is the CORREL function, which returns the Pearson product-moment correlation coefficient.

A positive correlation means that higher values of one variable tend to go with higher values of another variable. A negative correlation means that higher values of one variable tend to go with lower values of another variable. A value near zero means there is little or no linear relationship. You should combine correlation with descriptive statistics, histograms, box plots and Q-Q plots when preparing a complete analysis.

Simple definition: Correlation in Excel tells you whether two numeric variables move together, move in opposite directions or show little linear relationship.

Correlation Formula and Excel CORREL Function

The Pearson correlation coefficient is based on standardized covariance. Excel performs this calculation automatically through the CORREL function.

r = Σ[(x − x̄)(y − ȳ)] / √[Σ(x − x̄)2 × Σ(y − ȳ)2]

The direct Excel formula is:

=CORREL(array1,array2)

For example, the workbook calculates the correlation between G2 and G3 using the raw worksheet columns for those variables. The result is 0.9185480036, which is a very strong positive correlation.

Excel FunctionPurposeUsed For
CORRELCalculates Pearson correlation between two ranges.Main Pearson matrix and raw pairwise relationships.
RANK.AVGConverts values to ranks.Spearman rank correlation.
T.DIST.2TReturns a two-tailed p-value from a t statistic.Significance testing for Pearson r.
FILTERFilters rows by group condition.Grouped correlations by school, sex, address or studytime.
MINVERSE / MMULTMatrix operations.Advanced workbook sections such as canonical-correlation support.

Dataset and Workbook Structure

The workbook uses the student performance dataset and includes 649 rows. The numeric variables included in the correlation calculations are age, Medu, Fedu, traveltime, studytime, failures, famrel, freetime, goout, Dalc, Walc, health, absences, G1, G2 and G3.

SheetPurposeImportant Details
DashboardMain result summaryShows top results, workbook notes and interpretation text.
Raw_DataOriginal dataContains 649 rows and original variables.
Variable_SetupVariable ranges and rolesMaps variables to Excel columns and live ranges.
DescriptivesSummary statisticsShows N, missing values, mean, SD, min, quartiles and median.
PearsonProduct-moment correlation matrixUses live CORREL formulas.
RanksRank-transformed dataSupports Spearman calculations.
Spearman_KendallRank and Kendall resultsSpearman uses rank correlations; Kendall values are verified calculated outputs.
Partial_GroupedPartial and subgroup correlationsShows partial r and grouped correlation examples.
Canonical_CorrelationAdvanced multivariate noteShows canonical-correlation support values and matrix setup.

The workbook design note states that live formulas are used where Excel has built-in support, while Kendall tau-b and canonical eigen results are provided as verified calculated outputs because standard Excel has no native KENDALL or EIGEN function.

Pearson Correlation Results in Excel

The Pearson matrix is the main Excel correlation table. Each cell uses =CORREL(variable1_range, variable2_range). The strongest Pearson results are shown below.

RankPairPearson rInterpretation
1G2 with G30.9185Very strong positive relationship between second-period grade and final grade.
2G1 with G20.8650Very strong positive relationship between first-period and second-period grades.
3G1 with G30.8264Very strong positive relationship between first-period and final grades.
4Medu with Fedu0.6475Strong positive relationship between mother’s and father’s education.
5Dalc with Walc0.6166Strong positive relationship between weekday and weekend alcohol consumption.
6failures with G3-0.3933Moderate negative relationship: more failures relate to lower final grade.
7goout with Walc0.3887Moderate positive relationship between going out and weekend alcohol use.
8failures with G2-0.3858Moderate negative relationship with second-period grade.
9failures with G1-0.3842Moderate negative relationship with first-period grade.
10freetime with goout0.3464Moderate positive relationship between free time and going out.

The strongest story in the Pearson table is the grade cluster. G1, G2 and G3 are strongly connected, and the highest coefficient is between G2 and G3. In practical terms, students with higher G2 scores usually have higher final G3 scores.

The second story is that not all meaningful relationships are grade-to-grade. Parental education variables move together, weekday and weekend alcohol use move together and failures show a consistent negative connection with grades. This makes the workbook useful for both simple correlation reporting and broader exploratory analysis.

Spearman and Kendall Correlation in Excel

Excel does not have a single built-in SPEARMAN formula, but it can calculate Spearman correlation by ranking both variables first and then applying CORREL to the rank columns. The workbook uses a separate Ranks sheet and then calculates the rank correlation matrix in the Spearman section.

=RANK.AVG(value, full_variable_range, 1)
=CORREL(rank_range_x, rank_range_y)

Spearman results are useful when variables behave like ordered scales, such as studytime, health, Dalc, Walc, famrel, freetime and goout. If Pearson and Spearman point in the same direction, the interpretation is more robust. If they differ sharply, the analyst should check nonlinearity, ties and outliers.

Kendall note: The workbook includes verified Kendall tau-b outputs, but standard Excel has no native Kendall function. That is why the workbook treats Kendall values as verified calculated outputs rather than live native Excel formulas.

Partial and Grouped Correlation Results

The Partial_Grouped sheet goes beyond a simple Pearson matrix. It shows partial correlations and subgroup correlations. Partial correlation is useful when you want to examine the relationship between two variables after controlling for a third variable.

rxy.z = (rxy − rxzryz) / √[(1 − rxz2)(1 − ryz2)]
X VariableY VariableControlPartial rInterpretation
G1G3G20.1606G1 still has a small positive association with G3 after controlling for G2.
studytimeG3failures0.2109Studytime remains positively related to G3 after accounting for failures.
absencesG3failures-0.0472The relationship is very weak after controlling failures.
failuresG3studytime-0.3722Failures remain a clear negative marker even after accounting for studytime.
DalcG3Walc-0.1237Weekday alcohol remains weakly negative after controlling weekend alcohol.
WalcG3Dalc-0.0654Weekend alcohol becomes very weak after controlling weekday alcohol.

The grouped correlation section reports that the G2-G3 relationship remains strong across school, sex, address and studytime groups. This is important because a relationship that remains strong across groups is easier to trust than a relationship that exists only in one subgroup.

Canonical Correlation Note in Excel

The workbook includes an advanced section for canonical correlation. The X set is studytime, failures, absences, health, Dalc and Walc. The Y set is G1, G2 and G3. The first canonical correlation is 0.4830, and the workbook reports Wilks Lambda = 0.7500 for all canonical roots.

This section is not the main “Correlation in Excel” lesson, but it shows how Excel can support advanced matrix-based analysis using formulas such as MINVERSE and MMULT. The workbook also notes that standard Excel does not include a native eigenvalue function, so some canonical eigen results are provided as verified calculated outputs.

Best use: Treat the canonical section as an advanced workbook demonstration. For most users searching “how to calculate correlation coefficient in Excel,” the Pearson, Spearman, partial and grouped sections are the main practical parts.

AdvertisementGoogle AdSense middle placement reserved here

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

Method 1: Use the CORREL Function

The fastest method is to type a direct CORREL formula. Choose two numeric columns with the same number of paired observations.

=CORREL(A2:A650,B2:B650)

In the worked workbook, a formula like this is used across the Pearson matrix. The cell where G2 intersects G3 returns 0.9185, which is interpreted as a very strong positive relationship.

Method 2: Build a Correlation Matrix

A correlation matrix places the same variables in rows and columns. Each intersection cell contains the correlation between the row variable and the column variable. The diagonal is always 1 because each variable is perfectly correlated with itself.

=CORREL(variable_in_row_range, variable_in_column_range)

Use absolute cell references for each variable range so formulas can be copied across the table without breaking references.

Method 3: Use the Data Analysis ToolPak

Excel also has a built-in Correlation tool inside the Data Analysis ToolPak. Enable it by going to File → Options → Add-ins → Excel Add-ins → Analysis ToolPak. Then choose Data → Data Analysis → Correlation. This is useful for quickly creating a matrix, but formulas are better for teaching because readers can see exactly how each value is calculated.

Method 4: Calculate Spearman Correlation in Excel

To calculate Spearman correlation, rank each variable first and then correlate the ranks:

=RANK.AVG(A2,$A$2:$A$650,1)
=RANK.AVG(B2,$B$2:$B$650,1)
=CORREL(rank_column_A, rank_column_B)

Excel Formula Library for Correlation

GoalExcel FormulaExplanation
Pearson correlation=CORREL(X_range,Y_range)Returns Pearson r.
Mean=AVERAGE(range)Used for descriptive context.
Standard deviation=STDEV.S(range)Used for sample spread.
Rank values=RANK.AVG(cell,range,1)Creates rank columns for Spearman correlation.
t statistic for r=r*SQRT((n-2)/(1-r^2))Converts Pearson r to a t statistic.
Two-tailed p-value=T.DIST.2T(ABS(t),n-2)Calculates p-value for testing r = 0.
Partial correlation=(rxy-rxz*ryz)/SQRT((1-rxz^2)*(1-ryz^2))Controls one third variable.
Grouped correlation=CORREL(FILTER(X_range,group_range=group),FILTER(Y_range,group_range=group))Calculates correlation inside a subgroup.
Matrix inverse=MINVERSE(matrix)Used in advanced matrix methods.
Matrix multiplication=MMULT(matrix1,matrix2)Used in advanced multivariate workbook sections.

How to Interpret Correlation Values in Excel

Correlation values range from -1 to +1. A value near +1 means the variables increase together. A value near -1 means one variable increases as the other decreases. A value near 0 means the variables have little linear relationship.

Absolute r RangeCommon LabelExample from Workbook
0.00 to 0.09Very weak or negligibleSome health or absence relationships after controlling other variables.
0.10 to 0.29WeakPartial r for G1-G3 controlling G2 = 0.1606.
0.30 to 0.49Moderatefailures with G3 = -0.3933.
0.50 to 0.69StrongMedu with Fedu = 0.6475.
0.70 to 1.00Very strongG2 with G3 = 0.9185.

Always report the direction, size and context. For example, saying “G2 and G3 have r = 0.9185” is accurate, but a better interpretation is: “Students with higher second-period grades tend to have much higher final grades, and this association is very strong.”

Correlation does not prove causation: Even a very strong Excel correlation does not prove that one variable causes another. It only shows the strength and direction of association.

APA Reporting Wording for Correlation in Excel

When reporting Excel correlation results, state the variables, sample size, coefficient, direction, p-value if calculated and practical interpretation. Do not only paste a matrix without explaining the important relationships.

APA-Style Full Report

A Pearson correlation matrix was calculated in Excel using 649 student records and 16 numeric variables. The strongest relationship was between G2 and G3, r = .919, indicating a very strong positive association between second-period grade and final grade. G1 was also strongly associated with G2, r = .865, and with G3, r = .826. The strongest negative relationship among the top-ranked pairs was between failures and G3, r = -.393, indicating that students with more prior failures tended to have lower final grades.

Short APA-Style Version

Excel Pearson correlations showed a very strong positive relationship between G2 and G3, r = .919, and a very strong positive relationship between G1 and G3, r = .826. Failures was moderately and negatively related to G3, r = -.393.

Partial Correlation Wording

After controlling for G2, the partial correlation between G1 and G3 decreased to r = .161. This indicates that G1 still had a small positive association with G3, but much of the original G1-G3 relationship overlapped with G2.

Common Mistakes When Calculating Correlation in Excel

MistakeWhy It Is a ProblemBetter Practice
Using mismatched rangesExcel correlation requires paired observations.Use ranges with the same row structure.
Ignoring missing valuesDifferent variables may use different sample sizes.Check valid N and missing values first.
Reporting only “strong” or “weak”Labels without numbers are vague.Report the exact r value.
Forgetting directionPositive and negative correlations mean different things.State whether the relationship is positive or negative.
Assuming correlation means causationCorrelation is not causal proof.Use causal language only with appropriate design.
Using Pearson for ordinal data without checkingRanked or skewed data may need Spearman support.Use RANK.AVG and CORREL for Spearman checks.
Copying formulas without absolute referencesRanges can shift incorrectly.Use $ signs in matrix formulas.

Download the Worked Excel File

The downloadable workbook contains the raw data, setup sheet, descriptive statistics, Pearson matrix, rank sheet, Spearman/Kendall section, partial and grouped correlations, canonical-correlation notes and dashboard interpretation.

FAQs About Correlation in Excel

How do I calculate correlation in Excel?

Use the formula =CORREL(array1,array2). Select the two numeric ranges you want to compare, making sure the rows are paired correctly.

What is the Excel formula for Pearson correlation?

The Excel formula is =CORREL(X_range,Y_range). It returns the Pearson product-moment correlation coefficient.

How do I calculate Spearman correlation in Excel?

Create rank columns using RANK.AVG, then apply CORREL to the two rank columns.

What was the strongest correlation in the workbook?

The strongest Pearson correlation was between G2 and G3, with r = 0.9185.

What does a negative correlation mean in Excel?

A negative correlation means that higher values of one variable tend to go with lower values of the other variable. In the workbook, failures and G3 had r = -0.3933.

Can Excel calculate p-values for correlation?

Yes. Convert r to a t statistic using =r*SQRT((n-2)/(1-r^2)), then use =T.DIST.2T(ABS(t),n-2).

Can Excel calculate partial correlation?

Yes, by using the partial-correlation formula based on three Pearson correlations: rxy, rxz and ryz.

Does correlation in Excel prove causation?

No. Excel correlation measures association only. It does not prove that one variable causes another.

Need help applying this to your own data?

Salar Cafe can help interpret output, clean datasets, review assumptions, build dashboards and explain statistical results ethically.

Need help interpreting your data analysis results?

Contact Salar Cafe
Engr. Muhammad Yar Saqib author profile photo

Engr. Muhammad Yar Saqib

WhatsApp Get Data Analysis Help