AIWalay Tools

Correlation Calculator

Calculate the Pearson correlation coefficient for paired data. Free tool showing r, r-squared, strength and direction with the covariance steps.

About the Correlation Calculator

The Pearson correlation coefficient (r) measures how strongly two variables move together, on a scale from −1 to +1. This free correlation calculator takes your paired x and y values, computes r, and tells you the strength and direction of the relationship along with r-squared, the means and the sums used in the formula.

The formula is r = Σ((x − x̄)(y − ȳ)) ÷ √(Σ(x − x̄)² × Σ(y − ȳ)²). A value near +1 means a strong positive relationship (as x rises, y rises), near −1 a strong negative one, and near 0 little linear relationship. Squaring r gives r-squared — the share of variation in y explained by x.

Students, analysts and researchers use correlation to spot relationships between variables like study hours and grades, or advertising spend and sales. Remember that correlation does not prove causation. Everything runs privately in your browser.

How to Use the Correlation Calculator

  1. 1Enter your x values and your y values, one pair per line or as comma-separated lists.
  2. 2Make sure both lists have the same number of values.
  3. 3Read the correlation coefficient r and its strength label.
  4. 4Check r-squared to see how much variation is explained.

Frequently Asked Questions

How do I interpret a correlation coefficient?

Values from 0 to ±0.3 are weak, ±0.3 to ±0.7 moderate, and ±0.7 to ±1 strong. The sign gives direction: +0.85 is a strong positive relationship, −0.85 a strong negative one. An r of 0 means no linear relationship, though a curved one could still exist.

What is the difference between r and r-squared?

r measures the strength and direction of a linear relationship; r-squared (r × r) is the proportion of variance in y explained by x. If r = 0.8, then r-squared = 0.64, meaning 64% of the variation in y is explained by x.

Does a high correlation mean one variable causes the other?

No. Correlation only measures association. Ice-cream sales and drowning deaths correlate because both rise in summer, not because one causes the other. Establishing causation requires controlled experiments or careful study design.

How many data points do I need?

At least two pairs to compute r, but the coefficient becomes meaningful only with more. With small samples a high r can occur by chance, so aim for at least 20-30 pairs before drawing conclusions.

Can correlation be exactly 1 or -1?

Yes, when every point lies exactly on a straight line. In real data this is rare; a perfect r usually signals that the two variables are actually the same quantity in different units, or that you have very few points.

Related Tools