Association · Linear models
Correlation & Regression Calculator
Paste paired data to get Pearson's r (with a confidence interval and significance test) and the least-squares line — slope, intercept, R² — plotted as a scatter with its fit. With the warnings correlation always deserves.
Result
In plain English
This measures how two numbers move together, and draws the best straight line through the cloud of points.
- Pearson r
- How tightly the points hug a straight line: from −1 (perfect downhill) through 0 (no straight-line link) to +1 (perfect uphill).
- R²
- The fraction of the up-and-down in y that the line accounts for. 0.8 means the line explains 80% of the variation.
- slope
- How much y changes for each one-unit increase in x.
- intercept
- Where the line crosses the y-axis — its value when x = 0.
- p-value
- How likely a correlation this strong would appear by chance if the two things were really unrelated.
- the catch
- r only measures straight-line association, and is easily thrown by a single outlier — which is why the calculator always plots the points.
Frequently asked
Does correlation prove causation?
No. A strong r only means two things move together; it can't tell you whether one causes the other, whether something else drives both, or whether it's coincidence. See the spurious-correlation machine.
What does R² mean?
R² is the fraction of the variation in y that the straight-line fit accounts for — 0.8 means the line explains 80% of the up-and-down in y. It says nothing about whether a straight line is the right model.
Can one outlier change the correlation?
Very much so — a single stray point can create or destroy an r, which is why this calculator always plots the data. Anscombe's quartet shows four datasets with identical r and wildly different shapes.
What is the difference between the correlation and the regression slope?
Correlation (r) is a unitless measure of how tightly the points hug a straight line, running from −1 to +1. The regression slope is the line’s actual gradient, in real units — how much y changes per unit of x. You can have a steep slope with weak correlation (a strong trend buried in scattered points) or a gentle slope with strong correlation (a faint trend the points follow closely). They answer different questions, so quote both.