Pearson Correlation Coefficient

r = Σ(xᵢ−x̄)(yᵢ−ȳ) / √(Σ(xᵢ−x̄)² Σ(yᵢ−ȳ)²). Linear correlation [−1, 1].

Inputs

Result

Loading calculator…

How to use this calculator

  • Enter paired x and y values, comma-separated.
  • Calculator pairs them in order.
  • Read r, r², and regression line.

About this calculator

Pearson r measures linear correlation between two variables: r = +1 (perfect positive), 0 (none), −1 (perfect negative). r² = "coefficient of determination" — fraction of variance in y explained by linear relationship with x. Pearson assumes linear, normally-distributed data. For non-linear or rank-based associations, use Spearman ρ. Correlation does not imply causation — always.

Frequently asked

r vs. r²?+
r is the correlation; r² is "% variance explained". r = 0.7 means r² = 0.49 — only 49% explained even with strong correlation.
Pearson vs. Spearman?+
Pearson: linear relationships, continuous data. Spearman: ranks, monotonic but non-linear. Use Spearman for ordinal data.
Correlation = causation?+
No. Strong correlation might be coincidence, common cause, or reverse causation. Need experiment or causal inference to claim causation.
Outlier impact?+
Pearson is sensitive to outliers — one extreme point can flip r. Always plot data. Spearman is more robust.
Sample size minimum?+
r is unreliable with n < 10. For inference, n ≥ 30 + plot residuals.

Related calculators

More tools you might like