Correlation Calculator

Calculate Pearson correlation coefficient (r), r², Spearman rank correlation, p-value, confidence interval, and regression equation from X and Y data sets.

Pearson r
r² (Coefficient of Determination)
Interpretation
Extended More scenarios, charts & detailed breakdown
Pearson r
Sample Size
Professional Full parameters & maximum detail

Correlation Statistics

Pearson r
Standard Error of r
p-value (approx)

Confidence Interval

95% CI Lower
95% CI Upper

Regression

Regression Equation
Predicted Y

How to Use This Calculator

  1. Enter X values as comma-separated numbers (e.g., 1,2,3,4,5).
  2. Enter matching Y values in the same order.
  3. Click Calculate to get Pearson r, r², and an interpretation.
  4. Use the Spearman Rank tab for ordinal data.
  5. The Professional tab adds p-value, standard error, 95% CI, and regression equation.

Formula

Pearson r = Σ[(xᵢ−x̄)(yᵢ−ȳ)] / √[Σ(xᵢ−x̄)²·Σ(yᵢ−ȳ)²]

Spearman rₛ = 1 − 6Σd² / n(n²−1) where d = rank difference

Example

X: 1,2,3,4,5 | Y: 2,4,5,4,5 → r ≈ 0.9, r² ≈ 0.81 (strong positive correlation).

Frequently Asked Questions

  • Pearson r measures the linear relationship between two variables, ranging from −1 (perfect negative) to +1 (perfect positive). A value of 0 indicates no linear relationship.
  • |r| ≥ 0.9 = very strong, 0.7–0.9 = strong, 0.5–0.7 = moderate, 0.3–0.5 = weak, < 0.3 = very weak correlation.
  • r² tells you the proportion of variance in Y explained by X. If r = 0.8, then r² = 0.64, meaning X explains 64% of the variation in Y.
  • Spearman rank correlation (rₛ) measures the monotonic relationship using ranked data. It works for ordinal data and is less sensitive to outliers than Pearson r.
  • At least 2 for a basic correlation, but at least 10–20 is recommended for reliable results. More data makes the correlation estimate more stable.

Related Calculators