Correlation Coefficient Calculator

Calculate Pearson’s correlation coefficient r from paired x and y data, with the sums Sxx, Syy and Sxy shown, r², a strength description and a t-test of whether the correlation is significantly different from zero.

Pearson r
0.9942
r²
0.9885
p-value (H₀: ρ = 0)
4.814 × 10^−7
Strength
very strong positive
Dots are your data, the blue line is the least-squares fit, and red dashes are residuals (actual − predicted).

Step-by-step working

  1. Means of x and yx̄ = 4.5, ȳ = 66.75
  2. Sums of squares and cross-productsSxx = Σ(x − x̄)² = 42 Syy = Σ(y − ȳ)² = 815.5 Sxy = Σ(x − x̄)(y − ȳ) = 184
  3. Pearson r = Sxy ÷ √(Sxx · Syy)r = 184 ÷ √(42 × 815.5) = 0.9942
  4. r² = share of variation in y explained by xr² = 0.9885
  5. Test H₀: ρ = 0 with t = r√(n − 2) ÷ √(1 − r²), df = 6t = 22.6775, p = 4.814 × 10^−7

Formula r = Σ(x − x̄)(y − ȳ) ÷ √[Σ(x − x̄)² · Σ(y − ȳ)²]

Ask the tutor about your result

An AI tutor reads your inputs and results above and explains them in plain English. The numbers come from the calculator; the explanation is AI-written, so check it against your notes.

Reading r

r runs from −1 to +1. The sign gives the direction (positive: y tends to rise with x) and the size gives the strength of the linear relationship. Rough guides: |r| above 0.8 is very strong, 0.6–0.8 strong, 0.4–0.6 moderate, 0.2–0.4 weak. These labels vary by field; in physics 0.9 might be disappointing, in psychology 0.3 can be notable.

What r can’t tell you

r only measures straight-line association. A perfect U-shaped relationship can have r = 0. It is sensitive to outliers, and it says nothing about cause: ice-cream sales and drownings correlate because both rise in summer. Always look at the scatter plot, which the linear regression calculator draws.

Frequently asked questions

What is the difference between r and r²?

r is the correlation, with a sign. r² is the proportion of variation in y explained by the linear relationship with x, always between 0 and 1.

Is a correlation of 0.5 significant?

It depends on n. With 10 pairs, r = 0.5 gives p ≈ 0.14 (not significant at 0.05); with 30 pairs, p ≈ 0.005.