Linear Correlation Coefficient r Calculator (Pearson r)

Linear Correlation Coefficient r Calculator

Enter paired X and Y data to compute the Pearson linear correlation coefficient r, the coefficient of determination r squared, and the least-squares regression line y = a + bx. The tool also returns the means and standard deviations of each variable, the covariance, and a t-test with a strength and direction verdict.

🎯Real Paired-Data Presets

📝Paired Data Input

Paste one column of numbers. Must match the count of Y values.

Each Y is paired with the X in the same position.

How the numbers in each box are split apart.

Rounding applied to every reported number.

Optional name shown in results, e.g. Height.

Optional name shown in results, e.g. Weight.

Threshold for the two-tailed t-test on r.

Toggle the least-squares fit line card and rows.

Pearson r 0 linear correlation coefficient
r squared 0% variance in Y explained by X
Regression line y = a + bx least-squares best fit
Significance (t-test) t = 0 n pairs and verdict

🔢Formula Snapshot

rSxy / root(Sxx Syy)
fraction explained
br × sy / sx
aybar − b xbar

📊Correlation Strength Bands

Absolute rStrengthWhat It Means for a Scatter Plot
0.90 to 1.00Very strongPoints hug the line tightly
0.70 to 0.89StrongClear linear trend, little scatter
0.40 to 0.69ModerateTrend visible but noticeable spread
0.10 to 0.39WeakSlight tilt, lots of scatter
0.00 to 0.09NegligibleEssentially a flat cloud

📏Critical r Values by Sample Size

n pairsdf = n - 2Critical r at 0.10Critical r at 0.05Critical r at 0.01
530.8050.8780.959
640.7290.8110.917
860.6210.7070.834
1080.5490.6320.765
15130.4410.5140.641
20180.3780.4440.561
30280.3060.3610.463
50480.2350.2790.361
100980.1650.1970.256

📈r Versus r Squared Interpretation

Pearson rr squaredVariance ExplainedPractical Read
1.001.00100%Perfect straight line
0.900.8181%Very strong fit
0.800.6464%Strong, one third unexplained
0.700.4949%About half explained
0.500.2525%Only a quarter explained
0.300.099%Weak, mostly noise
0.100.011%Almost nothing explained

Pearson r Assumptions Checklist

AssumptionWhy It MattersQuick Check
Linearityr only measures straight-line fitLook at the scatter plot
Paired numeric dataEach X needs one matching YEqual list lengths
Interval or ratio scaleRanks need Spearman insteadValues are true measurements
No extreme outliersSingle points can distort rInspect min and max
Roughly bivariate normalNeeded for the t-test p valueSymmetric, no heavy skew
Independent observationsRepeated measures bias rOne row per subject

🗃Sample Size Versus Critical r Comparison Grid

n pairsdfCrit r 0.10Crit r 0.05Crit r 0.01Min r for Strong
530.8050.8780.9590.70
750.6690.7540.8740.70
970.5820.6660.7980.70
12100.4970.5760.7080.70
16140.4260.4970.6230.70
25230.3370.3960.5050.70
40380.2640.3120.4030.70
60580.2140.2540.3300.70
80780.1850.2200.2860.70
1201180.1510.1790.2340.70

Formula Breakdown

Means xbar and ybarAdd each column and divide by n. The means are the balance point the regression line always passes through.
Sums of squaresSxx = sum of (x - xbar) squared, Syy = sum of (y - ybar) squared, and the cross product Sxy = sum of (x - xbar)(y - ybar).
Pearson rr = Sxy / root(Sxx × Syy). It is bounded between -1 and +1, where the sign is the direction of the trend.
Coefficient of determinationr squared is simply r times r, the fraction of the variance in Y that the linear fit on X explains.
Slope bb = Sxy / Sxx, which also equals r × (sy / sx). It is the change in Y for a one-unit rise in X.
Intercept aa = ybar - b × xbar, the predicted Y when X equals zero, completing the line y = a + bx.
Covariancecov = Sxy / (n - 1). Unlike r it keeps the original units, so it is not comparable across data sets.
t statistict = r × root((n - 2) / (1 - r squared)) with n - 2 degrees of freedom, compared to the critical value at your alpha.

💡Correlation Reading Tips

A low r is not proof of no link: Pearson r only detects straight-line association. A U-shaped or curved pattern can have r near 0.00 yet be almost perfectly predictable. For example y = x squared over a symmetric range gives r close to zero. Always plot the raw points before you conclude there is no relationship.
Square r to judge usefulness: r squared is the share of variance explained, so r = 0.80 means 0.64, or 64%, of the variation in Y is captured, leaving 36% to other factors. Dropping from r = 0.90 to r = 0.70 cuts explained variance from 81% down to 49%, a much bigger loss than the r values alone suggest.

It’s easy to enter both sets of numbers in the two columns and see if there is any connection at all. Perhaps it’s the amount spent on advertising versus monthly revenue, or maybe it’s the number of hours studying versus the score on an exam. Whatever the connection may be… Does it exist? How strong is it?

That’s where the Linear Correlation Coefficient (r) Calculator comes in. Paste in your pairs of numbers and click calculate. You will get a precise answer to your question and a lot more. Several concepts appear, including standard deviation, covariance, and the least squares regression line. You will also see coefficient of determination r squared, Pearson r value, and a significance test. The hard math work is done for you while you can concentrate on interpreting what it all means to you personally.

Understanding the Linear Correlation Coefficient Calculator

Pearson r are a number between minus one and plus one. The higher it is, the more closely related two variables are on a straight line. This is why it is called Pearson’s Correlation Coefficient or Pearson r. Because of this it is a unitless quantity.

Near zero indicates there is no linear relationship, but does not necessarily mean there is no relationship. You might just have a perfectly U-shaped curve with an r close to zero because the trend reverse direction. This is where folks go wrong. If Pearson r is low then they think Y and X must be independent, when what might really be true is that Pearson r only measures straight line relationships. Plot your data first. If your points make a parabola, r will lead you astray despite how predictable Y are given X.

The math is also relatively straightforward, though it’s done rigorously. First, the calculator find the deviation from the mean for each variable. Then it squares these, adds them, divides by the square root of the product of the two squared sums, and finally rescales them. What this does is remove the units so you can judge how strong an association is between weight and height compared to, say, energy use and temperature.

The sign of r tell us the direction: One goes up; the other down. A positive number mean they go up together. Negative is when one goes down as the other goes up. Magnitude tells you strength. Above 0.7 is generally regarded as strong; below 0.4 is weak.

If you square r you get something that is called r squared, and also known as coefficient of determination. It’s perhaps a more practical number for people trying to make decisions, since we can read it directly as a percentage. If your r is 0.8 then your r squared is 0.64, that means that sixty four percent of the variance in Y is attributable to X. Thirty six percent of it is either noise or caused by other things which you haven’t measured. This helps explain why modest correlations may be disappointing in practice. An r of 0.5 sounds pretty strong, but it actualy only accounts for twenty five percent of the variation. That leaves the rest unaccounted for.

It also plots a regression line through your data points. You can use that line, written y equals a plus bx, to make predictions. B is called the slope; it represents the change in Y per unit of X. A anchors the line where X equals zero. The calculator calculates these based off the same sums of squares that r relies on.

It also conducts a t test to determine whether your correlation is meaningful (statistically significant) or merely a result of having such a small sample. To achieve statistical significance with only five pairs of data, you would of to have an extremely high r. With a larger sample, weaker correlations grows statistically significant. That’s important because large datasets can have weak but real relationships, and tiny ones may contain strong relationships that are pure chance.

Do verify your input. Confirm that you have interval scaled, numeric data. R is sensitive to outliers, which will tug the line towards themselves and skew results. A single outlier can make a mild relationship appear to be much stronger or much weaker than it is. Fortunately, the calculator includes some other stats such as standard deviations and how variables change together that allow you to see this influence. Standard deviation maintains the units of measurement, which makes the result difficult to grasp, but demonstrates the actual variance in raw numbers prior to the standardizing process. Seeing the spread. And mean, gives you more context for the snugness or looseness of your cloud of data points.

Remember that correlation is not necessarily causation. There may be an increase in ice-cream sales and drownings, but that doesn’t mean that ice-cream sales cause drownings. They’re both caused by the summer heat. Mathematically speaking, there is a connection as evidenced by the calculator, but you need to supply the domain expertise to make sense of it.

To help with this, it has some presets for common associations (such as GPA vs study time, height vs weight) so that you can test your familiarity with them before trying something yourself. When you input your own data, whether to confirm a scientific theory or validate a business hunch, the numbers will indicate how confident you should feel about a linear relationship between two things.

Finally, remember: always look at your data, you’ll see things a simple coefficient can’t. Test its significance so you’re sure it’s not just luck. Use r squared as a measure of how much it explains. And keep that mix of intuition and math. It turns raw data into real insight.

Linear Correlation Coefficient r Calculator (Pearson r)