Mathematics· Exact, step by step
Calculate Pearson's r and Spearman's rank correlation for paired data, with r², a significance test and a scatter plot.
Formula
r = Σ(x − x̄)(y − ȳ) ÷ √(Σ(x − x̄)² · Σ(y − ȳ)²); Spearman = Pearson r of the ranks; t = r√(n − 2) ÷ √(1 − r²)
Worked example
x = 1–5, y = 2, 4, 5, 4, 5: Pearson r = 0.7746 (r² = 0.6), Spearman ρ = 0.7379.
Free to use with a link back. Nothing you type is shared.
Preparing citation…
Keep exploring
Calculate the sample and population covariance between two paired data sets.
Open calculatorFit a straight line of best fit to your data and get the slope, intercept, correlation and R².
Open calculatorTurn a z, t, chi-square or F test statistic into a one- or two-tailed p-value.
Open calculator