Pearson Correlation Coefficient (r) Calculator

Compute Pearson’s r for two paired data columns, with R² and a plain-language interpretation of strength and direction.

Inputs

First variable, comma-separated.

Second variable — same count as X.

Result

Pearson correlation (r)
0.7746
strong positive correlation · R² = 0.6000
  • r0.774597
  • R² (variance explained)0.600000
  • Strengthstrong positive
  • Covariance (sample)1.500000
  • Points (n)5
Note — Pearson r measures only linear association and ranges from −1 to +1. It is sensitive to outliers and does not capture curved relationships. Correlation does not imply causation.

Step-by-step

  1. Center each variable on its mean and accumulate Σ(x−x̄)(y−ȳ) = 6.0000.
  2. Normalize by the spreads: r = 6.0000 ÷ √(10.0000 × 6.0000) = 0.774597.
  3. Interpretation: strong positive linear relationship; R² = 0.6000 of variance shared.

How to use this calculator

  • Enter the X values, comma-separated.
  • Enter the matching Y values in the same order.
  • Read r, its strength/direction label, and R².
  • Use a scatter plot alongside r to confirm the relationship is roughly linear.

About this calculator

Pearson’s correlation coefficient, r, measures the strength and direction of the linear relationship between two variables. It ranges from −1 to +1: a value near +1 means the two variables rise together almost perfectly, near −1 means one falls as the other rises, and near 0 means little or no linear relationship. It is computed as the covariance of the two variables divided by the product of their standard deviations, which standardizes it onto the −1 to +1 scale regardless of the units involved. Squaring r gives R², the proportion of variance the two variables share. This calculator returns r, R², and a plain-language label for the strength and direction, from a pair of equal-length data columns. Remember that r captures only straight-line association and that correlation never, by itself, establishes causation.

How it works — the formula

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

The numerator is the covariation of X and Y; dividing by the product of their spreads standardizes it to the −1…+1 range, independent of units.

Worked examples

Example 1
X=1,2,3,4,5 Y=2,4,5,4,5
Inputs:
xs=1,2,3,4,5; ys=2,4,5,4,5
Output:
r ≈ 0.7746, R² = 0.6
Example 2
Perfect positive
Inputs:
xs=1,2,3; ys=10,20,30
Output:
r = 1.0
Example 3
Perfect negative
Inputs:
xs=1,2,3,4; ys=8,6,4,2
Output:
r = −1.0

Limitations

  • Captures only linear relationships; misses curves.
  • Sensitive to outliers; consider Spearman for ranked/robust analysis.
  • Requires non-constant data in both variables.

Correlation is not causation; pair r with a scatter plot.

Frequently asked

It measures the strength and direction of the linear association between two numeric variables, on a scale from −1 (perfect negative) through 0 (no linear relationship) to +1 (perfect positive).

Related calculators

More tools you might like