📘 How to use this — copy and paste CSV, TSV, or spreadsheet data

What this site does. You bring a table of numbers, it gives you numbers back. This page fits a straight line or a polynomial to each column by least squares - the coefficients that make the vertical misses smallest - and gives you the equation, R², RMSE and the residuals. It runs entirely in your browser — nothing is uploaded, nothing is stored. If you want the reasoning rather than the answer, the curve fitting article explains every model on a worked example.

A high R² does not make a model right: look at the residual chart. A pattern in it - a U, a trend - means the wrong model. Exponential, power, logistic and Gaussian models are on the advanced calculator.

  1. Paste your data into the Input grid — straight from a spreadsheet, or as CSV/TSV text — or import a CSV/TSV file. Column x, then up to three y columns. Up to 5,000 rows.
  2. A row with no number in x is skipped; a blank y cell is skipped for that column only. Each column is fitted on its own, and needs at least as many points - at different x - as the model has coefficients.
  3. Pick a method.
    • linear: a straight line, y = a + b·x.
    • polynomial: a line plus powers of x, y = c0 + c1·x + … + cn·xⁿ. The order n sets how many bends the curve may have.
  4. Set the order (polynomial only): 1 to 10. Order 1 is the straight line. Use the lowest order that leaves no pattern in the residuals; an order of one less than the number of points passes through every point, which is interpolation, not a fit.
  5. Real time range — try orders live on the order box.
    • ▲▼ buttons or the mouse wheel over the box: the order moves and the fit is recomputed at once - no need to press fit.
    • Limits: order 1 to 10; a typed value outside is set to the nearest limit.
    • Typing or the arrow keys change the box only; press fit to recompute.
  6. Press fit. The status line gives R² for each column. The upper chart shows your data as dots and each fitted curve as a line in the same color; the lower chart shows the residuals - each point's vertical miss.
  7. Read the result. Under the charts, pick a column: R², adjusted R², RMSE and points on the first line, the equation, ready to retype, on the second. See more - hover or click - shows a line cut short and any note. The Output grid lists x, then for each column the fitted y and the residual. Export saves it as a CSV/TSV file.

Input

Output

Fit

Residuals