Audited 27 Jul 2026·Last updated 27 Jul 2026·5 citations·Tier 2·0 uses

Correlation Coefficient Calculator

Free Pearson correlation coefficient calculator: paste paired x/y data and get r, R², the significance test (t, p-value), and a plain-language strength label.

Correlation Coefficient Calculator

Comma-separated numbers. Paired index-for-index with the Y list below (the 1st X goes with the 1st Y, and so on).
Comma-separated numbers, the same length as the X list. At least 3 pairs are required.
Pearson r
0.9
Sxy / (√Sxx · √Syy), always in [−1, 1]. +1 is a perfect increasing line, −1 a perfect decreasing line, 0 no linear relationship.
R² (coefficient of determination)
0.81
Strength & direction
very strong positive correlation
t-statistic
3.5762
p-value (two-tailed)
0.0374
Degrees of freedom
3
Paired points (n)
5

Background.

The Quanta correlation coefficient calculator takes two comma-separated lists of paired numbers — an X list and a Y list, matched up index-for-index — and returns the Pearson correlation coefficient r, the coefficient of determination R², a two-tailed significance test (a t-statistic and its p-value), the degrees of freedom, the sample size, and a plain-language strength-and-direction label such as ‘very strong positive correlation’. Enter the default example — X = 1, 2, 3, 4, 5 and Y = 2, 3, 5, 4, 6 — and the calculator returns r = 0.90 exactly, R² = 0.81, t ≈ 3.576 on 3 degrees of freedom, and p ≈ 0.037, meaning the association is unlikely to be pure chance at the conventional 0.05 threshold.

Pearson's r, formalized by Karl Pearson in 1896 (building on Francis Galton's earlier work on regression toward the mean), is the single most widely reported statistic for describing how strongly two continuous variables move together in a straight-line sense. It answers one specific question: as X goes up, does Y tend to go up too (positive r), tend to go down (negative r), or show no consistent straight-line pattern at all (r near zero)? The value is always bounded between −1 and +1 by the Cauchy-Schwarz inequality, which is what makes r comparable across wildly different units — the correlation between height in centimetres and weight in kilograms uses the identical scale as the correlation between rainfall in millimetres and crop yield in tonnes.

The single most common mistake with correlation is treating a high r as proof of causation. A classic example: ice cream sales and drowning deaths are strongly positively correlated across the calendar year, not because ice cream causes drowning but because both are driven by a third variable, hot weather, that pushes people toward both ice cream stands and swimming pools simultaneously. Statisticians call this confounding, and no correlation coefficient, however large, can rule it out on its own — only a controlled experiment or a carefully designed observational study that accounts for the confounder can establish causation. A second common mistake is assuming r = 0 means 'no relationship' when it actually means no *linear* relationship; two variables related by a perfect U-shaped curve (like temperature and heating-plus-cooling cost) can have a Pearson r very close to zero while being deterministically connected. Anscombe's quartet, a famous 1973 dataset, drives this home: four wildly different-looking scatter plots — one linear, one curved, one with a single dominant outlier, one with a vertical cluster plus one outlier — all produce the exact same Pearson r, mean, and variance, which is why every statistics course now insists on plotting the data before trusting the number.

The significance test this calculator runs — converting r into a t-statistic on n−2 degrees of freedom and reading off a two-tailed p-value — answers a narrower, complementary question: assuming there is truly no linear relationship in the underlying population (the null hypothesis ρ = 0), how surprising would a sample correlation this large be, purely from random sampling noise? A small p-value (conventionally below 0.05) means an r this extreme would be unlikely under the null, so you can be reasonably confident the association reflects something real rather than sampling coincidence. But statistical significance is not the same thing as practical importance: with a large enough sample, even a tiny, practically meaningless r (say 0.05) can become 'statistically significant', while with a small sample a genuinely large r can fail to clear the significance bar simply because there was not enough data to rule out chance. This calculator reports both r and p side by side for exactly that reason — read the effect size (r, R²) for how strong the relationship is, and the p-value for how confident you can be that it is not noise.

Because the underlying arithmetic (means, sums of squared deviations, and their cross-product) is exactly the machinery behind sample variance and standard deviation, this calculator sits naturally alongside Quanta's standard deviation, z-score, and p-value tools — use those to understand the spread of each variable on its own, and this one to understand how the two variables move together.

What is correlation coefficient calculator?

The Pearson correlation coefficient, denoted r, measures the strength and direction of the linear relationship between two paired numeric variables. It is defined as r = Sxy / (√Sxx · √Syy), where Sxy = Σ(xi − x̄)(yi − ȳ) is the sum of cross-products of deviations from each variable's mean, and Sxx and Syy are the corresponding sums of squared deviations — the same quantities that define each variable's own variance. Dividing the cross-product sum by the geometric mean of the two variance-like sums normalizes r so it is always between −1 and +1, regardless of the original units or scale of X and Y. r = +1 means every point lies exactly on a line with positive slope; r = −1 means every point lies exactly on a line with negative slope; r = 0 means there is no linear association (though a strong non-linear relationship can still exist). Squaring r gives the coefficient of determination R², interpreted as the proportion of variance in one variable that is statistically associated with the other — an r of 0.9 corresponds to an R² of 0.81, meaning 81% of the variability in Y lines up with variability in X in a linear sense. Testing whether an observed r is significantly different from zero uses the test statistic t = r·√((n−2)/(1−r²)), which follows a Student t-distribution with n−2 degrees of freedom under the null hypothesis that the true population correlation ρ is zero (OpenStax, Introductory Statistics 2e, §12.4). A two-tailed p-value from that t-distribution then measures how likely a correlation this extreme would be to arise from an uncorrelated population purely by sampling chance.

How to use this calculator.

  1. Enter your X values as a comma-separated list in the first box.
  2. Enter your Y values as a comma-separated list in the second box, in the same order — the first Y value is paired with the first X value, and so on. Both lists must be the same length, with at least 3 pairs.
  3. Read the primary result, Pearson's r, and its plain-language strength label directly beneath it.
  4. Check R² to see the practical size of the association (the share of variance the two variables share), separately from the p-value, which tells you how confident you can be that the association is not random noise.
  5. If the p-value is above 0.05 (or whatever threshold your field uses), treat the correlation as not statistically distinguishable from zero, even if r itself looks moderately large — this is common with small sample sizes.
  6. Remember that correlation does not imply causation: a high r can arise from a genuine causal link, a confounding third variable, reverse causation, or pure coincidence in small samples. Use domain knowledge or a controlled experiment to distinguish between them.
  7. Always look at a scatter plot of your data alongside the numeric result — Anscombe's quartet shows that very different-looking data patterns, including clearly non-linear ones, can share the exact same r.

The formula.

r = Sxy ⁄ (√Sxx × √Syy)

The calculator first computes the mean of the X list and the mean of the Y list. It then computes three sums across all n pairs: Sxy, the sum of the products of each point's deviation from its own mean (Σ(xi−x̄)(yi−ȳ)); Sxx, the sum of squared X deviations; and Syy, the sum of squared Y deviations. Pearson's r is Sxy divided by the square root of the product SxxSyy (NIST Dataplot reference manual). This is exactly the covariance of X and Y, normalized by the product of their standard deviations — which is why r is dimensionless and bounded in [−1, 1] by the Cauchy-Schwarz inequality applied to the deviation vectors.

Squaring r gives R², the coefficient of determination, interpreted in simple linear regression as the fraction of the total variance in Y explained by a straight-line fit against X.

The significance test converts r into a t-statistic, t = r·√((n−2)/(1−r²)), which under the null hypothesis ρ = 0 follows a Student t-distribution with n−2 degrees of freedom (OpenStax, Introductory Statistics 2e, §12.4). The calculator evaluates the two-tailed p-value from that distribution using the regularized incomplete beta function, the same numerically stable machinery used by Quanta's p-value and confidence-interval calculators. When |r| is 1 (every point falls exactly on a line), 1−r² is zero and t is mathematically infinite; rather than surface a non-finite result, the calculator reports a large finite sentinel (±1 × 10³⁸) for t and exactly 0 for the p-value, since a perfect linear fit is as statistically extreme as it gets.

The plain-language strength label anchors on Cohen's (1988) widely used effect-size benchmarks for |r|: approximately 0.10 is a 'small' effect, 0.30 a 'medium' effect, and 0.50 a 'large' effect. This calculator extends that scale into six descriptive bands — negligible (< 0.10), weak (0.10–0.30), moderate (0.30–0.50), strong (0.50–0.70), very strong (0.70–1.00), and perfect (exactly ±1) — purely as a reading aid; the underlying r and p-value are always the numbers that should drive any actual decision.

A worked example.

Example

A small business tracks weekly ad spend, in hundreds of dollars (X = 1, 2, 3, 4, 5), against weekly units sold, in dozens (Y = 2, 3, 5, 4, 6), over five weeks. The mean ad spend is 3 and the mean units sold is 4. Computing each week's deviation from those means and multiplying paired deviations together (−2×−2, −1×−1, 0×1, 1×0, 2×2) gives a cross-product sum Sxy of 4+1+0+0+4 = 9. The sum of squared X deviations Sxx is 4+1+0+1+4 = 10, and the sum of squared Y deviations Syy is also 4+1+1+0+4 = 10. Pearson's r is therefore 9 divided by the square root of (10 × 10), which is 9/10 = 0.90 exactly — a very strong positive correlation. Squaring gives R² = 0.81, meaning 81% of the week-to-week variation in units sold lines up with variation in ad spend in a linear sense. Testing significance with n = 5 (df = 3): t = 0.90 × √(3 / (1 − 0.81)) = 0.90 × √(3/0.19) ≈ 3.576, which produces a two-tailed p-value of about 0.037 — below the conventional 0.05 threshold, so the business can be reasonably (though not certainly, with only 5 data points) confident that more ad spend really is associated with more sales, rather than the pattern being a coincidence of a short observation window.

y Values2, 3, 5, 4, 6
x Values1, 2, 3, 4, 5

Frequently asked questions.

Does a strong correlation mean X causes Y?
No. Correlation measures whether two variables move together in a straight-line sense; it says nothing about whether one causes the other. The classic textbook example is that ice cream sales and drowning incidents are strongly positively correlated across the year, not because ice cream causes drowning but because hot weather independently increases both — a confounding variable. A high r can arise from true causation, reverse causation (Y actually causes X), a shared confounder, or, especially in small samples, pure chance. Establishing causation generally requires a controlled experiment (randomly assigning the 'cause') or careful statistical techniques designed to rule out confounding, not a correlation coefficient alone.
What is the difference between r and R²?
r is the Pearson correlation coefficient itself, ranging from −1 to +1, and it carries a sign that tells you the direction of the relationship (positive or negative). R², the coefficient of determination, is simply r squared, so it always lands between 0 and 1 and loses the sign information — an r of 0.9 and an r of −0.9 both give an R² of 0.81. R² has a direct interpretation in simple linear regression: it is the proportion of the variance in one variable that is statistically explained by a straight-line fit to the other. An R² of 0.81 means 81% of the variability in Y is associated with variability in X in a linear sense, leaving 19% unexplained by that line.
Why does this calculator require at least 3 pairs of data?
With exactly 2 data points, a straight line always passes through both of them exactly, so r is trivially +1 or −1 (or undefined if the two X values, or two Y values, happen to coincide) regardless of whether any real linear relationship exists. That makes a 2-point correlation meaningless as evidence of anything. The calculator requires at least 3 pairs so the data can actually deviate from a perfect line, which is what makes r an informative summary rather than a mathematical certainty. The significance test also needs at least 1 degree of freedom (df = n−2), which is a second, independent reason n must be at least 3.
What does the p-value tell me that r doesn't?
r (and R²) describe the size and direction of the observed linear association in your specific sample. The p-value answers a different question: assuming there is truly no linear relationship in the full population you are sampling from (the null hypothesis ρ = 0), how likely is a sample correlation this large to appear just from random sampling variability? A small p-value (conventionally under 0.05) suggests your observed r is unlikely to be a fluke of sampling noise. Crucially, statistical significance and practical importance are different things: with a large enough sample, even a tiny, practically unimportant r can become 'statistically significant' (a very small p-value), while with a small sample a genuinely large, practically important r can fail to reach significance simply because there is not yet enough data to rule out chance.
Why can two completely different-looking scatter plots have the same r?
Because r is a single summary number computed from sums of deviations, and very different data patterns can produce identical sums. The statistician Francis Anscombe demonstrated this dramatically in 1973 with 'Anscombe's quartet': four datasets with wildly different shapes — one a clean straight line, one a clear curve, one a straight line thrown off by a single outlier, one a vertical cluster of points plus one extreme outlier — all share the exact same mean, variance, Pearson r, and even the same best-fit regression line. The lesson, now standard in every introductory statistics course, is to always plot your data before trusting any single summary statistic, correlation included.
Can r detect a non-linear relationship?
Not reliably. Pearson's r specifically measures the strength of a linear (straight-line) association. Two variables can be perfectly related by a curve — for example, heating-plus-cooling energy cost as a function of outdoor temperature typically forms a U-shape, high at both very cold and very hot temperatures, low in between — and still produce an r close to zero, because a straight line is simply the wrong shape to fit a U-curve. A near-zero r therefore means 'no strong linear relationship', not 'no relationship at all'. If you suspect a curved or more complex relationship, a scatter plot, a non-linear regression fit, or a rank-based measure like Spearman's rho (which captures any consistently increasing or decreasing relationship, not just straight-line ones) are better diagnostic tools.
What counts as a 'strong' correlation?
There is no single universal cutoff, but Cohen's (1988) widely cited benchmarks treat |r| ≈ 0.10 as a small effect, 0.30 as a medium effect, and 0.50 as a large effect in the behavioral and social sciences. Other fields set different bars — physical-science measurements with very low noise often expect r above 0.95 before calling a relationship strong, while social-science and survey data routinely treat r = 0.3 as practically meaningful given how much unmeasured variability exists in human behavior. This calculator's 'strength' label extends Cohen's anchors into descriptive bands (negligible, weak, moderate, strong, very strong, perfect) purely as a reading aid — always interpret the label in light of what is typical in your specific field.
How is this different from Quanta's standard deviation and z-score calculators?
Standard deviation and z-score both describe a single variable in isolation — how spread out its values are, and how far one particular value sits from that variable's own mean. Correlation is inherently about the relationship between two variables measured together: it asks whether high values of X tend to pair with high (or low) values of Y across the same set of observations. Internally, this calculator computes the same building blocks (sums of squared deviations) that standard deviation uses for each variable separately, plus one additional cross-product sum that captures how the two variables move together. If you only have one list of numbers and want to know how spread out it is, use the standard deviation calculator; once you have two paired lists and want to know how they move together, use this one.

References& sources.

  1. [1]NIST Dataplot Reference Manual, ‘CORRELATION’ command — defines the Pearson correlation coefficient r = Sxy / (√Sxx · √Syy).
  2. [2]OpenStax, Introductory Statistics 2e (2023), §12.4 ‘Testing the Significance of the Correlation Coefficient’ — gives the test statistic t = r·√((n−2)/(1−r²)) with n−2 degrees of freedom.
  3. [3]Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences, 2nd ed. Hillsdale, NJ: Lawrence Erlbaum Associates — effect-size benchmarks for correlation (small ≈ .10, medium ≈ .30, large ≈ .50).
  4. [4]NIST/SEMATECH e-Handbook of Statistical Methods.
  5. [5]Anscombe, F.J. (1973). ‘Graphs in Statistical Analysis.’ The American Statistician, 27(1), 17–21 — the original ‘Anscombe's quartet’ demonstration that identical summary statistics, including r, can describe visually very different datasets.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 313 calculators remain free
  • No billing is enabled
Coming soon