Intermediate

Pearson Correlation Calculator — r, r² and Significance

Enter two equal-length lists of numbers to compute Pearson's r, the coefficient of determination r², and a t-test for significance. The step-by-step solution shows every intermediate quantity — means, covariance numerator, variance terms — so you can follow the maths.
Pearson r
0.9904

very strong positive correlation — r ranges from −1 to +1

n (pairs)
5
r (Pearson)
0.9904
r² (coefficient of determination)
0.981
t-statistic
12.4384
Degrees of freedom
3
Significant at α = 0.05?
Yes
Step-by-step calculation
1

n (pairs)

n = 5
2

Mean of X

x̄ = 5
3

Mean of Y

ȳ = 6.2
4

Σ(xᵢ − x̄)(yᵢ − ȳ) [covariance numerator]

Sxy = 38
5

Σ(xᵢ − x̄)² [variance of X]

Sxx = 40
6

Σ(yᵢ − ȳ)² [variance of Y]

Syy = 36.8
=

r = Sxy / √(Sxx × Syy)

r = 38 / √(40 × 36.8) = 0.9904
8

r² (coefficient of determination)

r² = 0.981
9

t-statistic (df = 3)

t = r√(n−2) / √(1−r²) = 12.4384
Step by step
  1. 1

    Mean of X (x̄)

    5
  2. 2

    Mean of Y (ȳ)

    6.2
  3. 3

    Sxy = Σ(xᵢ − x̄)(yᵢ − ȳ)

    38
  4. 4

    Denominator = √(Sxx × Syy)

    √(40 × 36.8) = 38.3667
  5. 5

    Pearson r = Sxy ÷ denominator

    38 ÷ 38.3667 = 0.9904
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

r = Σ(xᵢ−x̄)(yᵢ−ȳ) / √[Σ(xᵢ−x̄)² · Σ(yᵢ−ȳ)²]. It ranges from −1 to +1; r² gives shared variance. The t-statistic t = r√(n−2)/√(1−r²) tests whether ρ = 0 at α = 0.05. Needs at least 3 pairs. Pearson r detects only linear relationships and is sensitive to outliers.

Formula
r = Σ(xᵢ − x̄)(yᵢ − ȳ) / √[Σ(xᵢ − x̄)² · Σ(yᵢ − ȳ)²] • t = r√(n − 2) / √(1 − r²) [df = n − 2]
How this is calculated

Pearson's r measures the strength and direction of the linear relationship between two continuous variables. It is computed from paired observations (x₁,y₁), …, (xₙ,yₙ): subtract the mean from each value to get deviations, multiply paired deviations and sum them (the covariance numerator Sxy), then divide by the geometric mean of the two variance sums √(Sxx · Syy). The result is dimensionless and lies in [−1, +1]: +1 is a perfect positive line, −1 is a perfect negative line, 0 means no linear trend. r² (the coefficient of determination) gives the proportion of variance in Y that is linearly explained by X.

To test whether the correlation is statistically significant, r is converted to a t-statistic: t = r × √(n − 2) / √(1 − r²), which follows a t-distribution with n − 2 degrees of freedom under the null hypothesis that the true population correlation ρ = 0. This calculator reports the t-statistic and whether |t| exceeds the two-tailed critical value at α = 0.05 (the precise critical value depends on df: 12.706 for df = 1, 2.571 for df = 5, 2.042 for df = 30+).

Pearson's r captures only monotone linear patterns and is sensitive to outliers. It assumes the variables are measured on a continuous scale, the observations are independent, and ideally that the data are bivariate-normal for the significance test to be exact. At least 3 pairs are needed (the t-distribution has df = n − 2 ≥ 1). Correlation does not imply causation.

Frequently asked questions

An r of 0.8 indicates a strong positive linear relationship: as X increases, Y tends to increase proportionally. r² = 0.64 means that 64% of the variation in Y can be statistically explained by a linear function of X. The remaining 36% is unexplained by this linear model.

At minimum you need n ≥ 3 to compute a t-statistic. In practice, small samples produce unreliable estimates of ρ — with n = 5 even an r of 0.88 is needed to reach p < 0.05. For a stable estimate of a moderate correlation (|r| ≈ 0.3–0.5) aim for at least n = 30–50 pairs.

Use Spearman's rank correlation when the data contain severe outliers, when the relationship is monotone but not linear, or when the variables are ordinal rather than continuous. Spearman is computed by replacing each value with its rank and then applying the Pearson formula to the ranks.

Also known as

pearson correlation step by step
pearson r calculator with work shown
linear correlation coefficient calculator
r squared significance test
pearson r t statistic
correlation significance calculator
pearson correlation formula calculator

APA

TG we-Calculate Editorial Team. (2026). Pearson Correlation Calculator — r, r² and Significance [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/pearson-correlation-calculator

Chicago

TG we-Calculate Editorial Team. "Pearson Correlation Calculator — r, r² and Significance." TG we-Calculate. 2026. https://we-calculate.com/calculator/pearson-correlation-calculator.

IEEE

TG we-Calculate Editorial Team, "Pearson Correlation Calculator — r, r² and Significance," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/pearson-correlation-calculator

BibTeX

@misc{wecalculate_pearson_correlation_calculator, title = {Pearson Correlation Calculator — r, r² and Significance}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/pearson-correlation-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?