CalcThis CalcThis
Pearson · Spearman · Kendall · see which point carries the correlation

Correlation Coefficient Calculator

Paste your X and Y numbers (or one pair per line) and get the correlation coefficient with its p-value and interval, the Pearson, Spearman and Kendall values side by side and a picture of your own data with the best-fit line. For the example below, 10 pairs give r = 0.6967, p = 0.02517: a strong positive correlation. The table of single points shows that leaving out pair #10 moves r to 0.9595.

Your data

How will you enter the data?

Try an example

The relationship is…

Pearson correlation coefficient (r)
—
Type the X and Y numbers to see the correlation coefficient, its p-value and a picture of your data.
Pearson r
—

How to use the correlation coefficient calculator

Paste the X numbers in the first box and the Y numbers in the second (a column from Excel works), or switch to one pair per line. The correlation coefficient, its p-value and a picture of your data appear as you type. Pick “Positive” or “Negative” for a one-tailed test and leave the significance level empty for 0.05.

Go advanced to choose Spearman or Kendall for the headline, change the confidence level, name the variables, add a weight for each pair (for a weighted Pearson r) or type an X value to predict Y from the line with its interval.

The correlation coefficient formula

r = Σ(x − x̄)(y − ȳ) ÷ √( Σ(x − x̄)² × Σ(y − ȳ)² ) PEARSON (LINEAR) CORRELATION COEFFICIENT · t = r × √((n − 2) ÷ (1 − r²)) WITH n − 2 DEGREES OF FREEDOM

Worked out with this calculator for 10 pairs (X = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; Y = 52, 55, 61, 58, 70, 72, 69, 80, 85, 60): the means are 5.50 and 66.20, Σ(x − x̄)(y − ȳ) = 206.00, Σ(x − x̄)² = 82.50 and Σ(y − ȳ)² = 1059.60, so r = 0.6967, r² = 0.4854, t(8) = 2.75 and p = 0.02517. The 95% interval for r through the Fisher transformation runs from 0.1196 to 0.9219. The best-fit line is Y = 52.47 + 2.50 × X, which predicts 79.93 at X = 11 (95% prediction interval 56.88 to 102.99).

Pearson, Spearman or Kendall?

Your dataCoefficient
Two measured numbers, points roughly along a straight linePearson r
A curved but steady rise or fall, ranks, or a few extreme pointsSpearman ρ
Few pairs, or many repeated valuesKendall τ-b
One of the two variables has only two values (0 and 1)Pearson r is the point-biserial correlation
Three or more variables at onceA table of pairwise correlations (not on this page)

For the same example Spearman’s ρ is 0.6848 (p = 0.02888) and Kendall’s τ-b is 0.6000 (p = 0.01574).

Which point is carrying the correlation?

A single extreme pair can create or hide a correlation. The calculator recomputes r with each pair left out. In the example, removing pair #10 (X = 10, Y = 60) changes r from 0.6967 to 0.9595, a change of 0.2627: that one point matters much more than any other.

Critical values of r

A correlation further from 0 than the critical value for your degrees of freedom (n − 2) is significant at that level. Two-tailed values; for a one-tailed test use the column of twice the level (for example the α = 0.10 column for a one-tailed test at 0.05).

Degrees of freedom (n − 2)α = 0.10α = 0.05α = 0.01
10.9880.9971.000
20.9000.9500.990
30.8050.8780.959
40.7290.8110.917
50.6690.7540.875
60.6210.7070.834
70.5820.6660.798
80.5490.6320.765
90.5210.6020.735
100.4970.5760.708
120.4580.5320.661
150.4120.4820.606
200.3600.4230.537
250.3230.3810.487
300.2960.3490.449
400.2570.3040.393
600.2110.2500.325
1000.1640.1950.254

Reading the result

The coefficient runs from −1 to +1: the sign gives the direction, the size the strength. The p-value is the probability of a correlation at least this far from 0 if the two variables were really unrelated; below your significance level it is called significant. The interval shows the values of the true correlation the data are consistent with. With few pairs it is wide: 0.1196 to 0.9219 for the 10 pairs above.

The words on this page follow this rough scale for |r|:

|r|Word used here
0.8 to 1.0very strong
0.6 to 0.8strong
0.4 to 0.6moderate
0.2 to 0.4weak
0 to 0.2very weak

Check against published examples

The Wikipedia article on the Pearson coefficient gives r = 0.7 with 50 pairs a 95% interval of 0.5237 to 0.8188; this calculator’s interval for the same numbers is 0.5237 to 0.8188. For eight pairs rising from 52 to 86, this page and correlationcoefficientcalculator.org both report r = 0.9991, t = 56.1931 and a p-value of 2.133 × 10⁻⁹.

How many pairs do I need?

With 10 pairs, only a correlation beyond ±0.6319 is significant at 0.05. Keeping r at 0.6967, the calculator reports that 9 pairs would already give p below 0.05 and about 14 pairs would give 80% power (approximate, Fisher z).

Related tools

To compare two groups use the t-test calculator; to turn any statistic into a p-value the p-value calculator; for an interval around a mean the confidence interval calculator; and to find a spread the standard deviation calculator.

Sources

  • The t statistic r × √((n − 2) ÷ (1 − r²)) with n − 2 degrees of freedom, the Fisher transformation artanh r with standard error 1 ÷ √(n − 3) and the interval tanh(artanh r ± z × SE) follow the Wikipedia article “Pearson correlation coefficient”, read on 2026-11-23. Its worked example (r = 0.7, n = 50, 95% interval 0.5237 to 0.8188) is reproduced by this calculator: 0.5237 to 0.8188.
  • Spearman’s ρ is the Pearson r of the ranks; its p-value uses the t approximation and its interval the Fisher transformation with the variance factor 1.06, as in the Wikipedia article “Spearman’s rank correlation coefficient” (read 2026-11-23). Kendall’s τ-b and its normal approximation with the tie terms follow the article “Kendall rank correlation coefficient” (read 2026-11-23).
  • The interval for the line and the prediction interval for one new point follow the simple-regression formulas in the Wikipedia article “Prediction interval” (read 2026-11-23). Probabilities come from the t and normal distributions of this site’s p-value calculator.
  • Check: for the eight pairs X = 1, 2, 3, 4, 5, 6, 7, 8 and Y = 52, 57, 62, 67, 72, 77, 83, 86 this calculator gives r = 0.9991, t = 56.1931 and p = 2.133 × 10⁻⁹; correlationcoefficientcalculator.org showed the same r, t and p for those numbers on 2026-11-23.
  • The feature set was compared with the correlation tools of Omnicalculator, GigaCalculator, Pearson.com, correlationcoefficientcalculator.org, Social Science Statistics and Stats Kingdom, all opened on 2026-11-23. The words very weak to very strong follow the scale Omnicalculator attributes to Evans (1996); that original was not read, so treat the words as a rough guide. The number of pairs for 80% power uses the Fisher z approximation and is labelled approximate.

For information only. Check the assumptions of the method and your own data before drawing conclusions.

Common questions

What is a correlation coefficient?

A correlation coefficient is a number between −1 and +1 that measures how closely two variables move together. +1 means they rise together in a perfect straight line, −1 means one falls exactly as the other rises, and 0 means no straight-line relationship.

How do I calculate the correlation coefficient?

Paste the X numbers and the Y numbers (or one pair per line). The calculator finds the means, multiplies each pair of deviations and divides by the spread of both variables: r = Σ(x − x̄)(y − ȳ) ÷ √(Σ(x − x̄)² Σ(y − ȳ)²). For the example on this page it gives r = 0.6967.

What is the linear correlation coefficient?

It is Pearson’s r, the coefficient that measures how well a straight line fits the points. Spearman’s ρ and Kendall’s τ measure ranks instead and also pick up curved relationships that keep rising or falling.

Is my correlation strong?

A common reading is very weak below 0.2, weak 0.2 to 0.4, moderate 0.4 to 0.6, strong 0.6 to 0.8 and very strong above 0.8, applied to |r|. What counts as strong depends on the field, so look at the interval and the picture too. The example gives 0.6967, called strong.

What does r² mean?

r² is r multiplied by itself. It is the share of the variation in Y that a straight line through X accounts for. The example has r² = 0.4854, about 48.5%. It describes the fit, not cause and effect.

Pearson, Spearman or Kendall?

Use Pearson for measured numbers that follow a straight line. Use Spearman when the relationship is curved but steady, or a few extreme points matter. Use Kendall with few pairs or many repeated values. This page shows all three, so you can see when they disagree: in the example Pearson is 0.6967 and Spearman 0.6848.

How do I read the p-value?

The p-value is the probability of a correlation at least as far from 0 as yours if the two variables were really unrelated. Below your significance level α (usually 0.05) the result is called statistically significant. The example has p = 0.02517.

Does correlation mean causation?

No. Two variables can move together because one causes the other, because a third thing drives both, or by chance. The correlation only describes how they move together.

Which point is carrying my correlation?

The “Which point is carrying this?” table shows r with each pair left out. A pair whose removal changes r by more than 0.1 is flagged and ringed in the picture. In the example, leaving out pair #10 changes r from 0.6967 to 0.9595.

How many pairs do I need?

The “What would it take” table gives the smallest r that would be significant with your number of pairs (0.6319 for 10 pairs at α = 0.05) and how many pairs would be needed to reach p below α or 80% power if r stayed the same. With very few pairs, a large r can still be chance.

Can I paste from Excel?

Yes. Copy the X column into the first box and the Y column into the second, or switch to “Pairs, one per line” and paste both columns together. Header lines and blank rows are skipped.