Code tool

Correlation Calculator

Calculate Pearson’s r and r² for paired numeric data, with a scatter plot and sample statistics.

In-browser processingNo account requiredPrivacy details ↗

Use commas, spaces or new lines. Mark missing values explicitly as NA, null or ?. Lists must have equal length.

Correlation does not imply causation. Pearson r measures linear association; outliers can affect it.

A QUICK WALKTHROUGH

How to use this tool

  1. Enter X and Y lists of equal length, separated by commas, spaces or new lines.
  2. Choose whether to reject missing values or omit their entire pair.
  3. Calculate and review the plot, statistics and paired data.

Pearson’s linear correlation

r = Σ((x−x̄)(y−ȳ)) / √(Σ(x−x̄)² Σ(y−ȳ)²). Sample covariance and standard deviations use n−1.

Input and missing values

At least two complete pairs are required. Use NA, null or ? for missing values; no values are inferred from blank separators. Both lists must have equal length before any pairs are omitted. Maximum 10,000 positions per list; finite decimal or scientific numbers with absolute value ≤ 1e12. Constant columns are rejected.

GOOD TO KNOW

Common questions

Does correlation imply causation?

No. Pearson’s r describes a linear association, not causation. Outliers can change it substantially; a value near zero does not rule out a nonlinear relationship.

Are my values uploaded?

No. This calculation and its scatter plot run in your browser.