# Pearson Correlation Calculator

> Paste paired x and y data to get Pearson’s r, r², the t test of zero correlation (two- or one-sided p) and a Fisher z confidence interval for r.

Category: Statistics & probability · Applies to: Worldwide · Last updated: 2026-10-29
Interactive calculator: https://calculators.geekmidst.com/calculators/pearson-correlation-calculator

Pearson’s r measures how closely paired data follow a straight line, from −1 (perfect negative) through 0 (no linear relation) to +1 (perfect positive).

Also called: Correlation coefficient calculator, Pearson r calculator.

## Inputs
- X values (default 1, 2, 3, 4, 5)
- Y values (same order) (default 2, 4, 5, 4, 5)
- Alternative hypothesis (options: Two-sided: ρ ≠ 0, One-sided: ρ > 0, One-sided: ρ < 0; default two)
- Confidence level for r (unit %; default 95)

## Results
- Pearson’s r
- r² (share of variance explained)
- Pairs (n)
- t statistic (n − 2 df)
- p-value
- p-value and sidedness
- Confidence interval for ρ (Fisher z)
- CI lower bound
- CI upper bound

## Formula

```
r = Sxy ÷ √(Sxx·Syy);  t = r·√((n − 2) ÷ (1 − r²)) with n − 2 df;  CI = tanh(atanh r ± z* ÷ √(n − 3))
```

Where:
- Sxy: Σ(x − x̄)(y − ȳ)
- Sxx, Syy: sums of squared deviations of x and y
- n: number of pairs
- z*: two-sided standard normal critical value

## Worked example
1. x̄ = 3, ȳ = 4. Sxy = 6, Sxx = 10, Syy = 6.
2. r = 6 ÷ √(10 × 6) = 0.7746, so r² = 0.6.
3. t = 0.7746 × √(3 ÷ 0.4) = 2.121 with 3 df: two-sided p = 0.124.

**Result:** The five pairs have r = 0.77, a fairly strong positive association, but with so few points it is not significant at 5% (p = 0.12).

## What the result means

r describes linear association only: a strong curved relation can give r near 0, and a single outlier can create or hide a correlation, so always look at a scatter plot. Correlation does not show which variable causes the other, or whether a third factor drives both.

## Assumptions and limits
- Pairs are independent observations.
- For the p-value and interval: x and y are roughly bivariate normal (or n is large).
- The p-value is for the null hypothesis ρ = 0, with the sidedness you choose.
- The Fisher z interval needs at least 4 pairs and is approximate for small n.
- For ranked or strongly non-normal data, use Spearman’s rank correlation.

## Questions

### What counts as a strong correlation?

It depends on the field. As a rough guide, |r| around 0.1 is small, 0.3 moderate and 0.5 or more large, but a scatter plot says more than any label.

### Why do r and the regression slope have the same p-value?

With one predictor, the test of zero correlation and the test of zero slope are the same t test.

## Related calculators
- [Spearman Correlation Calculator](https://calculators.geekmidst.com/calculators/spearman-correlation-calculator)
- [Linear Regression Slope Calculator](https://calculators.geekmidst.com/calculators/linear-regression-slope-calculator)
- [R-Squared Calculator](https://calculators.geekmidst.com/calculators/regression-r-squared-calculator)
- [P-value Calculator](https://calculators.geekmidst.com/calculators/p-value-calculator)

Source: GM¹X CalcVerse — https://calculators.geekmidst.com/calculators/pearson-correlation-calculator
