Correlation Calculator
Compute Pearson's correlation coefficient r between two paired datasets.
About Correlation Calculator
Pearson's correlation coefficient r measures the strength and direction of the linear relationship between two variables. It ranges from −1 (perfect negative) to +1 (perfect positive). R² indicates the proportion of variance in Y explained by X.
Formula
r = Σ(xᵢ−x̄)(yᵢ−ȳ) / √[Σ(xᵢ−x̄)² × Σ(yᵢ−ȳ)²]
- xᵢ,yᵢ
- Paired data points
- x̄,ȳ
- Means of X and Y
Worked example
With the default values below, Correlation Calculator returns Correlation Coefficient (r) of 0.774597. Change any input above and every figure here is recalculated in your browser.
Inputs used
- X values (comma separated)
- 1, 2, 3, 4, 5
- Y values (comma separated)
- 2, 4, 5, 4, 5
Results
- Correlation Coefficient (r)
- 0.774597
- R²
- 0.600000
- Interpretation
- Strong positive linear relationship
Step by step
- 1Values used
- 2Formula applied
- 3Correlation Coefficient (r)= 0.774597
- 4R²= 0.600000
- 5Interpretation= Strong positive linear relationship
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 6 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
What does r = 0 mean?
An r of 0 indicates no linear relationship between the variables. However, a non-linear relationship may still exist.
What is the difference between correlation and causation?
Correlation measures association. Two variables can be highly correlated without one causing the other — both may be driven by a third factor.
