**CORREL Function in Excel (Table of Contents)**

## CORREL in Excel

Correl function in excel is used for calculating the Correlation Coefficient, whose value ranges from -1 to +1 only, and it also shows how strongly any 2 values are related. The range for the correlation coefficient is only -1 to +1, which is quite small, and the value falling under this range will be less compared to any other number. As per the syntax, we just need to select the 2 arrays of numbers for which we need to find the Correlation Coefficient.

### Correlation coefficient

It’s a statistical measure of how strong a relationship between two variables, i.e., for a positively correlated variable, the Correlation coefficient value increases, whereas for a negatively correlated variable, the Correlation coefficient value decreases.

Correlation coefficients are expressed as values between +1 and -1.

I have two variables (one plotted on the X-axis, one on the Y-axis)

**If the value is 1, then it means a strong positive correlation**g. In this case, y increases when x increases (Positive linear relationship)

**If the value is 0**: means that there is no relationship between the two variables (x and y)**If the value is -1, then it means negative correlation:**In this case, y decreases when x increases (Negative linear relationship)

**Definition**

**CORREL Function:** Returns the correlation coefficient between two datasets or variables

### CORREL Formula in Excel

Below is the CORREL Formula:

Where

**Array1– **It is an independent variable. It is entered as a cell reference or range of values.

**Array2**– It is a dependent variable. It is entered as a second cell reference or range of values.

Correlation coefficients are expressed as values between +1 and -1.

A coefficient of zero indicates, No discernable relationship between fluctuations of the variables.

It is most commonly used to Calculate the correlation coefficient for two sets of values or variables, i.e. Correlation between a particular stock or share price and the market index value.

To Calculate correlation coefficient for refrigerators & air conditioner sales in summer & winter season and Car models, its year of launch & price difference.

Excel Correl function is similar to Pearson Function

CORREL function is used as worksheet function & also in excel VBA.

CORREL function in Excel is easy to use & is a very simple function with few arguments

### How to use CORREL Function in Excel?

CORREL Function is very simple to use. Let us now see how to use the CORREL function in Excel with the help of some examples.

#### Example #1

**For a Set of Positive**** Variables or Dataset**

With the help of the Correl function, I need to find out the correlation coefficient between two datasets or variables.

In the below-mentioned example, the table contains two variables, one in column X & the other in column Y. where both the datasets contain positive values.

Let’s apply the Correl function in cell “C14”. Select the cell “C14” where the Correl function needs to be applied.

Click the insert function button (fx) under the formula toolbar; the dialog box will appear, type the keyword “CORREL” in the search for a function box, CORREL function will appear in the select function box. Double click on the CORREL function.

A dialog box appears where arguments for the CORREL function needs to be filled or entered, i.e. =CORREL(array1, array2)

For the Array1 argument, click inside cell B8, and you’ll see the cell selected, then Select the cells till B12. So that column range will get selected, i.e. B8:B12

Similarly, For the Array2 argument, click inside cell C8 and you’ll see the cell selected, then Select the cells till C12. So that column range will get selected, i.e. C8:C12

i.e. =CORREL(B8:B12,C8:C12) will appear in cell C14

Click ok after entering both the arguments.

i.e. =CORREL(B8:B12,C8:C12) returns 0.988104929 as the result. The Correlation coefficient between the two datasets or variables is 0.98

Graphical representation can also be done using a line chart under chart options

I have two variables X & Y, where one plotted on the X-axis, the other one on the Y-axis

Select the table range excluding header X & Y, i.e. B8 TO C12

Then click on the Insert tab; under that select line options, select the first one in the line chart option

It will result in a chart,

Chart elements such as legend series (X, Y) axis title (X & Y axis), chart title (POSITIVE CORRELATION) & data label (Values) needs to be updated in the chart.

You can see a strong positive correlation, i.e. Variables X & Y values are positively correlated (Positive linear relationship)

#### Example #2

**For a Dataset Containing Positive & Negative Values**

With the help of the Correl function, I need to find out the correlation coefficient between two datasets or variables

In the below-mentioned example, I have two variables, one in the column x & the other in column Y. where column X datasets contain positive values & column Y datasets contain negative values

Let’s apply the Correl function in cell “C29”. Select the cell “C29” where the Correl function needs to be applied.

Click the insert function button (fx) under the formula toolbar, a dialog box will appear, type the keyword “CORREL” in the search for a function box, the CORREL function will appear in the select function box. Double click on the CORREL function.

A dialog box appears where arguments for the CORREL function needs to be filled or entered, i.e. =CORREL(array1, array2)

For the Array1 argument, click inside cell B23, and you’ll see the cell selected, then Select the cells till B27. So that column range will get selected, i.e. B23:B27

Similarly, For the Array2 argument, click inside cell C23 and you’ll see the cell selected, then Select the cells till C27. So that column range will get selected, i.e. C23:C27

i.e. =CORREL(B23:B27,C23:C27) will appear in the cell C29

Click ok after entering both the arguments.

i.e. =CORREL(B23:B27,C23:C27) returns -0.988104929 as the result. The Correlation coefficient between two datasets or variables is -0.98

Similar to the above example, it is graphically represented using a line chart under chart options

I have two variables X & Y, where one plotted on the X-axis, the other one on the Y-axis

You can see the negative correlation, i.e. Variables X & Y values are negatively correlated (Negative linear relationship). In this case, y decreases when x increases.

### Things to Remember

- Suppose if Array1 and Array2 have a different number of data points or if the supplied arrays are of different lengths. CORREL results in or returns the #N/A error value.
- The function will return the #DIV/0! error value if the argument array1 or array2 contains non-numeric data (text, logical values, or blank cells).
- The other method of calculating the correlation coefficient through the Data analysis option. In the excel toolbar, the data analysis tab is selected under the data ribbon; once we click on data analysis, a Data analysis popup will appear; we have to select correlation in that dropdown of analysis tools to calculate the correlation coefficient for given datasets or variables.
- It’s an inbuild Analysis Toolpak Add-in which is present in application add-ins.

### Recommended Articles

This has been a guide to Excel CORREL function. Here we discuss the CORREL Formula and how to use the CORREL function in Excel along with practical examples and a downloadable excel template. You can also go through our other suggested articles –

16 Online Courses | 23 Hands-on Projects | 140+ Hours | Verifiable Certificate of Completion

4.8

View Course

Related Courses