By · Updated

Correlation Coefficient Calculator

Pearson r, Spearman Rho and Significance From Paired Data, Working Shown

No ratings yet
Result

—

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Correlation Coefficient Calculator works

This correlation coefficient calculator measures how closely two sets of numbers move together. Paste paired values and it gives Pearson's r, a plain-English strength rating, r², Spearman's rank correlation and a p-value telling you whether the relationship could be chance.

A correlation coefficient runs from −1 to +1. Plus one means the points sit on a rising straight line, minus one a falling line, and zero means no straight-line relationship at all. The sign gives the direction and the size gives the strength.

How the correlation coefficient calculator works

The formula for Pearson's r is Sxy ÷ √(Sxx × Syy), the covariance of x and y scaled by both spreads. Spearman's ρ applies the same formula to the ranks of the values, so it captures any steady rise or fall, not just straight lines. Significance uses t = r√(n − 2) ÷ √(1 − r²).

First example. The default data, daily temperature against ice cream sales over 12 days, gives r ≈ 0.96, a very strong positive correlation.

Second example. Values (1, 10), (2, 8), (3, 6), (4, 4) give r = −1 exactly.

How many pairs make r significant? With 10 pairs r must exceed 0.632 at the 5% level; with 100 pairs, just 0.197.

Smallest |r| that is significant at the 5% level (two-tailed) by sample size

Pairs n Critical r (5%) Critical r (1%)
5 0.878 0.959
6 0.811 0.917
7 0.754 0.875
8 0.707 0.834
9 0.666 0.798
10 0.632 0.765
12 0.576 0.708
15 0.514 0.641
20 0.444 0.561
25 0.396 0.505
30 0.361 0.463
35 0.334 0.430
40 0.312 0.403
50 0.279 0.361
60 0.254 0.330
70 0.235 0.306
80 0.220 0.286
100 0.197 0.256
120 0.179 0.234
150 0.160 0.210
200 0.139 0.182
300 0.113 0.149
500 0.088 0.115
1,000 0.062 0.081

Tips

FAQ

What is a strong correlation coefficient?

Rules of thumb vary by field, but a common scale is: below 0.3 weak, 0.3 to 0.7 moderate and above 0.7 strong, ignoring the sign. In physics a correlation of 0.9 may be disappointing, while in social science 0.4 can be a notable finding, so context matters as much as the number itself.

When should I use Spearman instead of Pearson?

Use Spearman when the data is ranked, has outliers, or rises steadily but not in a straight line. Pearson measures straight-line association and assumes roughly normal data. When both give similar answers you can quote Pearson; when they differ a lot, look at a scatter plot before deciding.

What does r² mean?

r² is the share of the variation in one variable that a straight line explains from the other. An r of 0.8 gives r² = 0.64, so 64% of the variation is shared. It is the same R² that the linear regression calculator reports for a line of best fit.

See also: all Statistics tools, Arithmetic, Number Theory, Algebra and Geometry, Trigonometry and Calculus.

Related tools