Skip to content
Sumly

Correlation & Linear Regression Calculator

Calculate Pearson correlation r, R², and linear regression slope (y = mx + b).

Paired data series (X and Y)
Comma or space separated
Equal number of values as X
Pearson correlation
Correlation Coefficient (r)

+0.999

Strong Positive Correlation
Variance Explained (R²)99.8%
Paired Pointsn = 8
Linear Fit Equation:y = 1.83x + 6.13

How the Correlation and Linear Regression calculation works

Calculates sample means, variances, and covariance across paired numerical arrays.

Derives Pearson's correlation coefficient r and coefficient of determination R².

Solves ordinary least squares slope m and intercept b for linear prediction.

Worked example

Input paired ad spend and revenue points to quantify how strongly marketing investment drives return.

The tool above opens with these numbers. Change them to run your own scenario, or press Reset to come back to this example.

Frequently asked questions

Calculate the required survey or experiment sample size for statistical significance.

From 12,500 to 18,400 is +47.2% — with the reverse check done for you.

Mean, median, mode and range from any list of numbers.

Spread that means something — sample or population, with context.

Remove duplicate lines and clean up lists, emails, and CSV rows in seconds.

JSON, CSV, TSV and NDJSON — paste any, convert to any.

  • correlation
  • regression
  • statistics
  • pearson
  • data
  • analytics