Code tool

Linear Regression Tool

Paste numeric x,y pairs to fit a straight line and inspect its residuals.

In-browser processingNo account requiredPrivacy details ↗

Enter one finite x,y pair per line, separated by a comma or whitespace. Use 2–10,000 rows.

Association is not causation. Results use floating-point arithmetic and may be rounded.

A QUICK WALKTHROUGH

How to use this tool

  1. Enter 2–10,000 finite x,y pairs, one per line.
  2. Calculate the least-squares line.
  3. Review slope, intercept, R², residual range, and RMSE.

Numerical scope

Requires at least two distinct x values and finite numbers. Results use JavaScript floating-point arithmetic and are formatted for display, so small rounding differences are possible.

Association is not causation

A fitted line and R² describe the supplied data; they do not prove that x causes y or account for confounding factors.

GOOD TO KNOW

Common questions

Does it prove causation?

No. Regression measures an association in the supplied pairs.

Are residuals included?

Yes. The output includes residual range and root mean square error.