#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
🔗 FREE · PEARSON & SPEARMAN

Correlation Coefficient Calculator: How Strongly Do Two Things Move Together?

Paste X and Y values to get r, r², Spearman's rho and a scatter plot.

  • 📈 Scatter plot
  • 🏅 Spearman rank too
  • 🧪 Significance p-value

How to use the Correlation Coefficient Calculator

  1. 1. Paste X valuesEnter the first variable, such as study hours.
  2. 2. Paste Y valuesEnter the second variable in the same order, such as marks.
  3. 3. Read r and the plotSee strength, direction, r² and whether it is significant.

Formula with a worked example

Pearson's r measures straight-line association: r = Σ(x − x̄)(y − ȳ) ÷ √[Σ(x − x̄)² × Σ(y − ȳ)²]. It runs from −1 (perfect negative) through 0 (none) to +1 (perfect positive).

For X = 1, 2, 3, 4, 5 and Y = 2, 4, 5, 4, 5: x̄ = 3, ȳ = 4, Σ(x − x̄)(y − ȳ) = 6, Σ(x − x̄)² = 10 and Σ(y − ȳ)² = 6. So r = 6 ÷ √60 = 0.7746 and r² = 0.6, meaning 60% of the variation in Y lines up with X. Spearman's rank correlation on the same data is 0.7379.

Reading the result carefully

  • Strength guide: |r| above 0.7 is strong, 0.5–0.7 moderate, 0.3–0.5 weak. Fields differ, so treat this as a rough guide.
  • Significance: with only 5 pairs, even r = 0.77 has p = 0.124, so it could be chance. More data makes the estimate firmer.
  • Spearman vs Pearson: Spearman uses ranks, so it handles curved but steady trends and is less hurt by outliers.
  • Causation: ice cream sales and drowning both rise in summer. Correlation alone never proves cause.

Always look at the scatter plot. A single outlier can create or hide a correlation, and a U-shaped pattern can show r near 0 even though the variables are closely related. For many columns at once, use the correlation heatmap from CSV; to predict Y from X, use the linear regression calculator.

Frequently asked questions

How many pairs do I need?

At least 3 to compute r, but 20 or more for a result you can trust.

Does the order of values matter?

Yes. The first X must pair with the first Y, the second with the second, and so on.

Is the Correlation Coefficient Calculator free?

Yes, the Correlation Coefficient Calculator is free. The first time you see your first result, you are asked for your name and WhatsApp number once. After that, this and every other Uncodemy tool opens straight away without the form.

More free tools

See all free tools