Correlation Calculator — Pearson r with Scatter Plot
Enter two equal-length lists of numbers to compute the Pearson correlation coefficient (r), coefficient of determination (r²), regression slope, and t-statistic — with a scatter plot and best-fit line.
Very strong positive correlation
How does this calculator work?
r = Σ(xᵢ−x̄)(yᵢ−ȳ) / √(Σ(xᵢ−x̄)² · Σ(yᵢ−ȳ)²). Near ±1 = strong linear correlation; near 0 = weak or none. r² is the shared variance fraction. t = r√(n−2)/√(1−r²) tests significance. Correlation never implies causation — always inspect the scatter plot.
Formula
How this is calculated
The Pearson correlation coefficient r measures the strength of the linear relationship between two paired variables. The numerator, Σ(xᵢ−x̄)(yᵢ−ȳ), is the covariance: positive when both variables tend to move above or below their means together, negative when they move in opposite directions. Dividing by the product of standard deviations scales r to [−1, +1] regardless of units.
r² (the coefficient of determination) is r squared — the proportion of variance in Y explained by X in a straight-line model. The regression slope, Σ(xᵢ−x̄)(yᵢ−ȳ) / Σ(xᵢ−x̄)², gives the best-fit line gradient: for every one-unit rise in X, Y changes by this amount on average. The scatter plot shows your data points with the regression line overlaid so you can immediately see whether the relationship is visually linear.
The t-statistic, r√(n−2)/√(1−r²), follows a t-distribution with n−2 degrees of freedom under the null hypothesis of no correlation. Large |t| indicates stronger evidence against a zero population correlation. Pearson r assumes a linear relationship, independent pairs, and approximate normality; it is sensitive to outliers and does not imply causation.
Frequently asked questions
r is the Pearson correlation coefficient (direction + strength, −1 to +1). r² is its square — the coefficient of determination — representing the fraction of variance in Y explained by X. An r of 0.7 gives r² = 0.49, meaning 49% of Y variation is explained by the linear relationship.
The t-statistic tests whether r is significantly different from zero. With n−2 degrees of freedom, |t| ≈ 2 roughly corresponds to p ≈ 0.05. More pairs make smaller r values statistically significant. Use a t-table or p-value calculator to get the exact p-value.
Always look at the scatter plot. Anscombe's Quartet famously shows four very different data sets that all share the same r ≈ 0.82 — because Pearson r only captures straight-line relationships. A scatter plot reveals outliers, curves, clusters, or other non-linear patterns that r alone misses.
TG we-Calculate Editorial Team. (2026). Correlation Calculator — Pearson r with Scatter Plot [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/correlation-calculator
TG we-Calculate Editorial Team. "Correlation Calculator — Pearson r with Scatter Plot." TG we-Calculate. 2026. https://we-calculate.com/calculator/correlation-calculator.
TG we-Calculate Editorial Team, "Correlation Calculator — Pearson r with Scatter Plot," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/correlation-calculator
@misc{wecalculate_correlation_calculator, title = {Correlation Calculator — Pearson r with Scatter Plot}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/correlation-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
