DoesWhatAnswersSlangEmojisCalculatorsTriviaPlayBlog

Trivia Questions and Weird Facts

Statistics

Correlation Calculator

Paste two matching lists to measure their linear association with Pearson's correlation coefficient. The calculator returns r, R squared, sample covariance and both means. Each X is paired with the Y in the same position, so the order matters.

Loading the calculator. It runs in your browser, so JavaScript needs to be on.

How to use the Correlation Calculator

  1. Enter the first measurement list in X values and the corresponding second list in Y values.
  2. Separate numbers with commas, spaces or new lines. Do not include column headings, currency symbols or missing-value labels.
  3. Keep the lists the same length, with between 2 and 10,000 pairs. Both lists must contain variation.
  4. Read Pearson correlation coefficient, r. Use R squared to describe the fitted linear relationship's share of variation, and compare the means and covariance to check the data.

The formula

For paired observations, calculate each mean, then Sxx = sum of (x - mean X) squared, Syy = sum of (y - mean Y) squared, and Sxy = sum of (x - mean X)(y - mean Y). Pearson r = Sxy / square root of (Sxx times Syy). Sample covariance = Sxy/(n - 1). For simple linear regression with an intercept, R squared = r squared.

Worked example

For X = 1, 2, 3 and Y = 2, 4, 6, the means are 2 and 4. The centered sums are Sxx = 2, Syy = 8 and Sxy = 4. Therefore r = 4 / square root of 16 = 1, R squared is 1, and sample covariance is 2.

Read direction and strength separately

The sign describes direction. An r of -0.9 means Y tends to fall as X rises, and its linear association is stronger than r = +0.3. The magnitude runs from 0 to 1. There is no universal cutoff for a useful correlation: measurement error, the field of study and the decision at hand all matter.

Zero correlation can hide a clear pattern

For X = -1, 0, 1 and Y = 1, 0, 1, r is zero even though Y equals X squared exactly. Pearson r detects a straight-line pattern. Plot your pairs before interpreting the number, especially if you suspect curvature, separate clusters or one extreme observation. With only two nonconstant pairs, r is always +1 or -1 and offers little evidence about a wider population.

Covariance has units; correlation does not

If X is measured in hours and Y in dollars, covariance has hour-dollar units. Converting dollars to cents changes covariance by a factor of 100, while Pearson r stays the same. Correlation is therefore easier to compare across scales. It still does not establish cause: a third variable, reverse causation or selective sampling can produce an impressive coefficient.

Correlation Calculator questions

What does a negative correlation mean?

It means higher X values tend to accompany lower Y values along a linear trend. The negative sign does not mean the association is weak.

Can correlation be greater than 1?

No. Pearson r is bounded by -1 and +1 when defined. Values outside that range indicate a calculation or data problem.

Why does a constant list give an error?

A constant list has zero standard deviation, making the correlation denominator zero. The coefficient is undefined even when the other list varies.

Does this calculator give statistical significance?

No. It reports descriptive Pearson correlation and related summaries, without a p-value or confidence interval. Statistical inference also needs suitable sampling and distributional assumptions.

Related calculators