Skip to content
FiftyCalc Free calculators for all 50 states

Pearson Correlation Calculator

Test cases replayed : 2 of 2 match · Methodology · No outside source listed

Paste two lists of paired values, x and y, in the same order to measure the strength of their linear relationship.

Result

Sample figures

Pearson correlation coefficient (r)—

Coefficient of determination (r²) —

  • Number of pairs—
  • Sample covariance—
  • Least-squares line—
  • Note—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Pearson Correlation Calculator

x values (separated by commas, spaces or new lines): type or paste your values. Prefilled example: 1, 2, 3, 4, 5, 6.

y values, same order and count: type or paste your values. Prefilled example: 2, 4, 5, 4, 5, 7.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. x values (separated by commas, spaces or new lines): type or paste your values.
  2. y values, same order and count: type or paste your values.
  3. Read the result: Pearson correlation coefficient (r); the panel also shows Coefficient of determination (r²), Number of pairs, Sample covariance, Least-squares line and Note.

How this calculator works

Pearson's correlation coefficient: r = Σ(xᵢ − x̄)(yᵢ − ȳ) ÷ √(Σ(xᵢ − x̄)² × Σ(yᵢ − ȳ)²). It ranges from −1 (perfect negative line) through 0 (no linear relationship) to +1 (perfect positive line).

r² is the share of the variance of y explained by the least-squares line y = a + bx, with slope b = Σ(xᵢ − x̄)(yᵢ − ȳ) ÷ Σ(xᵢ − x̄)² and intercept a = ȳ − b x̄.

r measures linear association only: a strong curved relationship can have r near 0, and correlation alone does not show cause.

Worked example

x values (separated by commas, spaces or new lines)1, 2, 3, 4, 5, 6
y values, same order and count2, 4, 5, 4, 5, 7
Pearson correlation coefficient (r)0.8783
Coefficient of determination (r²)0.7714
Number of pairs6
Sample covariance2.7
Least-squares liney = 1.8 + 0.771429x

Frequently asked questions

What is r for x = 1 to 6 and y = 2, 4, 5, 4, 5, 7?

r ≈ 0.8783, so r² ≈ 0.7714: the line explains about 77% of the variation in y.

What counts as a strong correlation?

There is no single rule; many textbooks call |r| above about 0.7 strong and below 0.3 weak, but the field and the sample size matter.

Questions answered

Related calculators