Loona Calculators
Loona Calculators › Maths › Correlation Calculator

🔗 Correlation Calculator

Paste two columns of paired measurements and get Pearson's correlation coefficient r — how strongly the two variables move together in a straight-line pattern — plus r² and the regression-ready sums.

Quick answer: Pearson r runs from −1 (perfect downward line) through 0 (no linear link) to +1 (perfect upward line). For x = 1,2,3,4,5 and y = 2,4,5,4,5, r = 0.775 — a strong positive correlation, with r² = 0.60.

How to use the Correlation Calculator

  1. Paste the x values in the first box and the matching y values in the second, in the same order.
  2. Use spaces, commas or new lines as separators — the counts must match (at least 3 pairs).
  3. Read r, its strength band, and r².
Example: Hours studied (x) against test score (y) for five students — x: 1 2 3 4 5, y: 2 4 5 4 5 — gives r = 0.775: more study generally goes with higher scores, in this tiny sample.

Frequently Asked Questions

Does correlation mean one variable causes the other?

No — the calculator's most important warning. Correlation can arise from causation in either direction, from a third variable driving both, or by coincidence in small samples. r measures co-movement, nothing more.

What counts as strong or weak?

A common rule of thumb: |r| under 0.3 weak, 0.3–0.7 moderate, over 0.7 strong. Context matters — 0.4 can be important in medicine and meaningless in physics.

What if the relationship is curved?

Pearson r only sees straight-line patterns. A perfect U-shape can score r ≈ 0. Always plot the data (the Linear Regression Calculator draws the scatter) before trusting r alone.

What is r²?

The share of y's variance linearly accounted for by x. r = 0.775 gives r² = 0.60 — about 60% of the variation in y lines up with x in the linear model.

Related Calculators

%

Percentage Calculator

Maths

📊

Statistics Calculator

Maths

½

Fraction Calculator

Maths

🧮

Equation Solver

Maths

🔬

Scientific Calculator

Maths

📐

Average Calculator

Maths

🔔

Z-Score Calculator

Maths

🎲

Probability Calculator

Maths

📈

Linear Regression Calculator

Maths

How it works — the formula

r = Σ(x − x̄)(y − ȳ) ÷ √(Σ(x − x̄)² × Σ(y − ȳ)²). The numerator (covariance, unnormalised) is scaled by both variables' spreads, which is what pins r to the range [−1, 1].

Worked example

Inputs: x = [1,2,3,4,5], y = [2,4,5,4,5].

Steps: x̄ = 3, ȳ = 4. Σ(x−x̄)(y−ȳ) = (−2)(−2) + (−1)(0) + 0(1) + 1(0) + 2(1) = 4 + 0 + 0 + 0 + 2 = 6. Σ(x−x̄)² = 10. Σ(y−ȳ)² = 4 + 0 + 1 + 0 + 1 = 6. r = 6 ÷ √(10 × 6) = 6 ÷ 7.746 = 0.7746.

Result: r = 0.775, r² = 0.600.

Embed this calculator on your website — free

Add this calculator to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the calculator to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.