Skip to content
LunaCalc

Statistics

Correlation Coefficient Calculator

Compute Pearson correlation and coefficient of determination for paired data.

Calculator

About this calculator

This correlation calculator measures the Pearson correlation coefficient between two number lists and the share of variance they share.

Formula notes

r = Σ((xᵢ−x̄)(yᵢ−ȳ)) / √(Σ(xᵢ−x̄)²·Σ(yᵢ−ȳ)²); r² is the proportion of variance explained.

Worked examples

  1. Example: x = 1,2,3,4,5 and y = 2,4,5,4,5 give r ≈ 0.775, r² = 0.6 — a positive strong relationship.
  2. For paired values x = [1,2,3,4] and y = [2,4,5,8], Pearson correlation is strongly positive but below 1 because the points are not perfectly linear.

How to use it

  1. Enter both lists with the same number of values.
  2. Read r for direction and strength.
  3. Read r² for the explained-variance share.

Frequently asked questions

Does r = 0.8 prove causation?

No. Correlation only measures linear association; lurking variables can drive both.

Why must the lists have equal length?

Each x is paired with the y measured for the same case, so pairs must line up.

Limits and interpretation

  • Pearson correlation measures linear association and can miss nonlinear relationships or be dominated by outliers.
  • Correlation does not establish causation, direction of influence, independence, or the absence of confounding.

References