Correlation Calculator

Calculate Pearson correlation coefficient (r) and R² for two datasets, with t-statistic and p-value to test whether the correlation is statistically significant.

Share this calculator

1

Pearson r

0.99

0

p-value

−1 (perfect negative) 0 +1 (perfect positive)

Very strong positive correlation

Pearson r1
R² (coefficient of determination)0.99
t-statistic28.44
p-value (two-tailed)0
Degrees of freedom8
n (pairs)

Also in Statistics

Inferential Statistics

Correlation calculator — Pearson r and R²

The Pearson correlation coefficient (r) measures the strength and direction of the linear relationship between two variables. This calculator computes r, R² (coefficient of determination), a t-statistic, and a p-value to test whether the correlation is statistically significant.

What Pearson r measures

r ranges from −1 to +1. A value of +1 indicates a perfect positive linear relationship (as X increases, Y increases proportionally), −1 indicates perfect negative linear relationship, and 0 indicates no linear relationship. Values between 0.7–0.9 are typically called strong, 0.5–0.7 moderate, and below 0.3 weak.

r only measures linear relationships. Two variables with a perfect U-shaped (quadratic) relationship can have r ≈ 0. Always plot your data to inspect the shape of the relationship before relying on r.

R² and the coefficient of determination

R² = r² expresses the proportion of variance in Y that is explained by X. For example, r = 0.8 → R² = 0.64, meaning X explains 64% of the variance in Y. The remaining 36% is attributable to other factors or random variation.

In simple linear regression, R² equals the square of the Pearson correlation. In multiple regression, R² generalises to multiple predictors.

Significance testing

To test whether r is significantly different from zero, a t-statistic is computed: t = r√(n−2) / √(1−r²), with df = n − 2. The resulting p-value indicates the probability of observing such a correlation if the population correlation were truly zero.

Statistical significance does not imply practical importance. With a large sample, even a tiny r can be statistically significant. Always consider the magnitude of r alongside the p-value.

Frequently asked questions

Does a high correlation prove causation?

No. Correlation measures the strength of a linear association but cannot establish causation. A high r could reflect a direct causal relationship, reverse causation, a confounding variable, or coincidence.

What is a good value of r?

Context matters greatly. In physics experiments, r > 0.99 may be expected. In social science research, r = 0.3–0.5 is often considered meaningful. There is no universal threshold.

How many data points do I need?

At least 3 pairs are required (df = 1 for the significance test). For reliable results, n ≥ 20–30 pairs is recommended. With small samples, even spuriously high r values can occur by chance.

Related

More from nearby categories

These related calculators come from the same leaf category, nearby sibling categories, or the same top-level topic.