Correlation Coefficient Calculator

Calculate Pearson correlation between two variables.

Calculator by SuperCalX: formulas, worked examples and 250+ free calculators.

Your values

Result

Correlation (r)
0.775
Strong correlation

Result breakdown

The figures from your result, side by side
r
0.775

Change any input and these figures update straight away. Open the Charts tab to see them as a graph; the formula and a worked example are further down this page.

How to Use

Step-by-step instructions
  1. 1Enter comma-separated X values.
  2. 2Enter comma-separated Y values.
  3. 3View correlation coefficient.

Pearson Correlation

Measures linear relationship between two variables.
r = Σ(x-x̄)(y-ȳ) / √[Σ(x-x̄)² Σ(y-ȳ)²]

Variables:

rCorrelation coefficient (-1 to 1)

Example

Example

Inputs:

X:1,2,3,4,5
Y:2,4,5,4,5

Steps:

  1. 1.Calculate means
  2. 2.Calculate covariance and variances
  3. 3.r = cov / (sd_x × sd_y)
Result:
r value

Correlation Coefficient Calculator: the short answer

Pearson's correlation coefficient r measures how closely two variables follow a straight-line relationship: r = Σ(x − x̄)(y − ȳ) ÷ √(Σ(x − x̄)² × Σ(y − ȳ)²). It ranges from −1 to +1. For x = 1, 2, 3, 4, 5 and y = 2, 4, 5, 4, 5, r = 0.77, a strong positive relationship.

  • r² gives the share of variation in y explained by a linear fit (here 0.60, or 60%).
  • Correlation does not imply causation.
  • Pearson's r only captures linear relationships; a perfect curve can have r near 0.

By the SuperCalX team · Reviewed by Dr. Ahmed Mortuza Saleque, founder and editor · Last reviewed · How we check our calculators · También en español

Interpreting r

|r|Strength (common rule of thumb)
0.00 – 0.19Very weak
0.20 – 0.39Weak
0.40 – 0.59Moderate
0.60 – 0.79Strong
0.80 – 1.00Very strong

Before trusting a correlation

  • Plot it: a scatter plot reveals curves and outliers. Try the data plotter.
  • Check sample size; r from 5 points is very uncertain.
  • Look for a third variable that drives both.
  • Covariance gives the direction in raw units; see the covariance calculator.

Testing whether r is significant

With a small sample, a large r can still arise by chance. The test statistic t = r√(n − 2) ÷ √(1 − r²) follows a t distribution with n − 2 degrees of freedom. For the example (r = 0.775, n = 5), t = 0.775 × 1.732 ÷ 0.632 = 2.12, which is below the 5% critical value of 3.18, so the correlation is not statistically significant despite looking strong.

As a rough guide, with 30 pairs an |r| above about 0.36 is significant at the 5% level; with 100 pairs, above about 0.20.

Worked examples

x = 1–5, y = 2, 4, 5, 4, 5

  1. x̄ = 3, ȳ = 4.
  2. Σ(x − x̄)(y − ȳ) = 6; Σ(x − x̄)² = 10; Σ(y − ȳ)² = 6.
  3. r = 6 ÷ √(10 × 6) = 6 ÷ 7.746.

r = 0.775.

Common mistakes

  • Reading a correlation as proof that one variable causes the other.

Correlation Coefficient Calculator FAQ

What is a strong correlation?

An |r| of 0.7 or above is usually called strong, but in fields like psychology 0.3 can be meaningful.

What does a negative correlation mean?

As one variable rises, the other tends to fall.

What is Spearman's rank correlation?

Pearson's r computed on the ranks of the data. It measures any consistently increasing or decreasing relationship and is less affected by outliers.

What does r = 0 mean?

No linear relationship. There could still be a strong non-linear one, such as a U-shape.

Add this calculator to your website

Teachers, bloggers and businesses can show the Correlation Coefficient Calculator on their own pages for free. Copy this code and paste it into your page's HTML:

Please keep the credit link so readers can find the formula, worked examples and guide.