Pearson’s r, R² and the regression line for paired data
Enter paired X and Y values (same count in each box, matched in order) to get Pearson’s correlation coefficient, R², and the best-fit regression line.
X and Y need the same count of values, paired in order (8 X values, 0 Y values).
The share link reproduces your exact data and settings — paste it in an email, chat, or assignment and anyone who opens it sees the same results.
Saved to this device only (browser local storage). Use a share link to move data between devices.
Add 5 Number Summary to your home screen or desktop for one-tap access — works offline, no app store needed.
Pearson’s correlation coefficient (r) measures the strength and direction of a linear relationship between two variables. It ranges from −1 (a perfect negative relationship) to +1 (a perfect positive relationship), with 0 meaning no linear relationship at all.
As a rough guide: |r| above 0.7 is usually called a strong relationship, 0.3–0.7 moderate, and below 0.3 weak — but these thresholds vary by field, so treat them as a starting point rather than a rule. R² (r squared) is often more intuitive: it’s the share of the variation in Y that’s explained by X. An r of 0.8 means R² = 0.64, i.e. 64% of Y’s variation is explained by its linear relationship with X.
A strong correlation only shows that two variables move together — it says nothing about which one (if either) causes the other, or whether both are driven by a third factor. This is the single most common misreading of a correlation result.
Alongside r, this calculator fits the least-squares regression line y = slope×x + intercept — the straight line that minimizes the total squared vertical distance from every point to the line. It's the same line you'd get from Excel's SLOPE/INTERCEPT functions or a scatter plot's trendline.
r = Σ(x–x̄)(y–ŷ) ÷ √(Σ(x–x̄)² × Σ(y–ŷ)²). The p-value tests the null hypothesis that the true correlation is zero, using the exact Student-t distribution with n−2 degrees of freedom (same underlying method as the t-test calculator).
This calculator works from 2 pairs upward, but correlation estimates are noisy with small samples — at least 10–20 pairs is a common rule of thumb for a stable estimate.
Yes — Pearson’s r only detects linear relationships. A strong curved (e.g. U-shaped) relationship can produce an r near 0 even though X and Y are clearly related; plot the data if r seems surprisingly low.
Correlation (r) measures how strongly two variables move together, with no assumption about which one is the cause. Regression fits a specific line predicting Y from X, which implicitly treats X as the input and Y as the output.