What is correlation?
Correlation measures how two things move together. When study hours go up and exam marks go up with them, the two are positively correlated. When the price of a product goes up and sales go down, the two are negatively correlated. When there is no pattern at all — umbrella sales and exam marks, say — there is no correlation. This calculator works out Pearson's r, the standard number for correlation, from two lists of numbers you paste in.
Pearson's r runs from −1 to 1. A value of 1 means a perfect straight-line relationship: every point sits exactly on a rising line, like the default lists on this page, 1, 2, 3, 4, 5 against 2, 4, 6, 8, 10. A value of −1 means a perfect falling line. A value of 0 means no straight-line relationship at all. Most real data lands in between, and the calculator also gives you a plain-English reading — strong, moderate, weak, or no correlation — so you do not have to memorise the thresholds.
Paste your two lists into the boxes, separated by commas, spaces or one per line, and the results update live. The maths runs entirely in your browser — nothing is uploaded and nothing is stored. It is built for students meeting correlation for the first time, and for anyone who wants a quick answer to “do these two things move together?”
How Pearson's r is calculated
The formula compares how each pair of values deviates from its own mean. For each pair, multiply the x-deviation by the y-deviation, add those products up, and divide by the square root of the product of the two sums of squared deviations. In symbols: r = Σ(x − x̄)(y − ȳ) ÷ √[Σ(x − x̄)² × Σ(y − ȳ)²]. The numerator is the covariance, and the denominator scales it so the result always lands between −1 and 1.
Take the default lists: x is 1, 2, 3, 4, 5 and y is 2, 4, 6, 8, 10. The mean of x is 3 and the mean of y is 6. The deviations of x are −2, −1, 0, 1, 2, and the deviations of y are −4, −2, 0, 2, 4. The products are 8, 2, 0, 2, 8, adding up to 20. The sum of squared x-deviations is 10, and the sum of squared y-deviations is 40, so the denominator is √(10 × 40) = √400 = 20. The result is 20 ÷ 20 = 1 — a perfect positive correlation.
The square of r, written r², is the share of the variation in y that the straight-line relationship with x explains. For the default lists r² is 1, so 100% of the variation is explained. For an r of 0.5, r² is 0.25, so only a quarter of the variation is explained — the rest comes from other things. That is why the calculator shows r² alongside r: it turns the correlation into a plain percentage of explained variation. A standard deviation calculator is the tool for working out the spread of each list on its own before you compare them.
Reading the strength: strong, moderate, weak or none
This calculator uses fixed thresholds so the reading is consistent. An absolute r of 0.7 or more is strong, 0.4 to 0.7 is moderate, 0.1 to 0.4 is weak, and below 0.1 is no correlation. The sign gives the direction: positive means the two rise together, negative means one rises as the other falls. A value of 1 is “strong positive” and −1 is “strong negative”, which is what the two test cases on this page show.
The thresholds are rules of thumb, not laws of nature. In physics, an r of 0.9 might be considered weak, because physical laws are nearly exact; in psychology, an r of 0.4 can be an important finding, because human behaviour is noisy. Always judge the number against the field you are working in, and against the size of your sample — a correlation from five points is far less trustworthy than the same correlation from five hundred.
The sample size matters because r is noisy when n is small. With only five pairs, a single unusual point can drag r from 0.5 to 0.9 or down to 0. With fifty pairs, one point barely moves it. The calculator shows n, the number of pairs, next to the result — check it before you trust the reading, and be cautious about strong claims from small samples. An average calculator gives you the mean of each list, which is the first step in the calculation and a useful check that you pasted the right numbers.
A worked example: perfect correlation, then none at all
Run the default lists through the steps. x is 1, 2, 3, 4, 5 and y is 2, 4, 6, 8, 10 — y is exactly twice x. The means are 3 and 6, the sum of the products of deviations is 20, and the denominator is 20, so r is 1. The r² is 1, n is 5, and the reading is “strong positive”. Every point sits on the line y = 2x, so the correlation is as strong as it can possibly be.
Now reverse the second list: y becomes 5, 4, 3, 2, 1. The mean of y is now 3, the deviations are 2, 1, 0, −1, −2, and the products with the x-deviations are −4, −1, 0, −1, −4, adding up to −10. The sums of squared deviations are 10 and 10, so the denominator is √100 = 10, and r is −10 ÷ 10 = −1. The r² is still 1, n is still 5, and the reading is “strong negative”. Same strength, opposite direction.
Now a list with no pattern: x is 1, 2, 3, 4, 5 and y is 2, 3, 2, 3, 2. The mean of y is 2.4, the deviations are −0.4, 0.6, −0.4, 0.6, −0.4, and the products with the x-deviations are 0.8, −0.6, 0, 0.6, −0.8, which add up to exactly 0. The numerator is zero, so r is 0, r² is 0, and the reading is “no correlation”. The y values bounce up and down with no regard for x, and the number says so plainly.
Where correlation does real work
In business, correlation links spending and sales. A shop that tracks daily advertising spend against daily revenue can see whether more ads really bring more sales, and how strongly. An r of 0.8 would say the link is strong; an r of 0.1 would say the ads are barely moving the needle. That number, not a feeling, is what justifies the next advertising budget.
In health and science, correlation is the first check before any deeper analysis. Height and weight are positively correlated; smoking and lung capacity are negatively correlated; shoe size and intelligence are not correlated at all. Researchers compute r first to see whether a relationship exists, and only then build a model to explain it. A correlation on its own never proves a cause — it only says the two move together.
In finance, correlation measures how investments move together. Two shares with a correlation near 1 rise and fall together, so holding both gives no protection; two with a correlation near 0 or negative move independently, so holding both smooths the ride. Portfolio diversification is correlation management, and the variance calculator measures the spread of each investment on its own, which is the other half of the same calculation.
Correlation vs causation — the trap to avoid
The most famous sentence in statistics is “correlation does not imply causation”, and it is famous because people forget it constantly. Ice cream sales and drownings are positively correlated — both rise in summer — but ice cream does not cause drowning. The hidden cause is the hot weather, which drives both. A high r tells you two things move together; it says nothing about which one causes the other, or whether a third thing causes both.
Reverse causation is the second trap. Hospital patients who get more treatment may have worse outcomes — not because the treatment harms them, but because the sickest patients get the most treatment. The correlation is real and the conclusion is backwards. Whenever you see a surprising correlation, ask which direction the cause could run, and whether the sicker, richer or busier group is the one driving the pattern.
The third trap is the hidden third variable. A correlation between coffee drinking and heart disease might vanish once smoking is accounted for, because coffee drinkers in the study also smoked more. The correlation was real, but the cause was smoking, not coffee. The only way past these traps is a designed experiment or a careful analysis that holds the other variables still — a correlation coefficient alone can never do it. A probability calculator can tell you how likely a correlation is by chance, but it cannot tell you what caused it.
Common correlation mistakes
The first mistake is reading a strong r as proof of a cause. An r of 0.9 between two variables is a strong relationship, not a proven mechanism. Before you claim a cause, you need a plausible mechanism, a controlled comparison, or an experiment — the coefficient is the start of the investigation, not the end of it.
The second mistake is forgetting that Pearson's r only measures straight-line relationships. A perfect curve — y = x², say, for x from −2 to 2 — has an r near 0, because the left half falls as the right half rises and the two cancel out. The relationship is real and exact, but it is not a straight line, so r misses it. Always plot the data before you trust the number.
The third mistake is letting one outlier do the work. A single extreme point can drag r from 0.2 to 0.8, or from 0.8 to 0.2, especially with small samples. If removing one pair changes the answer dramatically, say so — the correlation is fragile, and the outlier deserves its own investigation rather than being quietly included.
The fourth mistake is mismatched lists. The two lists must have the same number of values, paired up in order: the first x with the first y, the second with the second, and so on. If the lists have different lengths, or fewer than two pairs, the calculator shows a dash — that is the tool telling you the pairing is broken, not a result. Check the counts before you read the answer.
How to use this correlation calculator
Paste your two lists into the boxes, one list per box, with the values separated by commas, spaces or one per line — a column copied from a spreadsheet works as it is. The first value in the x list pairs with the first value in the y list, the second with the second, and so on, so keep the order the same in both boxes.
Read r first: it runs from −1 to 1, and the sign gives the direction. Then read r², which is the share of the variation explained, and n, the number of pairs. The interpretation row gives the plain-English reading — strong, moderate, weak or no correlation, positive or negative. If a row shows a dash, the lists have different lengths or fewer than two pairs, so fix the lists and the results will appear.
Everything runs in your browser. No account, no sign-up, no data sent anywhere — your numbers never leave your device. Use it to check a hunch about two variables, to summarise a data set, or to work out whether two things really move together. If you want each list's spread on its own, the percentage calculator will not give it — use the standard deviation calculator linked above, and the formula is shown on this page so you can check the result by hand.