How to Calculate Correlation in Excel: Step by Guide
Last Updated :
02 Sep, 2024
Understanding the relationship between two variables is essential in data analysis, and correlation is a powerful statistical tool to measure that relationship. Excel, as a versatile data analysis tool, allows you to calculate correlation easily.
In this article, you will learn the different methods to calculate correlation in Excel, including using built-in functions and data analysis tools. Whether you’re a beginner or an advanced Excel user, this step-by-step guide will help you efficiently analyze the relationships between variables.

How to Calculate Correlation in Excel
What is Correlation in Excel?
Correlation measures the strength and direction of the linear relationship between two variables. The correlation coefficient ranges from -1 to 1:
- +1 indicates a perfect positive correlation, where variables move in the same direction.
- -1 indicates a perfect negative correlation, where variables move in opposite directions.
- 0 means no linear relationship exists between the variables.
Understanding the Correlation Coefficient
Discover how the correlation coefficient helps interpret the relationship between variables.
The correlation coefficient quantifies how strongly two variables are related. The closer the coefficient is to 1 or -1, the stronger the relationship:
Positive Correlation: When the coefficient is positive, both variables increase or decrease together.
Negative Correlation: When the coefficient is negative, one variable increases while the other decreases.
No Correlation: A coefficient close to zero suggests no linear relationship between the variables.
What is Correlation Data Analysis in Excel?
It is essential to make sure that your data is well organized in a spreadsheet before using correlation. Each variable should have its own column and each row should represent an observation or data point. You can refer to the below points to prepare your data:
- Open Excel: After launching Microsoft you can create a new spreadsheet or open an existing sheet that contains the data you want to analyze.
- Organize your data: Enter the data in appropriate cells, ensuring that each variable has its column, and each row represents an observation.
- Data Format: Your data should be in numerical format for accurate correlation analysis. If your data is in the non-numeric format then convert it in numeric format.
You can also enter the correlation formula yourself, Below is the correlation formula:
=\frac{\sum(x-\overline{x})(y-\overline{y})}{\sqrt{\sum(x-\overline{x})^{2}-\sum(y-\overline{y})^{2}})
where X and Y are measurements, ∑ is the sum, and the X and Y with bars over them indicate the mean value of the measurements.
How to Calculate Correlation in Excel: Step by Step Guide
The value of the correlation coefficient ranges from -1 to +1. The closer the value is to -1 or +1, the strongly both entities are related to one another. If the correlation coefficient comes out to be 0, we say that there is no linear relationship between both entities. Let’s understand this with the help of an example, in which we will calculate the Pearson correlation coefficient using Excel. Suppose, we have records of the height and weight of 10 students of a class which is given as:
Height (in cm) |
Weight (in Kg) |
155
|
66
|
178
|
82
|
148
|
62
|
162
|
70
|
165
|
71
|
172
|
74
|
158
|
64
|
152
|
65
|
176
|
80
|
185
|
93
|
We can calculate correlation in Excel using two methods:
Method 1: Using CORREL() Function
Excel has a built-in CORREL() function that can be used for calculating the Pearson correlation coefficient. The basic syntax for CORREL() is given as:
=CORREL(array1, array2)Â
Where array1 and array2 are the arrays of records of the first entity and second entity, respectively.
Step 1: We can calculate the Correlation coefficient between both attributes using the formula applied in the A13 cell, i.e.,
=CORREL(A2:A11, B2:B11)Â
We pass the first array, Height (in cm) from A2:A11 as the first parameter, and the second array, Weight (in kg) from B2:B11 as the second parameter inside the CORREL() formula.

Using the CORREL() function to calculate Pearson’s correlation coefficient
The value obtained after calculating the correlation coefficient comes out to be 0.959232649 which is very close to +1, hence we can derive a conclusion that the height and weight of the student are highly positively correlated to each other. We can likely say if a student is taller then there is a higher chance that the student will be having higher weight as well.
A video is also given below demonstrating all the usage of the CORREL() function to calculate the correlation value.
Go to the Data tab in the menu bar and select Data Analysis. If you don’t see it, you may need to enable the Analysis ToolPak from Excel Options.

Step 2: Click on the Data Analysis
From the data tab, select the Data Analysis option.

Step 3: Select the Correlation Option
A data analysis tools dialogue box will appear, in the dialogue box select the Correlation option.

Data Analysis dialog box
An additional dialogue box for correlation will appear, in the dialogue box first we have to give the input range, so select the entire table. Since our data is grouped by Columns, we will select the Columns option. Also, our data have labels in the first row, therefore we will click the checkbox saying Labels in the first row. We can get output as per our requirement in the current sheet or a new worksheet or a new workbook. We can select the new worksheet option and click the OK button.

Filling all the values inside the correlation dialog box
Step 5: Preview the Result
The output will get automatically generated in the new worksheet.

The correlation table generated using the Data Analysis tool
A video is also given below demonstrating all the above steps given above to calculate the correlation value.
From the new worksheet, we can notice a correlation table will get generated in which we can see our correlation value between height and weight comes out to be 0.959232649, which we also got in using the first method.
Excel correlations are a good place to start when creating a marketing, sales, and spending plan, but they don’t provide the full picture. In order to rapidly assess the correlation between two variables and use this information as a starting point for more in-depth analysis, it is worthwhile to use Excel’s built-in data analysis options.
Creating a Correlation Matrix in Excel
Learn how to create a correlation matrix to analyze multiple variables in a dataset.
A correlation matrix allows you to examine relationships between multiple variables simultaneously:
Step 1: Organize Your Data
Ensure each variable is in a separate column and each observation is in a row.
Step 2: Select the Data Range
Highlight the entire range of data, including column headers.
Step 3: Use the CORREL Function
Go to the Formulas tab, click on More Functions > Statistical > CORREL.
Step 4: Enter the Data Range in the Function Wizard
Select the data ranges for each pair of variables in the CORREL function wizard and click OK.
Step 5: Review the Correlation Matrix
Excel will display the correlation coefficients in a matrix format, allowing you to see how each variable relates to the others.
Benefits of Calculating Correlation in Excel
Understand the advantages of using Excel to calculate correlation for data analysis.
Identify Relationships: Determine if and how strongly variables are related.
Support Decision-Making: Use correlation to make informed decisions in marketing, sales, finance, and other fields.
Visualize Data Trends: Spot trends and patterns in your data quickly.
Tips for Correlation Analysis
- Data Cleaning: Make sure that your data is accurate and error-free before performing the correlation analysis. Incorrect or missing data can affect the output.
- Sample Size: Correlation analysis is more reliable with larger sample sizes. Smaller sample sizes may lead to less accurate results.
- Causation vs. Correlation: Correlation does not imply causation. Even with a strong correlation, it is essential to explore other factors and conduct further research before establishing causation.
Conclusion
Calculating correlation in Excel is an essential skill for anyone involved in data analysis. Whether you use the CORREL function or Excel’s Data Analysis Tool, these methods allow you to quickly assess relationships between variables. Start using these techniques today to gain deeper insights from your data!
Similar Reads
How to Calculate Correlation By Group in R
Calculating correlation by group in R Programming Language involves finding the correlation coefficient between two variables within each subgroup defined by another variable. In R, correlation by group can be achieved by using the cor() function along with other functions like group_by() from the '
5 min read
How to Calculate Partial Correlation in Excel?
Partial correlation helps find the correlation between the two variables by removing the effect of the third variable. There can be situations when the relations between variables can be many. This could reduce the accuracy of correlation or could also give wrong results. Partial correlation removes
5 min read
How to Calculate Point-Biserial Correlation in Excel?
The Point-Biserial Correlation Coefficient is a correlation metric that measures the degree of relationship between a continuous and a binary variable. The connection between a binary variable, x, and a continuous variable, y, is measured using point-biserial correlation. Binary variables are widely
3 min read
How to Calculate Spearman Rank Correlation in Excel?
We have noticed a general trend that with an increase in the height of a person, its weight also increases. This happens because there is a positive correlation between height and weight. As one variable increases, the other one also increases, but with this, we only get the quality measure of the d
8 min read
How to Calculate Standard Deviation in Excel: Quick Guide
How to Find Standard Deviation in ExcelOpen MS Excel Spreadsheet >> Enter your Data Select the Cell >>Enter the Formula For a sample: =STDEV.S(range)For a population: =STDEV.P(range)Press Enter >>Verify your Result Calculating the standard deviation in Excel is a crucial step in da
10 min read
How to Calculate Cross Correlation in R?
In this article we will discuss how to calculate cross correlation in R programming language. Correlation is used to get the relation between two or more variables. The result is 0, if there is no correlation between two variablesThe result is 1, if there is positive correlation between two variable
1 min read
How to Find Correlation Coefficient in Excel
Finding the correlation coefficient in Excel is a fundamental skill for anyone working with data analysis, statistics, or business insights. It helps you understand the relationship between two sets of data, indicating whether they are positively or negatively correlated. In this article, you will l
9 min read
How to Calculate Partial Correlation in R?
In this article, we will discuss how to calculate Partial Correlation in the R Programming Language. Partial Correlation helps measure the degree of association between two random variables when there is the effect of other variables that control them. in partial correlation in machine learning It g
3 min read
How to Calculate Percent Change in Excel: A Complete Guide
Calculating percent change in Excel is a valuable skill for analyzing data trends and measuring growth or decline. This guide will show you four easy methods to calculate percent change, whether youâre comparing sales data, financial metrics, or other datasets. Youâll learn to use simple formulas su
11 min read
How to Calculate Cumulative Frequency table in Excel?
Cumulative Frequency is the running total of frequencies starting from the very first frequency up to the last frequency. If we simplify the term running total, we can say the first frequency is added with the second frequency and then their sum is added to the third frequency and the same sequence
3 min read