MaximCalculator Free, fun & accurate calculators
📈 Platinum math layout
🌙Dark Mode

Correlation Coefficient Calculator (Pearson’s r)

Paste two lists of numbers (X and Y) and get the Pearson correlation coefficient instantly: the value of r, the (variance explained), plus an easy interpretation you can screenshot, copy, or share. This calculator runs fully in your browser — no signup, no tracking, 100% free.

Instant r + r²
🧠Strength + direction explained
🧾Copy-ready results for reports
📱Made for screenshots & sharing

Enter your paired data

Paste the X values and Y values as two equal-length lists. You can separate numbers with commas, spaces, or new lines. Example: 1, 2, 3 or one number per line.

📌
Tip: You can paste from Excel/Google Sheets. If you copy a column, it usually comes in as one number per line — perfect.
🎯
Rule: X and Y must have the same number of points because correlation is computed on pairs like (x₁, y₁), (x₂, y₂), … .
🔢
🗣️
Your correlation result will appear here
Paste X and Y values and tap “Calculate Correlation” to compute Pearson’s r.
Correlation measures how strongly two variables move together (linearly), from -1 to +1.
Scale: -1 = perfect negative · 0 = no linear relationship · +1 = perfect positive.
-10+1

Correlation does not prove causation. A high correlation can happen due to coincidence, a hidden third factor, seasonality, or shared trends. Always pair correlation with domain knowledge.

📚 Formula + meaning

Correlation coefficient (Pearson’s r): the full breakdown

The correlation coefficient is one of the fastest ways to summarize the relationship between two numeric variables. You’ll see it in statistics classes, business analytics dashboards, psychology papers, A/B test explorations, and data-science notebooks. The most common version is Pearson’s correlation, usually written as r. Pearson’s r is designed specifically for linear relationships — patterns that look roughly like a straight line when you plot the points.

The value of r always falls between -1 and +1: +1 means a perfect positive linear relationship (every point lies exactly on an upward line), -1 means a perfect negative linear relationship (every point lies exactly on a downward line), and 0 means no linear relationship (knowing X doesn’t help you linearly predict Y). Most real-world data lives somewhere in between.

Pearson correlation formula

For paired data points (x₁, y₁), (x₂, y₂), … , (xₙ, yₙ), Pearson’s r is:

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

Don’t let the symbols scare you — the idea is simple: we center each list by subtracting its mean (x̄ is the average of X values, ȳ is the average of Y values), multiply the centered values together, and then normalize by the “spread” (standard deviations) so the final answer is always between -1 and +1.

What the numerator is doing

The top part, Σ[(xᵢ − x̄)(yᵢ − ȳ)], is a form of covariance. If X is above its average at the same time Y is above its average, the product is positive. If X is above its average while Y is below its average, the product is negative. Summing those products across all pairs tells you whether the two variables tend to move together or opposite.

What the denominator is doing

The denominator, √(Σ(xᵢ − x̄)² · Σ(yᵢ − ȳ)²), rescales the covariance so it is comparable across different units. Without this rescaling, “taller numbers” would produce larger covariances even if the pattern is the same. With the rescaling, correlation becomes unitless and bounded.

How to interpret r (practical ranges)
  • r ≈ 0.00: no linear relationship (could still be nonlinear).
  • |r| ≈ 0.10–0.29: weak linear relationship.
  • |r| ≈ 0.30–0.49: moderate linear relationship.
  • |r| ≈ 0.50–0.69: strong linear relationship.
  • |r| ≥ 0.70: very strong linear relationship (often impressive in messy real data).

These ranges are common rules of thumb — but what counts as “strong” depends on your context. In physics, r = 0.95 might be expected; in social science, r = 0.30 can be meaningful.

What is r²?

The calculator also shows , the coefficient of determination. When you’re thinking about a simple linear model, r² can be read as “the fraction of variance in Y explained by X” (or vice versa, in a symmetric sense). Example: if r = 0.80, then r² = 0.64, which suggests roughly 64% of the variability is aligned with a linear relationship. Be careful: r² doesn’t automatically mean causation — it’s still describing association.

🧪 Examples + walkthrough

Worked examples (with intuition)

Let’s make this concrete. In each example, you provide paired observations — meaning each X value belongs to the same “row” as its Y value. Think “study hours” and “test score” for each student, or “ad spend” and “sales” for each week.

Example 1: perfect positive relationship

Suppose X = 1, 2, 3, 4 and Y = 2, 4, 6, 8. Every time X increases by 1, Y increases by 2. The points lie exactly on a straight line, so r = +1. Your result will read “perfect positive correlation.”

Example 2: strong negative relationship

Imagine X = 10, 20, 30, 40 and Y = 90, 70, 50, 30. As X increases, Y drops in a consistent linear way. You’ll get a value close to -1 (often exactly -1 if it’s perfectly linear). This is a classic “trade-off” pattern.

Example 3: moderate noisy positive relationship

Real data is messy. Say X is daily temperature and Y is ice cream sales: when it’s warmer, sales tend to rise, but weekends and holidays also matter. You might see r around 0.40–0.70 depending on noise. Here, the story is: “positive relationship, but not perfectly predictable.”

Example 4: nonlinear relationship (r can be misleading)

Consider X = -2, -1, 0, 1, 2 and Y = 4, 1, 0, 1, 4 (a U-shape). There is a strong relationship — but it’s curved. Pearson’s r could be near 0 because the positive and negative parts cancel out in a linear measure. That’s why plotting data is so valuable: correlation is a summary, not a picture.

How this calculator computes r (step-by-step)
  1. Parse your lists: we split by commas/spaces/new lines and keep valid numbers.
  2. Pair the data: index 1 in X matches index 1 in Y, etc.
  3. Compute means: x̄ and ȳ.
  4. Compute centered sums: Σ(xᵢ − x̄)(yᵢ − ȳ), Σ(xᵢ − x̄)², Σ(yᵢ − ȳ)².
  5. Normalize: divide numerator by √(sumX² · sumY²).
  6. Interpret: direction (+/–) and strength based on |r|.

Under the hood, this is the same math you’d get from a stats package, spreadsheet function, or a Python/R library — just packaged into a fast page you can use anywhere.

🧠 How to use it

Best practices (so your correlation means something)

A correlation coefficient is powerful because it compresses a relationship into one number — but the shortcut comes with responsibility. Here are practical tips to make sure you’re using r in a way that holds up in real decision-making today, research, or business reporting.

1) Always think in pairs

Correlation needs paired observations. If you have weekly ad spend and weekly sales, great. If your lists were recorded at different times or don’t line up, correlation can create a fake story. Make sure each xᵢ and yᵢ represent the same unit (the same person, the same day, the same experiment run).

2) Watch out for trends and seasonality

Two things can correlate simply because both trend upward over time. Example: “coffee sales” and “internet usage” might correlate strongly year to year, but that doesn’t mean coffee causes Wi‑Fi. If time is driving both, you might need to de-trend or analyze changes rather than raw levels.

3) Inspect outliers

One extreme point can dramatically increase or decrease r. If one data point is a typo, a rare event, or a measurement error, correlation can mislead you. Try computing r with and without suspicious points and document what you do.

4) Correlation is not causation (but it can be a clue)

Correlation can suggest hypotheses: “These two variables move together — why?” But it does not prove cause. A third factor (confounder) can drive both. The classic example is “ice cream sales” and “drownings” — both rise in summer. Correlation is a starting point; experiments or stronger designs establish causation.

5) Use r² carefully

People love r² because it sounds like “percent explained.” That intuition is useful for linear models, but it can be abused. A high r² doesn’t mean your model is correct, and a low r² doesn’t mean a variable is useless. In some noisy domains (human behavior, markets), small r² values can still be valuable signals.

Quick copy template for reports

If you want a clean sentence for a report, use this structure: “Pearson’s correlation between X and Y was r = [value], indicating a [weak/moderate/strong] [positive/negative] linear relationship.” The “Academic” interpretation style in this tool follows that format automatically.

❓ FAQ

Frequently Asked Questions

  • What’s the difference between correlation and covariance?

    Covariance measures whether two variables move together, but its scale depends on the units. Correlation is covariance normalized by the variables’ spreads, making it unitless and bounded between -1 and +1.

  • Why does my correlation say “undefined”?

    Pearson’s r is undefined if one list has zero variance (all X values are identical or all Y values are identical). The denominator becomes zero because there’s no spread to normalize by.

  • Can I use this for ranked or categorical data?

    Pearson’s r is for numeric data with a linear relationship. For ranked data, many people prefer Spearman’s rho. For categorical variables, correlation usually isn’t the right tool.

  • How many data points do I need?

    You can compute r with as few as two pairs, but it won’t be stable. More points generally mean a more reliable estimate. In real analysis, people often look at confidence intervals and significance tests too.

  • Does a high correlation mean one variable causes the other?

    No. Correlation describes association, not causation. Causation requires stronger evidence (experiments, quasi-experiments, or careful causal inference).

  • Why can r be near 0 even when the relationship is strong?

    Because Pearson’s r measures linear relationships. A U-shape, exponential curve, or other nonlinear pattern can be strong but not linear, making r small.

  • Is my data private?

    Yes. This page calculates correlation in your browser. Nothing is uploaded. If you click “Save Result,” it stores only the result summary locally on your device.

MaximCalculator provides simple, user-friendly tools. Always double-check important calculations and use domain knowledge when interpreting statistics.