Correlation Coefficient Calculator

Find the correlation coefficient.

How it is calculated

The tool computes the Pearson correlation coefficient of paired values: r = (nΣxy − ΣxΣy) / √[(nΣx² − (Σx)²)(nΣy² − (Σy)²)], where n is the number of pairs. The result lies between −1 (perfect negative straight-line relation) and +1 (perfect positive), and is shown with four decimals.

Values can be separated by commas, spaces or line breaks. Any entry that is not a number, or lists of different length, gives no result. At least two pairs are needed, and if one list is constant (no variation) there is no result. The label reads |r|: 0.7 and above Strong, 0.4 to below 0.7 Moderate, 0.1 to below 0.4 Weak, under 0.1 None.

Worked example

x = 1, 2, 3, 4, 5 and y = 2, 4, 5, 4, 6. Means: x̄ = 3, ȳ = 4.2. Sum of cross-deviations = 8.0, sum of squared x-deviations = 10, of y-deviations = 8.8. So r = 8 / √(10 × 8.8) = 8 / 9.381. The tool shows r = 0.8528, labelled Strong.

Try this example →

Common mistakes

  • Concluding that one thing causes the other: a high r only shows that the two move together.
  • Pasting a non-numeric entry such as "n/a" in one list; the tool gives no result until it is removed or replaced in both lists.
  • Giving lists of different lengths; the tool gives no result, so look for a missing or extra value.
  • Using Pearson r for a curved relationship: r measures straight-line association only, so a clear curve can give a value near 0.
  • Trusting r from only 3 or 4 pairs; a few points can look strongly correlated by chance.

About this calculator

This calculator finds the Pearson correlation coefficient (r) for a set of paired x/y values, measuring how strongly two variables move together on a scale from -1 (perfect negative relationship) to +1 (perfect positive relationship), with 0 meaning no linear relationship at all.

Researchers and students use it to check whether two variables — like study hours and test scores, or temperature and ice cream sales — are related, and analysts use it as a first check before building a regression model.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Correlation measures a straight-line relationship, so a value near zero does not rule out a curved pattern; plot the pairs first. A strong r also says nothing about cause. The tool pairs values by position, and a non-numeric entry or lists of different length give no result, so keep both lists the same length and clean. With only a handful of pairs, r can look strong by chance. Which data set are you comparing?

Popular calculators

All Calculators