Developed by StatCalc.net Team Statistically reviewed by — Senior Statistician & Editor Last updated
Regression & Correlation

Correlation Coefficient Calculator

Use this calculator to find correlation coefficient from paired X and Y data. Enter or paste your values to get r, the direction and strength of the linear relationship, and a complete step-by-step calculation.

Enter one value per line or paste two paired columns directly from Excel or Google Sheets.

Step-by-Step Solution

How to Use the Correlation Coefficient Calculator

This calculator helps you find Pearson’s correlation coefficient (r) from two sets of paired quantitative data. To use the calculator:

  1. Enter or paste the values for the first variable into the X Values field.
  2. Enter or paste the corresponding values for the second variable into the Y Values field.
  3. Select the number of decimal places you want.
  4. Click Calculate.

The calculator instantly returns Pearson’s correlation coefficient, an interpretation of the strength and direction of the relationship, and a complete step-by-step solution of how the coefficient was computed.

Tip. The X and Y fields must contain the same number of values because each X value must be paired with its corresponding Y value. Also, when entering the data manually, you should separate the values using commas, spaces, tabs, or line breaks. The input fields also allow you to copy-paste values directly from Excel, Google Sheets, or Text documents.

What Is a Correlation Coefficient?

A correlation coefficient is a statistical measure of the strength and direction of the linear relationship between two variables. This calculator computes Pearson’s correlation coefficient, r, which measures the strength and direction of a linear relationship between two quantitative variables. If the variables are not quantitative, you should consider using the Spearman’s correlation coefficient calculator.

The correlation coefficient value (r) lies between -1 and +1, with positive values indicating that the two variables move together and negative values indicating that the two variables move in the opposite direction. A correlation coefficient value of zero (r = 0), indicates that there is no relationship between the two variables.

The table below provides a quick summary of how to interpret correlation coefficient values.

Value of rInterpretation
r = +1Perfect positive linear correlation
r is close to +1Strong positive linear correlation
r is close to 0Weak or no linear correlation
r is close to −1Strong negative linear correlation
r = −1Perfect negative linear correlation

As you can see from the above table, the sign of a correlation coefficient value shows the direction of the correlation, while the absolute value shows its strength. For example, r = 0.85 and r = −0.85 have the same strength. However, the first represents a positive relationship, while the second represents a negative relationship.

Note. The correlation coefficient is a measure of association and not causation. As such, a strong correlation value does not prove that changes in one variable directly cause changes in the other but rather indicates that the variables move together or in opposite directions.

Correlation Coefficient Formula

The Pearson correlation coefficient formula for raw paired data is:

Correlation Coefficient Formula

Where:

  • r is Pearson’s correlation coefficient
  • n is the number of paired observations
  • Σx is the sum of the X values
  • Σy is the sum of the Y values
  • Σx² is the sum of the squared X values
  • Σy² is the sum of the squared Y values
  • Σxy is the sum of the products of each X-Y pair

How to Calculate the Correlation Coefficient by Hand

To calculate Pearson’s correlation coefficient from raw paired data:

  1. Write down the Pearson correlation formula.
  2. Calculate x², y², and xy for each pair, then find n, Σx, Σy, Σx², Σy², and Σxy.
  3. Substitute the values into the formula and solve for r.
  4. Interpret the sign and absolute value of r.

Example 1

Suppose a researcher records the number of hours eight students study and their corresponding quiz scores.

StudentStudy Hours, XQuiz Score, Y
112
224
335
444
555
667
778
889

Find the correlation coefficient between study hours and quiz scores and interpret the result.

Solution

To find the correlation coefficient for the above data, follow these steps:

Step 1: State the formula

Recall. The Pearson’s correlation coefficient formula is:

r=n∑xy−(∑x)(∑y)[n∑x2−(∑x)2][n∑y2−(∑y)2]r=\frac{n\sum xy-(\sum x)(\sum y)} {\sqrt{[n\sum x^2-(\sum x)^2][n\sum y^2-(\sum y)^2]}}

Step 2: Calculate the required sums

Based on the formula, we need n, Σx, Σy, Σx², Σy², and Σxy. The table below shows how to compute each of these sums

Studentxyx²y²xy
1121² = 12² = 41 × 2 = 2
2242² = 44² = 162 × 4 = 8
3353² = 95² = 253 × 5 = 15
4444² = 164² = 164 × 4 = 16
5555² = 255² = 255 × 5 = 25
6676² = 367² = 496 × 7 = 42
7787² = 498² = 647 × 8 = 56
8898² = 649² = 818 × 9 = 72
TotalΣx = 36Σy = 44Σx² = 204Σy² = 280Σxy = 236

From the table, we see that:

  • The number of pairs, n = 8
  • Σx = 36
  • Σy = 44
  • Σx² = 204
  • Σy² = 280
  • Σxy = 236

Step 3: Substitute the values into the formula

Substituting the values from step 2 into the correlation coefficient formula, we get:

r=8(236)−(36)(44)[8(204)−362][8(280)−442]r=\frac{8(236)-(36)(44)} {\sqrt{[8(204)-36^2][8(280)-44^2]}}

= 304 / √(336 × 304)

= 304 / 319.5997

r = 0.9512

Therefore, the correlation coefficient for the data is: r = 0.9512.

Step 4: Interpret the correlation coefficient

The correlation coefficient value (r = 0.9512) is close to 1 and positive. This implies that there is a very strong positive linear relationship between study hours and quiz scores. The positive correlation suggests that students who study for more hours generally tend to have higher quiz scores. However, it does not prove that studying for longer causes higher quiz scores.

Want to know whether this relationship is statistically significant? Use the p-value from r calculator to find the p-value and compare it with your significance level, or use the Pearson correlation test calculator to perform the complete hypothesis test.

Finding Correlation Coefficient (r) from Covariance and Standard Deviations

If the covariance and standard deviations of the two variables are already known, we can calculate Pearson’s correlation coefficient using the following formula:

correlation coefficient formula using covariance and variances

Where:

  • Cov(X, Y) is the sample covariance between X and Y
  • sₓ is the sample standard deviation of X
  • sᵧ is the sample standard deviation of Y

If the variances are given instead of the standard deviations, you should first find the standard deviations by taking the square root of the variances. That is:

  • sₓ = √sₓ²
  • sᵧ = √sᵧ²

When working with raw data and want to use this correlation coefficient formula, you can use the covariance calculator, standard deviation calculator, or the variance calculator to verify your results.

Example 2

Suppose a college instructor studies the relationship between weekly study time and exam scores. The following sample statistics are given:

  • Cov(X,Y) = 12
  • Variance of study time, sₓ² = 4
  • Variance of exam scores, sᵧ² = 100

Find Pearson’s correlation coefficient.

Solution

Since the variances are given, we need to first find the standard deviations.

sₓ = √4

= 2

sᵧ = √100

= 10

Now, using the covariance-standard deviation method, we can calculate the correlation coefficient as follows:

r = Cov(X,Y) /sₓsᵧ

Substituting the values gives:

r = 12 / (2 × 10)

= 12 / 20

= 0.60

Therefore, Pearson’s correlation coefficient, r = 0.60.

Since r is positive, the variables have a positive linear relationship. The correlation coefficient, r = 0.60, indicates a strong positive linear correlation between weekly study time and exam scores.

How to Interpret the Strength of Correlation Coefficient, r

The calculator classifies the strength of the correlation coefficient using the absolute value of r. The table below provides a quick summary to help you determine the strength of a correlation coefficient value.

Absolute value of rInterpretation
0.00 to 0.19Very weak
0.20 to 0.39Weak
0.40 to 0.59Moderate
0.60 to 0.79Strong
0.80 to 1.00Very strong

For example:

  • r = 0.72 indicates a strong positive linear correlation.
  • r = −0.72 indicates a strong negative linear correlation.
  • r = 0.15 indicates a very weak positive linear correlation.

Note. These ranges in the table above are practical guidelines rather than strict rules. The importance of a correlation depends on the subject area, sample size, measurement quality, and purpose of the analysis.

It is also worth noting that a correlation can be statistically significant without being practically important. Large samples can make relatively small correlations significant.

Positive vs Negative Correlation

A positive correlation means the two variables tend to move in the same direction. As X increases, Y generally tends to increase. For example, study time and exam scores may have a positive correlation if students who study for longer tend to earn higher scores.

On the other hand, a negative correlation means the variables tend to move in opposite directions. As X increases, Y generally tends to decrease. For example, the number of classes missed and exam scores may have a negative correlation if students with more absences tend to earn lower scores.

The sign of r tells you the direction of the relationship. It does not tell you the strength by itself.

Correlation and Scatter Plots

Before interpreting a correlation coefficient, it is useful to look at the paired data on a scatter plot. A scatter plot helps you see the direction and form of the relationship and can reveal unusual values that may affect Pearson’s r. You can use our scatter plot maker to plot your X-Y data.

For Pearson’s correlation, the main pattern to look for is a linear relationship. If the points generally rise from left to right, the correlation is positive. However, if they generally fall from left to right, the correlation is negative. The more closely the points follow a straight-line pattern, the closer the absolute value of r will usually be to 1.

A scatter plot is also useful because r alone may not clearly show a curved relationship or the effect of an extreme outlier.

Frequently Asked Questions

What is a correlation coefficient calculator?

A correlation coefficient calculator is an online tool that finds Pearson’s r from two sets of paired quantitative data. It measures the strength and direction of the linear relationship between the two variables.

How should I enter the X and Y values?

Enter the observations for the first variable in the X field and the corresponding observations for the second variable in the Y field. The two fields must contain the same number of values, and each X value should correspond to the Y value in the same position.

Can I paste data from Excel or Google Sheets?

Yes. You can copy and paste paired data from Excel or Google Sheets. You can paste each column separately or paste two paired columns directly into the calculator.

What does a negative correlation coefficient mean?

A negative value of r means that the variables tend to move in opposite directions. As one variable increases, the other generally tends to decrease.

What does r = 0 mean?

An r value of 0 means that there is no linear correlation between the variables. A nonlinear relationship may still be present.

Does a high correlation mean one variable causes the other?

No. Correlation shows association, not causation. A strong value of r does not by itself prove that one variable causes changes in another.

Can Pearson’s r be greater than 1?

No. Pearson’s correlation coefficient always falls between −1 and +1.

Cite

Choose APA, MLA, Chicago, or Harvard. Citations credit StatCalc.net as the corporate author.

StatCalc.net. (2026, October 15). Correlation Coefficient Calculator. Retrieved October 19, 2026, from https://statcalc.net/correlation-coefficient-calculator/

About This Calculator

This calculator was developed by the StatCalc.net Team and statistically reviewed by , Senior Statistician & Editor.

Formulas, calculation logic, worked examples, and explanatory content are reviewed for statistical accuracy and clarity.