This free correlation calculator finds the Pearson correlation coefficient r, Spearman’s rank correlation rs and Kendall’s tau-b from two lists of paired data. Paste two columns from Excel or Google Sheets and you get r, r², the covariance, the p-value for testing whether the correlation is significant, a confidence interval for ρ, a scatter plot, the step-by-step working with your numbers, an APA-style sentence and the exact TI-84 keystrokes. Everything runs in your browser and updates as you type.
Contents
How to Use the Correlation Calculator
- Enter your paired data. In X, Y pairs, put one pair per line, or paste two columns straight from a spreadsheet. Two rows (x on the first, y on the second) also work. Use Separate X and Y lists if your data is in L1/L2 form. A header row is skipped automatically.
- Pick a method. Pearson r for straight-line relationships between measurements, Spearman rs for ranks, ordinal data or curved-but-monotonic patterns, Kendall τ for small samples with many ties.
- Read the results. The coefficient, r², two-sided p-value and confidence interval appear at the top, with a plain-English verdict, a table comparing all three methods and the scatter plot.
- Only have summary numbers? The Summary stats / r and n tab computes r from n, Σx, Σy, Σx², Σy² and Σxy, or tests a correlation you already know (for example r = 0.45 with n = 30).
Rows where one value is blank or not a number (such as NA) are left out, and the calculator tells you how many complete pairs it used. Copy share link saves your data in the URL.
Pearson Correlation Coefficient Formula
Pearson’s r measures how closely the points follow a straight line:
r = Σ(x − x̄)(y − ȳ) / √[Σ(x − x̄)² · Σ(y − ȳ)²] = Sxy / √(Sxx · Syy)
The same value comes from the computational form used in many textbooks:
r = [nΣxy − ΣxΣy] / √([nΣx² − (Σx)²] · [nΣy² − (Σy)²])
Equivalently, r is the sample covariance divided by the product of the standard deviations: r = sxy / (sx sy), where sxy = Sxy / (n − 1). Covariance has units (x-units × y-units), so it is hard to judge; dividing by the standard deviations turns it into a unit-free number between −1 and +1.
Worked Example: Hours Studied vs Exam Score
The calculator opens with this example (8 students):
| Hours studied x | 2 | 3 | 5 | 6 | 8 | 9 | 10 | 12 |
|---|---|---|---|---|---|---|---|---|
| Exam score y | 65 | 70 | 72 | 78 | 80 | 85 | 84 | 92 |
- Sums: n = 8, Σx = 55, Σy = 626, Σx² = 463, Σy² = 49,538, Σxy = 4,517.
- Means: x̄ = 6.875, ȳ = 78.25.
- S values: Sxy = 4,517 − 55 × 626 / 8 = 213.25; Sxx = 463 − 55² / 8 = 84.875; Syy = 49,538 − 626² / 8 = 553.5.
- r = 213.25 / √(84.875 × 553.5) = 0.9839, so r² = 0.9680: about 97% of the variation in scores is shared with hours studied.
- Covariance: sxy = 213.25 / 7 = 30.464.
- Test: t = 0.9839 × √6 / √(1 − 0.9680) = 13.475 with df = 6, two-sided p = 0.0000104. The 95% confidence interval for ρ is 0.910 to 0.997.
In APA style: r(6) = .98, p < .001, 95% CI [.91, .997]. Spearman’s rs for the same data is 0.976 and Kendall’s τ-b is 0.929 (p = 0.0004, exact).
Spearman Rank Correlation (and How Ties Work)
Spearman’s rs is simply Pearson’s r computed on the ranks of x and of y. It measures whether y tends to rise (or fall) as x rises, even if the pattern is curved, and it is far less sensitive to outliers.
With no ties the shortcut formula is exact:
rs = 1 − 6Σd² / [n(n² − 1)]
where d is the difference between the two ranks of each pair. In the worked example only scores 85 and 84 swap places, so Σd² = 2 and rs = 1 − 12 / 504 = 0.976.
Ties: tied values share the average of the ranks they occupy. Two values tied for 2nd and 3rd both get 2.5; three values tied for 5th–7th all get 6. Once there are ties, the shortcut formula is no longer exact, so this calculator always uses Pearson’s formula on the averaged ranks, the same as SciPy, R and SPSS. Example: x = 1, 2, 2, 3, 4, 4, 4, 5, 6, 7 and y = 2, 1, 3, 3, 5, 4, 6, 6, 8, 7 give rs = 0.9381, while the shortcut would give 0.9394.
Kendall’s Tau-b
Kendall’s tau looks at every pair of points. A pair is concordant if x and y move in the same direction and discordant if they move in opposite directions. Tau-b corrects for ties:
τb = (C − D) / √[(n₀ − n₁)(n₀ − n₂)]
Here n₀ = n(n − 1)/2, and n₁ and n₂ count the tied pairs in x and in y. The example data has 27 concordant pairs and 1 discordant pair, so τb = 26 / 28 = 0.929. For small samples without ties the calculator gives the exact p-value; otherwise it uses the tie-corrected normal approximation (as SciPy’s kendalltau and R’s cor.test do).
Pearson vs Spearman vs Kendall: Which to Use
| Method | Measures | Use it when | Outliers |
|---|---|---|---|
| Pearson r | Straight-line (linear) association | Both variables are measurements and the scatter plot looks roughly linear | Sensitive |
| Spearman rs | Monotonic association, on ranks | Ordinal data (ratings, Likert scales), skewed data, curved but always-increasing patterns | Robust |
| Kendall τ-b | Concordant minus discordant pairs | Small samples or many ties; easy to explain as a probability | Robust |
If Pearson and Spearman disagree a lot, look at the scatter plot: there is usually an outlier or a curve. A perfect U-shape can give r ≈ 0 even though x and y are strongly related.
Is the Correlation Significant? t-Test, p-Value and Critical r
To test H₀: ρ = 0 (no correlation in the population) against ρ ≠ 0:
t = r √(n − 2) / √(1 − r²), df = n − 2
The two-sided p-value comes from Student’s t distribution. This is exactly the test the TI-84 runs in LinRegTTest, and the test behind the slope p-value in the linear regression calculator. For a refresher on p-values, see the hypothesis test calculator.
Critical values of r (two-sided): |r| must be larger than these to be significant.
| n (pairs) | α = 0.05 | α = 0.01 |
|---|---|---|
| 5 | 0.878 | 0.959 |
| 8 | 0.707 | 0.834 |
| 10 | 0.632 | 0.765 |
| 15 | 0.514 | 0.641 |
| 20 | 0.444 | 0.561 |
| 30 | 0.361 | 0.463 |
| 50 | 0.279 | 0.361 |
| 100 | 0.197 | 0.256 |
Significant does not mean strong: with n = 100, r = 0.2 is significant at 5% but x explains only 4% of the variation in y.
Confidence Interval for r (Fisher z)
r is not normally distributed, so the interval uses Fisher’s z transformation:
z = ½ ln[(1 + r)/(1 − r)], SE = 1/√(n − 3), CI = tanh(z ± z* · SE)
z* is 1.96 for 95% (choose 80% to 99.9% in the calculator). The interval is not symmetric around r, and it needs at least 4 pairs. For the example, z = 2.4062, SE = 0.4472, giving 0.910 to 0.997.
How to Interpret r: Strength and Direction
| |r| | Common label |
|---|---|
| 0.00 – 0.19 | Very weak |
| 0.20 – 0.39 | Weak |
| 0.40 – 0.59 | Moderate |
| 0.60 – 0.79 | Strong |
| 0.80 – 1.00 | Very strong |
The sign gives the direction: positive means y tends to increase with x, negative means it tends to decrease. These labels are a convention (Evans, 1996), not a rule. Cohen’s guidelines call 0.1 small, 0.3 medium and 0.5 large, and in physics a correlation of 0.9 might be disappointing. Always remember that correlation is not causation: a third variable can drive both.
r vs r²: What Is the Difference?
r shows direction and strength of the linear relationship (−1 to +1). r², the coefficient of determination, is the proportion of the variance in y explained by the straight line (0 to 1). r = 0.5 sounds “half”, but r² = 0.25 means only 25% of the variation is shared. r² loses the sign, so always report r for correlation. To fit and use the line itself, use the linear regression calculator.
How to Find the Correlation Coefficient on a TI-84
- Turn diagnostics on (once): press 2nd 0 (CATALOG), scroll to
DiagnosticOn, press ENTER twice. On a TI-84 Plus CE with OS 5.3 or later you can also press MODE and set STAT DIAGNOSTICS to ON. Without this, r and r² are not shown. - Enter the data: STAT 1 (Edit), type x into L1 and y into L2.
- Run LinReg: STAT ▶ (CALC) 4 LinReg(ax+b), Xlist L1, Ylist L2, Calculate. For the example the screen shows r² = .9680118352 and r = .9838759247.
- p-value: STAT ◀ (TESTS),
F:LinRegTTest, β & ρ ≠ 0, Calculate. It shows t = 13.47, p = 1.04E−5 and r. - Spearman: the TI-84 has no Spearman command. Enter the ranks (the calculator above lists them for your data, with averaged ties) into L3 and L4 and run
LinReg(ax+b) L3,L4; the r shown is rs.
The calculator prints these keystrokes with your own numbers. Practise them on our TI-84 Plus CE calculator online. For the mean and standard deviation of each list on its own, use the standard deviation calculator.
Why This Correlation Calculator Is Different
- Three coefficients at once: Pearson, Spearman (correct average-rank ties) and Kendall tau-b, compared side by side with a note when they disagree.
- Full inference: t, df, two-sided p-value, and a Fisher-z confidence interval at any level from 80% to 99.9%, plus an APA-style sentence.
- TI-84 keystrokes with your own lists, the screen values you should see, and the rank lists for Spearman on a calculator. No other top-ranking correlation calculator does this.
- Paste anything: two columns, two rows, separate lists, headers and blank cells. Or start from Σ sums or a known r and n.
- Step-by-step working using your numbers, with a deviations table for Pearson and a rank table with d² for Spearman.
- Checked against SciPy and NumPy (pearsonr, spearmanr, kendalltau and covariance) on more than 400 datasets, including ties, perfect correlations and n = 2.
Correlation Calculator FAQ
Ti84CalcPro is not affiliated with or endorsed by Texas Instruments. TI-84 Plus CE is a trademark of Texas Instruments.