Paste paired x and y values and get the correlation coefficient instantly — with r squared, the regression line, a significance test and a 95% confidence interval.
A correlation coefficient calculator measures how strongly two variables move together. Enter paired x and y values to get Pearson's r, from -1 to +1, plus r squared, the regression line, a significance test and a 95% confidence interval. Values near +1 show a strong positive relationship, near -1 a negative one, and near 0 no linear relationship.
Your paired data
Enter one pair per line, as x, y. Separate the two numbers with a comma, space or tab. At least 3 pairs are needed.
How to read r
|r| below 0.10 is negligible, 0.10–0.29 weak, 0.30–0.49 moderate, 0.50–0.69 strong, 0.70–0.89 very strong and 0.90–1.00 near-perfect. The sign shows the direction: a positive r rises together, a negative r moves in opposite directions.
PEARSON CORRELATION COEFFICIENT (r)
r squared, the regression line and the significance test appear here as you type.
Results
Scatterplot with regression line
The chart plots each (x, y) pair and the fitted line y = a + bx.
Calculation ledger
How to calculate the correlation coefficient
The Pearson correlation coefficient, r, compares how two variables change together with how much each one changes on its own. For paired values (x, y), first find the two means, then add up the products of the deviations from those means, and divide by the square root of the product of the two sums of squared deviations:
The same sums appear in the standard deviation calculator: the denominator is the product of the two standard deviations, multiplied by (n − 1). The numerator, Sxy, is (n − 1) times the sample covariance.
- Pair up the values and count them: n is the number of pairs.
- Find the mean of x and the mean of y.
- For each pair, work out (x − x̄), (y − ŷ) and their product, then add the products to get Sxy.
- Add the squared deviations to get Sxx and Syy.
- Divide Sxy by the square root of (Sxx × Syy). The result is r, a number between −1 and +1.
Worked example. Take x = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and y = 2, 3, 5, 4, 6, 8, 7, 9, 11, 10. The means are x̄ = 5.5 and ŷ = 6.5, and the sums are Sxy = 79.5, Sxx = 82.5 and Syy = 82.5. So r = 79.5 ÷ √(82.5 × 82.5) = 79.5 ÷ 82.5 = 0.964, and r² = 0.929. Try the same pairs in the calculator above to check every step.
What is a good correlation coefficient?
There is no single cut-off, but the bands below are the ones most textbooks use for Pearson’s r. A “good” value depends on the field: in physics, r = 0.90 may be routine, while in psychology or medicine, r = 0.40 can be an important finding.
| |r| range | Strength | What it means |
|---|---|---|
| 0.00 – 0.09 | Negligible | Almost no linear relationship. |
| 0.10 – 0.29 | Weak | A slight tendency, but the points are widely scattered. |
| 0.30 – 0.49 | Moderate | A clear, but not tight, linear pattern. |
| 0.50 – 0.69 | Strong | The points cluster fairly closely around a line. |
| 0.70 – 0.89 | Very strong | The points lie close to a straight line. |
| 0.90 – 1.00 | Near-perfect | Almost exactly linear (r = ±1 is exactly linear). |
Judge a value with its sample size and its confidence interval, not on its own. With only 5 pairs, even r = 0.80 is not statistically significant; with 500 pairs, r = 0.15 can be. The calculator above reports the t-test and the 95% confidence interval for exactly this reason.
Does correlation imply causation?
No. A correlation only shows that two variables move together; it never proves that one causes the other. Three explanations are always possible: x causes y, y causes x, or a third variable causes both.
The classic example is ice-cream sales and drowning deaths. They rise together in summer, with a strong positive correlation, but ice cream does not cause drowning: hot weather causes both. A strong r is a clue that is worth investigating, never a conclusion on its own.
Confounding, reverse causation and coincidence are the usual traps. Read the full guide to correlation vs causation before you draw a conclusion from a high r.
How to interpret r squared
r squared (r²) is the share of the variance in y that is explained by the linear relationship with x. It is simply r multiplied by itself, so it always lies between 0 and 1, and it has no sign: a strong negative correlation and a strong positive correlation can have the same r².
- r = 0.964 gives r² = 0.929: about 92.9% of the variation in y is explained by x.
- r = 0.50 gives r² = 0.25: one quarter of the variation is explained, and three quarters remain unexplained.
- r = 0.10 gives r² = 0.01: only 1% is explained, even though r is not zero.
Because r² squares the value, modest correlations explain surprisingly little: an r of 0.30 leaves 91% of the variance unexplained. Report r and r² together, and never read a causal claim into either one.
Pearson correlation vs Spearman correlation
Pearson’s r, the value this calculator reports, measures a linear relationship between two continuous variables. It works best when the relationship is roughly straight, the data have no extreme outliers, and both variables are measured on an interval or ratio scale.
Spearman’s rho ranks the values first and then correlates the ranks, so it measures any monotonic relationship — one that always rises or always falls, even if it curves. Use Spearman when the relationship is curved, the data are ordinal, or a few outliers would distort Pearson’s r. Pearson is the usual choice for straight-line relationships, and it is also the starting point for regression: the slope of the fitted line is r times the ratio of the standard deviations, as the linear regression calculator shows.
The significance test and the Fisher-z confidence interval
A large r from a tiny sample could be a fluke. The significance test asks whether r is far enough from zero to rule that out. It uses the t-statistic:
with df = n − 2 degrees of freedom. A p-value below 0.05 is the usual convention for calling a correlation statistically significant. For example, r = 0.964 with n = 10 gives t = 10.20 (df = 8) and p < 0.001 — far beyond the threshold. With n = 5 and r = −0.30, t = −0.54 (df = 3) and p = 0.624, so that correlation could easily be chance. The probabilities come from the t distribution; see the t-distribution calculator for its shape and tables.
Because r is bounded between −1 and +1, its sampling distribution is skewed, so a confidence interval is built on the Fisher-z scale instead. The calculator converts r to z = artanh(r), adds and subtracts 1.96 × 1/√(n − 3), and converts the limits back to the r scale. The interval is widest for small samples and for strong correlations, and it is undefined when |r| = 1 or when n is 3 or less. Note that this interval, like the t-test, assumes the pairs are roughly bivariate normal — if your data are heavily skewed, check them with the normal distribution calculator first.
Frequently asked questions
What is the correlation coefficient?
The correlation coefficient is a single number, between −1 and +1, that measures the strength and direction of the linear relationship between two variables. Pearson’s r is the most common version: +1 means the points lie exactly on a rising line, −1 means they lie exactly on a falling line, and 0 means there is no straight-line relationship.
What counts as a strong correlation coefficient?
As a rule of thumb, |r| from 0.50 to 0.69 is strong, 0.70 to 0.89 is very strong, and 0.90 to 1.00 is near-perfect. What counts as “strong” depends on the field and on the sample size, so always read r together with its confidence interval and p-value.
Does correlation imply causation?
No. Correlation shows that two variables move together, not that one causes the other. A third variable may cause both, the effect may run in the opposite direction, or the association may be coincidence. Experiments and careful study design, not a high r, are what establish causation.
What does r squared tell you?
r squared is the proportion of the variance in one variable that is explained by the linear relationship with the other. An r of 0.964 gives r² of 0.929, so about 92.9% of the variation is explained. Unlike r, r² has no sign, so it cannot tell you whether the relationship is positive or negative.
What does a negative correlation mean?
A negative correlation means that as one variable increases, the other tends to decrease. For example, the number of hours spent watching television and exam scores are often negatively correlated. The closer r is to −1, the tighter that falling pattern is; r = −1 means the points lie exactly on a falling straight line.
How many pairs of values do I need for a correlation?
You need at least 3 pairs for r itself, and more than 3 for a Fisher-z confidence interval. In practice, use at least 10 to 20 pairs for a stable estimate, and far more if the correlation is weak: small samples give wide confidence intervals and can make a real correlation look insignificant, or a chance one look large.
What is the difference between Pearson and Spearman correlation?
Pearson’s r measures a straight-line relationship using the actual values, while Spearman’s rho ranks the values first and measures any monotonic relationship. Pearson is the standard choice for linear data without extreme outliers; Spearman is safer for curved relationships, ordinal data and data with outliers.
Can the correlation coefficient be greater than 1?
No. Pearson’s r always lies between −1 and +1, by definition: it is a ratio whose denominator is at least as large as its numerator. If you calculate a value outside that range, a pair is mis-entered, a column is constant, or the arithmetic has gone wrong.
Reference
National Institute of Standards and Technology (NIST), “Quantitative Techniques”, NIST/SEMATECH e-Handbook of Statistical Methods: https://www.itl.nist.gov/div898/handbook/eda/section3/eda35.htm — verified live on 13 November 2026. The handbook’s quantitative techniques cover the measures of location and scale that underpin the sums used in the correlation calculation.
More Tools to Explore
Keep exploring the site’s statistics tools, or browse all tools in one place.
Standardise a value and see how far it sits from the mean.
Test for association between categorical variables.
Turn a z-score into a p-value for a significance test.
Find 68-95-99.7 probabilities for a normal distribution.