📊 Statistics & Probability

Correlation Calculator (Pearson r)

Calculate Pearson correlation coefficient between two variables. Free correlation calculator with strength interpretation.

Loading calculator…
Share: WhatsApp Facebook X / Twitter

What This Calculator Tells You

This calculator measures how strongly two sets of numbers move together using Pearson's correlation coefficient, r. It ranges from −1 to +1: close to +1 means they rise together, close to −1 means one rises as the other falls, and close to 0 means there is no straight-line relationship.

It also returns r² — the share of the variation in one variable that a straight line through the other explains.

What to Enter

  • X values — the first variable, such as monthly ad spend or temperature.
  • Y values — the second variable, such as sales, in the same order as X.

Both lists must have the same number of values, separated by commas, spaces or new lines. Each pair (first X with first Y, and so on) should come from the same observation — the same month, store or customer.

Worked Examples

1. Ad spend and leads

Monthly ad spend of $2k–$7k (X: 2, 3, 4, 5, 6, 7) against leads (Y: 11, 14, 15, 19, 21, 24).

  • Result → r = 0.9931, r² = 0.9862 — strong positive.
  • About 99% of the month-to-month variation in leads lines up with spend. Next step: the regression calculator estimates how many extra leads each $1k brings.

2. Temperature and ice-cream sales

Daily high temperature (60–90°F) against cones sold (210, 240, 260, 250, 300, 320, 310).

  • Result → r = 0.9449, r² = 0.8929 — strong positive, though not perfect: other factors also matter.

3. Price and units sold

Prices of $8–$12 (X: 8, 9, 10, 11, 12) against units sold (Y: 500, 470, 430, 410, 380).

  • Result → r = −0.9956 — strong negative: as price rises, units fall almost in a straight line.

How It’s Calculated

r = Σ((x − x̄)(y − ȳ)) ÷ √(Σ(x − x̄)² × Σ(y − ȳ)²)

How to Read Your Result

  • Strength: the calculator labels |r| above 0.7 as strong, above 0.4 as moderate, above 0.2 as weak and the rest as very weak. These cut-offs are conventions, not laws.
  • Direction: the sign tells you whether the variables move together (+) or in opposite directions (−).
  • r² in plain words: r = 0.5 means only 25% of the variation is explained by a straight line.
  • Correlation is not causation. Ice-cream sales and sunburns correlate because both follow the weather. Read correlation vs regression for next steps.

Common Mistakes to Avoid

  • Misaligned lists. If the X and Y values are not in matching order, the result is meaningless.
  • Too few data points. With five or six pairs, a strong-looking r can happen by chance.
  • Missing curved relationships. Pearson's r only measures straight-line relationships; a U-shaped pattern can show r near zero.
  • Letting outliers drive the result. One extreme point can create or hide a correlation. Plot your data first.
  • Reading correlation as cause. A third factor may drive both variables.
Built and maintained by GenAlpha Tools Editorial. Formula tested against known answers and edge cases · last reviewed October 2026. How we calculate · Report an error

When to Use This Calculator

  • Check whether marketing spend tracks with leads or revenue.
  • Test whether price changes line up with sales volume.
  • Screen survey variables before deeper analysis.
  • Check statistics homework.

Frequently Asked Questions

What is a good correlation coefficient?

It depends on the field. In tightly controlled physical measurements, 0.9 may be expected; in marketing or social data, 0.5 can already be useful. Judge it alongside the number of data points and common sense.

What is the difference between r and r²?

r shows strength and direction (−1 to +1). r² (0 to 1) shows the share of variation explained by a straight-line fit and has no sign.

Why does the calculator show "Undefined"?

If every value in one list is the same, that variable never varies, so a correlation cannot be calculated.

How many data points do I need?

There is no fixed minimum, but results from fewer than about 10 pairs should be treated as rough. More data gives a more reliable r.

Do you store the values I enter?

No. All calculations happen in your browser. Your data never leaves your device.

Related Guides

Related Calculators