Pearson Correlation Calculator

Measuring a Straight-Line Relationship

Pearson's r is the most widely reported correlation statistic in applied statistics, and for good reason: it gives a single number, bounded between −1 and 1, that captures how tightly two variables move together in a linear fashion. It says nothing about curved relationships, and a strong r doesn't establish causation — but as a first diagnostic on paired numeric data, it's hard to beat for speed and interpretability.

The Formula

r = Σ((x−x̄)(y−ȳ)) / √(Σ(x−x̄)² × Σ(y−ȳ)²)

Significance is tested by converting r to a t statistic: t = r√(df / (1−r²)), with df = n − 2.

Worked Example

x = 1, 2, 3, 4, 5. y = 2, 4, 5, 4, 5.

Pearson correlation result
QuantityValue
r0.7746
df3
InterpretationStrong positive linear relationship

Computed directly from the calculator's formula.

Interpreting the Strength of r

Common strength-of-correlation bands for |r|
|r| rangeStrength
0.90 – 1.00Very strong
0.70 – 0.89Strong
0.50 – 0.69Moderate
0.30 – 0.49Weak
0.00 – 0.29Very weak / negligible

Bands taken directly from the calculator's classification logic.

Where This Calculation Matters

  • Exploratory data analysis — scanning pairs of numeric variables for linear relationships before building a more complex model.
  • Feature screening — in predictive modeling, correlation with the target variable is often the first filter applied to a large set of candidate predictors.
  • Validating instrument agreement — checking whether two measurement methods (e.g., two thermometers or two lab assays) track each other closely.
Note: Pearson's r only detects linear association. Two variables can have a strong non-linear relationship (e.g., a U-shape) and still show an r near zero.

How to Use This Calculator

  1. Enter the X values as a comma-separated list.
  2. Enter the Y values as a comma-separated list, in the same order (at least 3 paired values).
  3. Select Calculate to get r, the significance test, and the strength interpretation.

Related Calculations

For rank-based data or non-linear monotonic relationships, use the Spearman Rank Correlation Calculator. To fit a predictive line through the same data, see the Linear Regression Calculator.