Correlation Calculator

Pearson & Spearman Scatter Plot p-Value Free · No Signup

Free online correlation calculator for Pearson and Spearman coefficients. Get R², p-value significance test, interactive scatter plot with trend line, step-by-step KaTeX formulas, and Python scipy export.

Correlation Analysis
Enter paired data — X and Y must have the same number of values (min 3)

Result

📈

Enter paired data and click Calculate

Compute Pearson or Spearman correlation with significance testing.

Scatter Plot

Python Compiler

What Is Correlation?

Correlation measures the strength and direction of the relationship between two variables. The correlation coefficient (r) ranges from −1 to +1.

↗️

Positive (r > 0)

As X increases, Y tends to increase. Example: study hours and exam scores.

↘️

Negative (r < 0)

As X increases, Y tends to decrease. Example: price and demand.

Zero (r ≈ 0)

No linear relationship between X and Y. Points are scattered randomly.

Pearson vs. Spearman Correlation

PropertyPearson (r)Spearman (ρ)
MeasuresLinear relationshipMonotonic relationship
Data typeContinuous, interval/ratioOrdinal or continuous
AssumptionsNormal distribution, no outliersNo distribution assumption
Outlier sensitivityHigh — easily distortedLow — uses ranks
Best forLinear, well-behaved dataRanked data, curves, outliers

Correlation Strength Guide

|r| ValueStrengthMeaning
0.8 – 1.0Very StrongHighly predictive relationship
0.6 – 0.79StrongNotable, meaningful relationship
0.4 – 0.59ModerateClear but not dominant
0.2 – 0.39WeakMinor relationship
0.0 – 0.19Very WeakLittle to no relationship

Correlation ≠ Causation: A strong correlation does not prove that one variable causes the other. There may be confounding variables, reverse causation, or coincidence. Always consider context.

Frequently Asked Questions

Pearson measures linear relationships between continuous variables. Spearman measures monotonic relationships using ranks and is more robust to outliers and non-normal distributions.
r ranges from −1 to +1. The sign shows direction (positive or negative) and the magnitude shows strength. Always visualize with a scatter plot to check for non-linearity or outliers.
No. Correlation shows that two variables move together, but does not prove one causes the other. Confounding variables, reverse causation, or coincidence can all create spurious correlations.
R² is the proportion of variance in Y explained by X. If r = 0.8, then R² = 0.64, meaning 64% of the variation in Y can be attributed to its linear relationship with X.
Significance depends on both correlation magnitude and sample size. A p-value below 0.05 is the standard threshold, but large samples can make even small correlations significant — consider effect size.
Outliers can dramatically affect Pearson correlation. Use Spearman rank correlation which is robust to outliers, or consider removing extreme values after careful investigation of whether they are genuine data points.

Support This Free Tool

Every coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site — you're helping me build what developers actually need.

500K+ users
200+ tools
100% private
Privacy Guarantee: Private keys you enter or generate are never stored on our servers. All tools are served over HTTPS.