API & MCP

Everything a person can do on Curve Fitter & Regression Calculator, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Curve Fitter & Regression Calculator

Paste x/y data (CSV, tabs or spaces) and fit a straight line, polynomial, exponential, power-law, logarithmic, multiple linear or your own nonlinear model, or interpolate with a natural cubic spline. You get the parameters with standard errors, t and p values and confidence intervals, R² and adjusted R², an ANOVA table, a residual plot and predictions with confidence intervals. Verified against the NIST StRD reference datasets; part of the Proofline math notebook.

Inputs of Curve Fitter & Regression Calculator
FieldTypeDefaultDescription
data (required)textarea—Data. One row per line, values separated by commas, tabs, semicolons or spaces; an optional header row names the columns. Use a decimal point (1.5).
modelselect (linear, polynomial, exponential, power, logarithmic, multiple, custom, spline, interpolation)"linear"Model
xColumntext—x column. Column number (1 = first) or header name; default the first column. Multiple regression: a comma-separated list (default: every column except y).
yColumntext—y column. Column number or header name; default the second column.
degreeinteger2Polynomial degree
interceptbooleantrueInclude an intercept (constant term). Straight line, polynomial and multiple regression. Without it the fit goes through the origin and R² is uncentred.
expressiontext—Custom model y =. Formula in x and your parameters. Use + − * / ^, implicit products (2x), sin, cos, tan, exp, ln (natural log), log (base 10), sqrt, abs, pi and e. Angles are in radians.
parameterstext—Parameters with start values. Custom model: every parameter with a start value. Start values near the solution help Levenberg–Marquardt.
evaluateAttext—Evaluate the fit at x =. Optional list of x values: predicted y with standard error and confidence interval (interpolated value for splines).
confidencenumber0.95Confidence level

Example request

Straight line with prediction

curl -X POST https://prooflinecurvefit.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"data":"x,y\n1,2.1\n2,3.9\n3,6.2\n4,7.8\n5,10.1","model":"linear","evaluateAt":"6"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "proofline-curve-fit": { "type": "http", "url": "https://prooflinecurvefit.usefulweb.site/mcp" }
  }
}