Correlation Coefficient Calculator

Quick answer

A correlation calculator finds the Pearson correlation coefficient r, which measures how strongly two variables move together on a straight line. It runs from minus 1 to plus 1. Enter your paired x and y values to get r, the covariance, and how strong the link is.

Updated 2026-09-09By Shakeel MuzaffarReviewed by Prof. Dr. Khalil Mudassar, PhD
Try
Statistics
The first variable, separated by commas.
The second variable, in the same order and count as x.
Correlation (r)
--
Covariance--
R-squared--

Calculations run in your browser. Inputs are not sent to our servers; anything you Save stays in this browser only.

Saved results (0)

How to Use the Correlation Calculator

  1. Enter your x values, separated by commas.
  2. Enter the matching y values, in the same order.
  3. Read the correlation coefficient r, from minus 1 to plus 1.
  4. See the covariance and the r-squared.

Here is what each result means:

ResultWhat it means
Correlation (r)Strength and direction of the linear link.
CovarianceHow the two variables vary together, in their units.
R-squaredThe share of variation that lines up.

What Is the Correlation Coefficient?

The Pearson correlation coefficient, written r, measures how strongly two variables move together in a straight line. It ranges from minus 1 to plus 1. A value of plus 1 is a perfect upward line, minus 1 a perfect downward line, and 0 no linear link at all. So r near plus 0.9 means a strong positive relationship.

Correlation standardizes the covariance, so it has no units and can compare relationships on very different scales. It is a core tool for spotting associations in data, though a strong correlation shows only that two things move together, not that one causes the other.

How Does the Correlation Calculator Work?

It divides the covariance of the two variables by the product of their standard deviations.

Formula: r = sum((x - mean_x)(y - mean_y)) / sqrt(sum((x - mean_x)^2) x sum((y - mean_y)^2))
  1. Find how each value deviates from its mean.
  2. Add the products of the paired deviations for the top.
  3. Divide by the spread of each variable to standardize into r.

To fit an actual line to the same data, use the linear regression calculator, which shares these sums.

Correlation Example

Find the correlation for x = 1, 2, 3, 4, 5 and y = 2, 4, 5, 7, 9.

Calculation: both variables rise together almost perfectly. Working through the formula gives r of about 0.99, a very strong positive correlation, and an r squared near 0.98. So nearly all of the variation lines up between x and y.

Reading the Correlation Value

The size of r shows strength, and its sign shows direction.

rStrengthDirection
0.9 to 1.0Very strongPositive
0.7 to 0.9StrongPositive
0.4 to 0.7ModeratePositive
0 to 0.2Very weak or noneEither

Negative values mirror these, so minus 0.8 is a strong downward relationship. These bands are a guide, not strict cutoffs.

Correlation vs Covariance

The two are related, but correlation is easier to compare.

MeasureRangeUnits
CovarianceAny valueDepends on the data units
Correlation r-1 to +1None, standardized

Covariance shows the direction of the link but its size is hard to read. Correlation scales it into a clear range you can compare across data sets.

What Affects the Correlation

How Linear the Pattern Is

Correlation measures straight-line association. A strong curved link can still show a low r.

Outliers

A single far-off point can raise or lower r sharply, so check for stray values.

Range of the Data

A narrow range of values can hide a relationship and shrink r toward zero.

When to Use a Correlation Calculator

Spotting Relationships

See whether two variables tend to rise or fall together.

Comparing Links

Because r has no units, compare the strength of different relationships fairly.

Before Regression

Check that a linear model makes sense before fitting a line.

Common Mistakes

1. Reading Correlation as Causation

A strong r shows association, not that one variable causes the other.

2. Expecting R to Catch Curves

Pearson r measures straight-line links. A curved pattern can have a low r despite a clear relationship.

3. Ignoring Outliers

One stray point can swing r a long way. Inspect the data first.

4. Over-reading a Small Sample

A high r from just a few points can be down to chance. More data is more reliable.

5. Confusing R and R Squared

r ranges from minus 1 to plus 1; r squared is its square, from 0 to 1, and is always positive.

Accuracy and Limitations

The correlation is exact for your data; only the displayed decimals are rounded.

What it calculates accurately

  • The Pearson correlation coefficient
  • The sample covariance
  • The r-squared value

What it does not do

  • Prove that one variable causes another
  • Detect non-linear relationships
  • Give a significance test or p-value
  • Rank correlations like Spearman

How We Compute the Correlation

Method
The sum of paired deviations divided by the square root of the product of each variable spread.
Inputs used
Paired lists of x and y values.
Assumptions
At least two points; not all x or all y identical.
Rounding
Correlation, covariance and r-squared to four decimals.
Edge cases
Identical x or y values make the correlation undefined.
Sources
See Sources below.
Last reviewed
2026-09-08.

Frequently Asked Questions

What is the correlation coefficient?

It is a number, r, from minus 1 to plus 1 that measures how strongly two variables move together on a straight line. Plus 1 is a perfect upward line, minus 1 a perfect downward line, and 0 no linear link.

How do you calculate correlation?

Find how each value deviates from its mean, add the products of the paired deviations, and divide by the spread of each variable. This standardizes the link into r, which this tool computes for you.

What is a strong correlation?

As a rough guide, an r above 0.7 in size is strong, 0.4 to 0.7 moderate, and below 0.4 weak. The sign shows direction, so minus 0.8 is a strong negative relationship.

Does correlation mean causation?

No. A strong correlation shows two variables move together, but it does not prove that one causes the other. A third factor, or chance, can create the pattern.

What is the difference between correlation and covariance?

Covariance shows the direction of a link but its size depends on the units, so it is hard to read. Correlation standardizes it into a range from minus 1 to plus 1, with no units.

Can correlation be zero even if variables are related?

Yes. Pearson r only measures straight-line links. A strong curved relationship, such as a U shape, can give an r near zero despite a clear pattern.

What is r squared here?

R squared is the square of the correlation, from 0 to 1. It gives the share of variation that lines up between the two variables. An r of 0.9 gives an r squared of 0.81.

How many data points do I need?

At least two, but a handful of well-spread points is far more reliable. A high correlation from very few points may be down to chance.

Is my information saved?

No. The calculation runs in your browser and nothing you enter is stored or sent anywhere, unless you choose Save, which keeps the result only on this device.

Sources

Related Guides

Related Calculators

Looking for more statistics tools?

Explore all math calculators

This calculator finds the Pearson correlation, which measures a linear relationship. A value near zero means little linear link, but the two variables could still be related in a curved way. Correlation is not causation. Spotted an error? Let us know.

Author

shakeel-Muzaffar
Founder & Editor-in-Chief at  ~ Web ~  More Posts

Shakeel Muzaffar is the Founder and Editor-in-Chief of MultiCalculators.com, bringing over 15 years of experience in digital publishing, product strategy, and online tool development. He leads the platform's editorial vision, ensuring every calculator meets strict standards for accuracy, usability, and real-world value. Shakeel personally oversees content quality, formula verification workflows, and the platform's commitment to publishing tools that are genuinely useful for students, professionals, and everyday users worldwide.