Skip to content

Loading index.

Enter to openEsc to close

Linear regression calculator

Fit a least-squares line to paired observations and inspect the plot and its data.

Browser compute / no account / no upload

Enter up to 250 pairs, one per line, separated by a comma or whitespace. Use consistent units within each column. You can paste the example CSV with its header.

Download the example dataset (CSV)

Method

  • The fit minimizes the sum of squared vertical differences between the observations and the fitted line. It needs at least two distinct x values.
  • For (1, 3), (2, 5), and (3, 7), each increase of one in x adds two to y. The fitted slope is 2 and the intercept is 1.
  • Use the fit to describe the given data. A line does not establish causation or tell you what happens beyond the observed range.

Reference: NIST/SEMATECH e-Handbook: Least Squares