Psychology · Interactive tool
Correlation and Linear Regression
Calculate Pearson or rank correlation and a least-squares line.
Your inputs
Result
Calculated output
Enter inputs to calculate.
r=Σ(x−x̄)(y−ȳ)/√[Σ(x−x̄)²Σ(y−ȳ)²]. Spearman ρ is Pearson r applied to average ranks, including ties.
ŷ=a+bx; b=Σ(x−x̄)(y−ȳ)/Σ(x−x̄)²; a=ȳ−bx̄. The line always uses raw measurements. Correlation does not establish causation.