Correlation Coefficient Calculator (Pearson r + r²)

Correlation Coefficient Calculator

Enter paired X and Y values to compute the Pearson correlation coefficient r, covariance, and the coefficient of determination r-squared, then read the strength and direction of the linear relationship.

📈Real Data-Pair Presets

🔢Enter Your Paired Data

Separate with commas, spaces, or new lines.

Must have the same count as X values.

Pearson r 0 correlation coefficient
R-squared 0 variance explained
Strength & direction interpretation of r
Covariance 0 sample cov(x, y)

🧮Formula Snapshot

0Pairs n
0Mean of X
0Mean of Y
0Pearson r

📊Computation Table

#xyx × y
Enter paired data above to build the computation table.

📏Correlation Strength Reference

Absolute rStrength LabelPositive MeaningNegative Meaning
0.00 to 0.19Very weakBarely rises togetherBarely falls together
0.20 to 0.39WeakSlight upward linkSlight downward link
0.40 to 0.59ModerateNoticeable upward linkNoticeable downward link
0.60 to 0.79StrongClear upward trendClear downward trend
0.80 to 1.00Very strongTight positive fitTight negative fit

📐r Versus r-squared Meaning

Pearson rr-squaredVariance ExplainedPlain Reading
1.001.00100%Every point on one line
0.900.8181%Very strong shared movement
0.700.4949%About half explained
0.500.2525%Quarter explained
0.300.099%Little shared variance
0.000.000%No linear link

🗂Covariance and Coefficient Comparison

ScenarioPatternTypical rSign of Covr-squaredTakeaway
Study vs gradeRises together+0.98Positive0.96Very strong positive
Height vs weightRises together+0.85Positive0.72Strong positive
Temp vs ice creamRises together+0.92Positive0.85Strong positive
Price vs demandMoves opposite-0.94Negative0.88Strong negative
Age vs reactionMoves opposite-0.80Negative0.64Strong negative
Shoe size vs IQScattered0.05Near zero0.00Essentially none

Full Formula Breakdown

Pairs and sumsCount n pairs, then build Sx = Σx, Sy = Σy, Sxy = Σxy, Sxx = Σx², and Syy = Σy².
Pearson rr = (n·Sxy – Sx·Sy) / √((n·Sxx – Sx²)·(n·Syy – Sy²)). The result always lands between –1 and +1.
Meansx̄ = Sx / n and ȳ = Sy / n give the center point (x̄, ȳ) that the trend passes through.
Sample covariancecov(x, y) = (Sxy – Sx·Sy / n) / (n – 1). Population covariance divides by n instead of n – 1.
Standard deviationssx = √((Sxx – Sx²/n) / (n – 1)) and the same form for sy. Then r also equals cov(x, y) / (sx·sy).
Coefficient of determinationr² is simply r multiplied by itself. It is the share of Y variance explained by a linear fit on X.
GuardsAt least 2 pairs are required, and if either variable never changes the denominator is 0, so r is undefined.

📋Quick Interpretation Reference

ValueWhat It Tells YouWhat It Does Not Tell You
Sign of rDirection: plus rises together, minus moves oppositeWhich variable causes the other
Size of |r|How tightly points hug a straight lineThe slope or steepness of that line
r-squaredFraction of variance a line explainsWhether the true pattern is curved
CovarianceDirection plus scale in original unitsA bounded, unit-free strength score

💡Practical Correlation Tips

Correlation is not cause: A high r only means two measures move together. A hidden third factor, or pure coincidence, can create a strong r with no real cause between X and Y.
Watch outliers and curves: Pearson r only sees straight-line patterns. One extreme point can inflate or hide r, and a clean U-shape can give r near 0 while a strong relationship still exists.

Suppose you’re looking at two lists of numbers. The first list represent hours studied for an exam; the second list contains your final grade on that exam. There’s a good chance that these variables relate to each other, but let me tell you: Intuition is not a very good statistician. It’ll guess correlations where there are none and miss ones that realy do exist.

That’s when Pearson’s r comes along and does all the heavy lifting. From those two messy columns of data, it squeezes out a single number between plus one and minus one. That number will tell you precisely how tightly your variables hugs a straight line together. And by stripping away the noise, we can more clearly see signal. You can use calculator above to do this for you.

Understanding Pearson’s r

But how do you interpret the answer? You have to look beyond decimal points. For starters, the sign on the number will tell you immediately which way to go. If there’s a plus sign, then the two variables tend to move together, study harder and your grade improves; hot weather leads to higher ice cream sales. Simple: when one moves so does the other.

A negative r-value, however, signals an inverse relationship between the two variables, such that when one goes up the other go down. Price and demand, perhaps? Or maybe something like age and reaction time in some physical task. The variables remains connected, but they move in opposite directions. That directional information can be even better than magnitude, since now you know whether to expect a boost or a penalty from increasing a variable.

Now here’s where you see how strong that link is: it’s the absolute value of r. The closer it gets to plus or minus one, the stronger association. When it hovers around zero, there is almost no linear relationship whatsoever. It would of been like guessing one variable based on the other. About as accurately as flipping a coin. Points will be scattered randomly.

When r is close to plus or minus one, however, those points will be clustered closely around an imaginary line. In most cases with real world data, it will fall somewhere in between (between.4 and.8). This means it’s moderately strong. It is strong enough to be predictive, yet not so strong that we aren’t thinking about other factors.

And r-squared helps us take that strength and put it in terms that might make more sense: How much of the variability in one does the other explain? If r =.7, then r-squared =.5, which tells us about half of the variability can be explained by its relationship with the other variable. The remainder is some kind of mysterious variation.

The danger of this leap is that people mistake correlation for causation. Two things moving together doesn’t imply that one causes the other. Shark attacks and ice cream sales both spike in the summer, but neither summons the predators by eating more gelato. Both are driven by a hidden third variable (in this case, heat). That hidden variable is what the calculator cannot see. All it knows how to report is the mechanical link between your provided columns, and it’s up to you to apply domain knowledge to explain why that link exists.

Before assuming cause, always ask if there’s a plausible mechanism connecting the variables. That said, outliers can be particularly misleading in skewing results. One weird data point might raise (or lower) r, giving an illusion of a strong correlation where there isn’t much or disguising one altogether. The assumption behind Pearson’s approach is that relationship is linear; if yours follows a curve instead, the coefficient could sink to close to zero despite having a perfect pattern. It measures straight lines alone. Examine a scatter plot first if you think your trend is non-linear.

So if you’re inputting your own data make sure that it’s lined up properly. Each row should contain a pair of x and y values where the x value corresponds with the y value in that same row. If they don’t match, then this will mess up the calculation and result in some pretty silly results.

There is also an option to specify whether the data is from a population (i.e., all cases) or sample (a select sub-set). Since we almost never collect data on all instances of any given occurrence, the sample setting is what you’ll want for most practical applications.

To conclude. The coefficient is not a prediction; it’s a snapshot of linear association. So don’t rely on it as evidence; let it inform your hypotheses. Be mindful of outliers, and keep an eye out for the shape of your data. Know that each number represents something in the real world, which the numbers alone can never show. Perhaps there truly is some relationship between those two variables; but perhaps it’s merely coincidental, disguised as causation. That’s where you come in.

Correlation Coefficient Calculator (Pearson r + r²)