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
How to compute Pearson r
- Enter at least two lines. Each line needs two numbers, x then y, split by space, comma, or semicolon.
- Keep both columns the same length. A line with one number fails.
- Read Pearson r, n, and the two means. The default 1 2, 2 4, 3 6 is a perfect line, so r is 1.
- 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
| Formula | r = sum((x - mean x)(y - mean y)) / sqrt(sum(x - mean x)^2 * sum(y - mean y)^2) |
|---|---|
| Range | r from -1 to 1 |
| Minimum n | Two paired values |
| Undefined when | Either list has zero variance |
| Input | One x y pair per line |
| Not computed | Spearman 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.