STATISTICS CALCULATOR

Correlation Calculator

Enter paired x and y observations, one pair per line, to calculate Pearson’s linear correlation and its squared value.

Calculator

Enter x, y on each line; do not sort either column separately.
YOUR RESULTS
Pearson correlation coefficient1
Squared correlation
1
Number of pairs
3

Page guide

Pearson correlation coefficient and interpretation

Pearson correlation ranges from −1 to 1 and has no measurement unit. Its square describes the strength of this linear association in the supplied pairs; neither output establishes causation.

The formula

r = Σ(xᵢ − x̄)(yᵢ − ȳ) / √[Σ(xᵢ − x̄)² Σ(yᵢ − ȳ)²].

Center each column, sum paired deviation products, and normalize by both columns’ deviation magnitudes. Both columns must vary; constant inputs make the denominator zero.

Verified worked example

The pairs (1, 2), (2, 4), and (3, 6) lie exactly on y = 2x. Their Pearson correlation is 1 and squared correlation is 1.

How to use this calculator

  1. Enter one x, y pair per line with a comma or space between the two values.
  2. Preserve the original pairings and provide at least two rows.
  3. Read Pearson r and its square while checking for outliers and nonlinear patterns in the underlying data.

Correlation input conventions

Each row represents one paired observation. Preserve the pairing when entering data; sorting one column independently invents a different relationship. Pearson’s coefficient is unitless and ranges from −1 to 1. Positive values indicate an upward linear association and negative values a downward one. A coefficient near zero can still coexist with a strong curved relationship.

Interpreting pearson correlation coefficient

Correlation does not establish causation, remove confounding, or assess sampling bias. Extreme observations can substantially change the coefficient, so examine the underlying pairs before reporting a summary. A constant column makes the denominator zero and its correlation undefined. Squared correlation is reported as a descriptive companion; it is not a general percentage of causal influence or proof that a model fits every part of the data.

Assumptions & limitations

What this calculation assumes

  • Rows remain paired and both columns have nonzero variation.

What to keep in mind

  • Pearson correlation only; no rank correlation, significance test, or causal inference.

Common questions

Does a correlation of 1 prove cause and effect?

No. It describes a perfect positive linear pattern in the supplied pairs. An experiment or additional design evidence is needed for a causal claim.

Why are constant columns rejected?

Their deviations all vanish, giving zero variance in the denominator. Pearson correlation cannot measure association without variation in both columns.

Can a zero correlation hide a relationship?

Yes. Pearson correlation measures linear association. A curved pattern can have a correlation near zero despite a strong non-linear relationship.

Sources & further reading

Reviewed on