Correlation coefficient calculator

Paste two paired columns and get Pearson's r or Spearman's ρ, its significance, a confidence interval and a scatter plot with the fitted line.

Coefficient
Tip: paste two columns from a spreadsheet, one into each box.
r = 0.978very strong positive
p-value
p < .001
95% CI
0.91, 0.99
r² (shared variance)
95.6%
n pairs
10
Line
y = 49.72 + 2.242x

r(8) = .98, p < .001, 95% CI [0.91, 0.99]

Write up this correlation

An APA-style sentence or two from the result above, with the right caution about causation.

Uses an AI model via Vercel AI Gateway. It only sees what you send here; check anything you publish.

Reading the result

The sign gives direction, the size gives strength of the linear relationship. r² is the share of variance in one variable that is linearly accounted for by the other. A correlation says nothing about which variable causes which, or whether a third variable drives both.

Check the plot before trusting r

Anscombe's quartet (1973) is four datasets with the same r = .82 that look nothing alike: a clean line, a curve, a line with one outlier, and a vertical cluster with one far point. Always look at the scatter plot. One extreme point can create or destroy a correlation; if you see one, compare Pearson with Spearman.

Sample size for a correlation

To detect r = .30 with 80% power at α = .05 you need 85 participants; for r = .20, 194. Plan with the power analysis calculator.

Frequently asked questions

How do I calculate a correlation coefficient?

Pearson's r = Σ(x − x̄)(y − ȳ) / √(Σ(x − x̄)² · Σ(y − ȳ)²). It measures the strength of a straight-line relationship, from −1 to +1. Paste paired values above and the calculator does the arithmetic.

Pearson or Spearman?

Pearson for two continuous variables with a roughly linear relationship and no extreme outliers. Spearman's ρ (Pearson on ranks) for ordinal data, monotonic but curved relationships, or when outliers are a concern.

How is the p-value for r calculated?

t = r√(n − 2) / √(1 − r²) with n − 2 degrees of freedom. The confidence interval uses Fisher’s z transformation, z = atanh(r), with standard error 1/√(n − 3).

What counts as a strong correlation?

Cohen (1988) suggested .10 small, .30 medium, .50 large. In psychology, Gignac and Szodorai (2016) found .10, .20 and .30 correspond to the 25th, 50th and 75th percentiles of published effects.