Skip to main content

Correlation Calculator

Pearson product-moment r for paired numbers. Type one x y pair per line. r sits between -1 and 1. This is not Spearman rank or a p-value table.

Rated 4.7 out of 5 based on 355 reviews

Results

How to compute Pearson r

  1. Enter at least two lines. Each line needs two numbers, x then y, split by space, comma, or semicolon.
  2. Keep both columns the same length. A line with one number fails.
  3. Read Pearson r, n, and the two means. The default 1 2, 2 4, 3 6 is a perfect line, so r is 1.
  4. If one list is constant, r is undefined and the status line says so. Nothing is uploaded.

Pearson product-moment correlation

Linear association r for paired samples

Formular = sum((x - mean x)(y - mean y)) / sqrt(sum(x - mean x)^2 * sum(y - mean y)^2)
Ranger from -1 to 1
Minimum nTwo paired values
Undefined whenEither list has zero variance
InputOne x y pair per line
Not computedSpearman rho, Kendall tau, p-value, or R-squared test

What Pearson r reports

Pearson r measures linear association between two equal-length lists. r = 1 is a perfect rising line. r = -1 is a perfect falling line. r = 0 means no linear pattern, not that the variables are independent in every sense. Outliers pull r. Rank correlation is a different coefficient and is not on this page.

How this page computes r

Each line splits into x and y. Means are the arithmetic means of those columns. The numerator is the sum of (x minus mean x) times (y minus mean y). The denominator is the square root of the product of the two summed squared deviations. If either summed square is 0, r is undefined. n is the pair count. Spread of one column alone is the standard deviation job.

Correlation, z-score, and related statistics

Standardizing a single value uses a typed mean and SD on the z-score page. Pearson r is not a slope and is not causation. A unit change in x does not equal r. Covariance in original units is not printed. Sample versus population wording does not change this r formula, which uses the centered product form with the same n in both sums.

Use cases

A lab pair list, a homework check that 1 2, 2 4, 3 6 yields r = 1, or a quick look at whether two series move together before you reach for regression software. It is not a significance test.

Limits

At least two pairs. Both lists need variance. No missing-value codes. No Spearman. No p-value. IEEE floating point applies. CZNull does not receive the lists.

Correlation questions

How do I format the pairs?
One pair per line, x then y, separated by space, comma, or semicolon.
What does the default list yield?
The default 1 2, 2 4, 3 6 lies on a line, so Pearson r is 1.
Why is r undefined?
When every x is the same or every y is the same, the denominator is 0.
Is this Spearman correlation?
No. This page is Pearson product-moment r on the raw numbers.
Does r prove causation?
No. r is a linear association figure only.
Where do I get a z-score instead?
Use the z-score calculator with a single x, mean, and standard deviation.