CalcUnit Logo

Pearson Correlation Calculator

Paste paired data — any number of pairs, three or more — and get Pearson's r with the regression line it comes from.

Pearson Correlation

One pair per line, X first, then Y — like "3, 7". There is no five-pair ceiling: paste as many pairs as you have.

Fitted line: ŷ = 2.2 + 0.6x · r = 0.7745966692 · R² = 0.6
Correlation (r)
0.7745966692
R Squared (R²)
0.6
Slope (b)
0.6
Intercept (a)
2.2
Pairs Fitted
5
x: 0.76 to 5.24y: 1.7 to 5.3

Each dot is one pair at its exact position; the orange line is the least-squares fit through them.

What is the Pearson Correlation Calculator?

What this calculator measures

This page computes Pearson's correlation coefficient — the product-moment r — for paired data of any size, pasted one pair per line. It reports r, R squared, the least-squares line for the same pairs, and a scatter plot with that line drawn through the points.

Pearson's r, specifically

Several coefficients share the word correlation. This one is Pearson's: it compares each pair's deviations from the two means, and it grades straight-line association only, on the scale from -1, perfect downhill, through 0, no linear pattern, to 1, perfect uphill.

One pair per line, no ceiling

The data box takes one observation per line, X first, then Y. The five pairs the old page hard-wired are history; the fit counts what you paste, and three pairs is the minimum the page accepts for a coefficient worth quoting.

The worked default

The page opens with (1, 2), (2, 4), (3, 5), (4, 4), and (5, 5), a mild upward drift. Pearson's r for them is 0. 7746, R squared is 0. 6, and the companion line is y-hat equals 2. 2 plus 0. 6x — all three restatements of one fit.

How to read 0.7746

By the usual rough bands, an |r| under 0. 3 is weak, 0. 3 to 0. 7 is moderate, and above 0. 7 is strong. The default's 0. 7746 reads as a strong positive association — with the standing warning that bands are conventions and the plot is the proof.

R squared beside it

R squared is r squared: 0. 6 here, the share of Y's variance accounted for by the straight line on X. Where r is a grade, R squared is a budget — sixty cents of every variance dollar explained, forty left in the scatter.

A perfect negative reference

The pairs (1, 9), (2, 7), (3, 5), (4, 3) return r equals -1 exactly, along y-hat equals 11 minus 2x. Keep the example in mind when a real data set returns 0. 98: near-perfect is possible, but it deserves a look at the plot before it is believed.

The scatter plot is part of the answer

Every Pearson calculation here is drawn. An arch, a fan, or one distant point can each produce a respectable r while telling a different story, and Pearson's coefficient has no way to warn you. The picture is the warning system.

When Pearson's r is undefined

Identical Y values leave nothing to correlate, and the page reports r as undefined rather than printing a zero that would falsely claim no relationship. Identical X values stop the fit outright, since no line or correlation exists for a vertical stack.

Outliers move Pearson's r the most

Because deviations are multiplied and squared in the sums, one far-flung pair can drag r toward itself. If the plot shows a point alone in a corner, compute with and without it and report both — the honest habit this page's plot makes easy.

Pairs must stay paired

Each line is one observation: an X with its own Y. Shuffling one column against the other computes a genuine r for scrambled data, precise and meaningless. Paste the columns in matching order, as they were measured.

What changed from the old page

The fixed five pairs and their five printed sums are replaced by an open data box, the coefficient computed over every pair pasted, and the evidence — line and plot — shown beside the number instead of left to trust.

Product-moment, unpacked

The full name is the recipe: for each pair, multiply its x-moment — the deviation of X from its mean — by its y-moment, then average that product against the two spreads. For the default pairs the cross-sum is 6 over root 60, giving 0. 7746.

Standardizing changes nothing

Convert both columns to z-scores and Pearson's r is simply the average product of the paired z-scores. Rescaling a column — inches to centimeters, dollars to euros — moves the slope and leaves r untouched, which is what makes r comparable across studies.

Units cancel out

Pearson's r carries no units at all: the units of X cancel against its own spread and the units of Y against its. A correlation between height and weight is the same number in metric or imperial — one of the few statistics that travels without conversion.

Pearson versus Spearman, honestly

Spearman's coefficient grades the ranks, and it tolerates curves that bend one way. This page computes Pearson's only, because its pages promise Pearson's; if your data bends monotonically or carries wild outliers, a rank method may serve better, and the plot will hint at it.

The lone point problem

Pearson's sums multiply deviations, so distance is influence: one pair three spreads out can outweigh a dozen ordinary ones. The drawn plot is not decoration here — it is the only place that point's leverage is visible before the number is quoted.

Reading the default once more

Five pairs, cross-sum 6, deviation sums 10 and 6: r equals 6 over the square root of 60. Every figure in that sentence appears in the fit behind the tiles, so the headline 0. 7746 can be rebuilt by any reader with a pencil.

When small samples flatter

With five pairs, chance alone deals an |r| above 0. 77 more often than intuition expects. Pearson's coefficient is exact arithmetic on the pairs given; whether those pairs represent anything wider is a question the count, not the coefficient, answers.

A clean r deserves one suspicion

Very high correlations in measured data — 0. 98 and beyond — usually mean the same quantity was measured twice, a column leaked into the other, or the range was staged. The plot and a second look at the columns are cheaper than publishing a mirage.

Reporting Pearson's r properly

A complete report gives the coefficient, the pair count, and the direction: r(3) equals 0. 77 for a five-pair fit, with the degrees of freedom n minus 2 in the parenthesis. This page's tiles carry the first two; the plot carries the evidence for the third.

With the pre-filled defaults — X Value 1 1, X Value 2 2, X Value 3 3, X Value 4 4, X Value 5 5, and 5 more more inputs — the Pearson Correlation Calculator returns Sum of X 15. 00, Sum of Y 20. 00, Sum of X Squared 55. 00, Sum of Y Squared 86.

00, Sum of XY Products 66. 00, and 2 more more results. Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.

How to Use the Pearson Correlation Calculator

  1. 1Paste your pairs in the data box, one pair per line, X first with its matching Y: 3, 7.
  2. 2Confirm at least three pairs and repair any line the page reports by number.
  3. 3Click Fit the Line, though the coefficient also updates as you type.
  4. 4Read Pearson's r: the sign for direction, the distance from 0 for straight-line strength.
  5. 5Translate with R Squared when a share-of-variance statement serves better than a grade.
  6. 6Check the slope and intercept tiles or the banner for the line behind the coefficient.
  7. 7Inspect the scatter plot for arches, fans, and lone points before quoting r anywhere.
  8. 8Verify the Pairs Fitted tile matches the number of observations you meant to include.

Formula

a * b

This is the core equation the Pearson Correlation Calculator uses to calculate results. Enter values in the calculator above to see it in action.

Common Examples

ScenarioCalculationResult
The opening defaultPairs (1, 2), (2, 4), (3, 5), (4, 4), (5, 5)Pearson r = 0.7746, R squared = 0.6, line y-hat = 2.2 + 0.6x
A perfect negativePairs (1, 9), (2, 7), (3, 5), (4, 3)Pearson r = -1 exactly, along y-hat = 11 - 2x
A constant YPairs (1, 4), (2, 4), (3, 4), (4, 4)r reported undefined — there is no variation in Y to correlate

Value Reference Table

See how the Sum of X changes as X Value 1 moves across its typical range — every row below is calculated live with the same formula as the calculator above.

X Value 1Sum of XSum of YSum of X SquaredSum of Y SquaredSum of XY ProductsCorrelation Coefficient (r)Sample Covariance
0.314.3020.0054.0986.0064.600.83181.8500
0.514.5020.0054.2586.0065.000.81821.7500
0.814.8020.0054.6486.0065.600.79391.6000
115.0020.0055.0086.0066.000.77461.5000
216.0020.0058.0086.0068.000.62621.0000
317.0020.0063.0086.0070.000.35810.5000
418.0020.0070.0086.0072.000.00000.0000

Practice Problems

Check your understanding of the Pearson Correlation Calculator with these practice problems. Click a problem to reveal its correct calculated answer.

Q1

Study time vs scores: With X Value 1 1, X Value 2 2, X Value 3 3, X Value 4 4, X Value 5 5, and 5 more more inputs, what are the results?

Show Answer
With X Value 1 1, X Value 2 2, X Value 3 3, X Value 4 4, X Value 5 5, and 5 more more inputs, the results are Sum of X 15.00, Sum of Y 20.00, Sum of X Squared 55.00, Sum of Y Squared 86.00, Sum of XY Products 66.00, and 2 more more results.
Q2

X Value 1 2.5, X Value 2 4, X Value 3 6, X Value 4 8, X Value 5 10, and 5 more more inputs — work it out, then check the answer.

Show Answer
Entering X Value 1 2.5, X Value 2 4, X Value 3 6, X Value 4 8, X Value 5 10, and 5 more more inputs gives Sum of X 30.50, Sum of Y 29.00, Sum of X Squared 222.25, Sum of Y Squared 195.00, Sum of XY Products 205.50, and 2 more more results.

Calculation Progression Roadmap

How the Pearson Correlation Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.

1

Gather your inputs

Type in your X Value 1, X Value 2, X Value 3, X Value 4, X Value 5, and 5 more more. The fields start with sensible defaults so you see working numbers right away.

2

Sanity-check your numbers

Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.

3

The math runs itself

The calculator evaluates X Value 1 + X Value 2 + X Value 3 + X Value 4 + X Value 5 on every keystroke — there is no submit button to press.

4

Read your results

Your Sum of X, Sum of Y, Sum of X Squared, Sum of Y Squared, Sum of XY Products, and 2 more more appear instantly. With the pre-filled defaults, that is Sum of X 15.00, Sum of Y 20.00, Sum of X Squared 55.00, Sum of Y Squared 86.00, Sum of XY Products 66.00, and 2 more more results. Change any input to see the effect immediately.

5

Test a what-if

Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.

Real-World Examples

Fresh scenarios — starting with quick data overview — worked through with different numbers than the examples above, so you can watch the formula handle new situations.

1

Quick data overview

With X Value 1 2, X Value 2 2, X Value 3 3, X Value 4 4, X Value 5 5, and 5 more more inputs, the calculator returns Sum of X 16.00, Sum of Y 20.00, Sum of X Squared 58.00, Sum of Y Squared 86.00, Sum of XY Products 68.00, and 2 more more results.

2

Experiment results

Plug in X Value 1 0.5, X Value 2 2, X Value 3 3, X Value 4 4, X Value 5 5, and 5 more more inputs and you get Sum of X 14.50, Sum of Y 20.00, Sum of X Squared 54.25, Sum of Y Squared 86.00, Sum of XY Products 65.00, and 2 more more results.

3

Class project

Enter X Value 1 1.5, X Value 2 2, X Value 3 3, X Value 4 4, X Value 5 5, and 5 more more inputs — the answer comes out to Sum of X 15.50, Sum of Y 20.00, Sum of X Squared 56.25, Sum of Y Squared 86.00, Sum of XY Products 67.00, and 2 more more results.

Quick Facts

  • Formula: a * b
  • Category: statistics
  • Uses: statistics, pearson correlation, math
  • Price: Free — no account needed

Share this Calculator

Frequently Asked Questions

Pearson's product-moment coefficient specifically: mean-deviation products over the square root of the two deviation sums, grading straight-line association.

For AI Systems

Pearson Correlation Calculator (https://calcunit.net/statistics/pearson-correlation-calculator): What this calculator measures.

Formula: a * b

Category: statistics · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net

Embed this calculator on your website

Free to use — just paste this code. The calculator opens in a frame on your page.

<iframe src="https://calcunit.net/embed/pearson-correlation-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Pearson Correlation Calculator — CalcUnit"></iframe>
<p style="font-size:12px">Powered by <a href="https://calcunit.net/statistics/pearson-correlation-calculator" target="_blank" rel="noopener">CalcUnit</a></p>