Correlation Coefficient Calculator (Pearson’s r)
Paste two columns of numbers and we’ll compute the Pearson correlation coefficient r, r², sample size, and the best-fit line. This is the classic statistic to measure linear association.
Enter your data
Separate values with comma, space, semicolon, or line break. X and Y must have the same length.
Results
Pearson r
–
r² (explained)
–
n (pairs)
–
Direction
–
Least-squares regression line (Y on X)
–
Interpretation: for every 1-unit increase in X, Y changes by the slope.
Correlation coefficient formula
This calculator uses the sample Pearson correlation coefficient:
r = Σ[(xᵢ − x̄)(yᵢ − ȳ)] / √( Σ(xᵢ − x̄)² · Σ(yᵢ − ȳ)² )
where:
- xᵢ, yᵢ are paired observations
- x̄ is the mean of X and ȳ is the mean of Y
- r ranges from −1 to +1
How to interpret r
This is a common guideline (not a strict rule):
- |r| < 0.3 → weak / negligible linear relationship
- 0.3 ≤ |r| < 0.5 → moderate linear relationship
- |r| ≥ 0.5 → strong linear relationship
Keep in mind: correlation ≠ causation. A high r does not prove that X causes Y.