Linear Regression & Correlation Calculator

Fit a best-fit line and find the correlation coefficient for paired data.

How to use the Linear Regression & Correlation Calculator

  1. Enter or choose the x values.
  2. Enter or choose the y values.
  3. Results update instantly as you type — press Calculate any time to refresh.

Formula

b = Σ(x − x̄)(y − ȳ) ÷ Σ(x − x̄)²; a = ȳ − b x̄.

About this calculator

Fit a least-squares straight line to paired data and measure how strongly the variables are related with the correlation coefficient r and R².

Frequently asked questions

What does R² mean?

The share of variation in y explained by the line, from 0 to 1.