Calculate correlation

Calculate Pearson correlation and the coefficient of determination for paired numeric observations.

freeworks offlinenothing uploaded
ToolCorrelation Calculator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Pearson r divides the centered cross-product of two lists by the product of their centered sums of squares; r² is its squared value. The calculation reports association for the supplied sample and avoids universal strength labels because practical meaning depends on the field and study design.

  • Both lists must contain paired observations and each must vary.

Worked example

Two lists of five points
Paired x and y readings
Input
											X values: [1,2,3,4,5]
Y values: [2,4,5,4,5]
										
Output
												N: 5
R: 0.7746
R squared: 0.6
Strength: Strong positive
											

When to use this

Quality-control measurements, experiment summaries, and exploratory data analysis calculate paired association.

Edge cases

  • A constant list has zero standard deviation, so r is undefined.
  • A single outlier can move r substantially.
  • Correlation does not establish that one variable causes the other.

References