Correlation Coefficient Calculator

Calculate the Pearson correlation coefficient (r) and coefficient of determination (r²) from two data sets. Paste comma-separated or line-separated values — get r, r², interpretation, and step-by-step working.

Data Input

Examples:

Separate values with commas, spaces, or newlines. X and Y must have the same number of values (minimum 2).

Results

r (Pearson)

n (pairs)

Direction

−1 (perfect negative)0 (none)+1 (perfect positive)
Enter data above

x̄ (mean X)

ȳ (mean Y)

σx (std X)

σy (std Y)

Step-by-Step Working

Data Table

#xyx − x̄y − ȳ(x−x̄)(y−ȳ)(x−x̄)²(y−ȳ)²

Correlation Strength Guide

|r| RangeStrengthInterpretation
0.00 – 0.09NegligibleVirtually no linear relationship
0.10 – 0.19Very weakMinimal linear trend
0.20 – 0.39WeakLow degree of linear association
0.40 – 0.59ModerateNoticeable but imperfect relationship
0.60 – 0.79StrongClear linear trend, useful for prediction
0.80 – 0.99Very strongTight linear relationship
1.00PerfectAll points lie exactly on a line

Frequently Asked Questions

The Pearson r measures the linear relationship between two variables, ranging from −1 (perfect negative) to +1 (perfect positive). A value near 0 means no linear relationship. Formula: r = [n∑xy − ∑x∑y] / √[(n∑x² − (∑x)²)(n∑y² − (∑y)²)].

r² (the coefficient of determination) is simply r squared. While r measures linear association direction and strength, r² tells you what proportion of the variance in Y can be explained by X. r = 0.9 → r² = 0.81 → 81% of Y's variation is explained. r² is always between 0 and 1 and has no directional sign.

No. Correlation only shows that two variables tend to move together linearly. It does not mean one causes the other. A third confounding variable could drive both; the correlation could be coincidental (spurious); or the causal direction could be reversed. Causation requires controlled experiments or strong theoretical grounding.

Use Spearman's rank correlation when: (1) your data is ordinal rather than continuous; (2) the relationship is monotonic but not necessarily linear; (3) you have significant outliers that would distort Pearson r. Spearman works on the ranked values of the data, making it more robust to outliers.