Non-Linear Curve Fitter
Paste your raw X/Y coordinates to instantly perform least-squares regression modeling. Extract optimal coefficients and R² values securely in your browser.
100% client-side
1. Input Data
2. Regression Model
How this model is fitted and scored
Awaiting data...
How to fit a curve to your data
Paste columns of numbers, choose a model, and read off the fitted equation, R² and RMSE, all computed locally in your browser.
Paste Data
Enter your data columns separated by spaces, tabs or commas | one point per line. Or click Load example data.
Map Columns
Tell the tool which columns represent your X (independent) and Y (dependent) variables.
Choose a model
Pick linear, polynomial, exponential, power or logarithmic from the dropdown, based on the shape you expect.
Check the fit
Click Compute Fit. Read R² and RMSE, watch for the overfitting warning, then use Copy Eq to grab the equation.
How the fitting works
Least-squares regression
Linear and polynomial models are fitted by ordinary least squares. R² (coefficient of determination) reports the fraction of variance explained; RMSE is the typical residual size in the units of Y. Both are computed on your original data.
Linearised non-linear models
Exponential, power and logarithmic fits are obtained by transforming the data (fitting a straight line in log-space). This is fast and standard, but it minimises error on the transformed data, so parameters can differ from a true non-linear least-squares fit when values span several orders of magnitude.
The math behind the fit
Fits are computed by least-squares regression and assessed with R² and RMSE, all in your browser.
Parameters are chosen by ordinary least squares, minimising the residual sum of squares:
Goodness of fit is reported with the coefficient of determination and the root-mean-square error:
where are the observed values, the fitted values, the mean of y, and n the number of points. and RMSE are computed on the original data.
Model forms available:
- Linear
- Polynomial (degree = 2 or 3)
- Exponential → fitted as
- Power → fitted as
- Logarithmic
The exponential, power and logarithmic models are fitted by linearisation (least squares on the transformed variables), which minimises error in log-space rather than in the original space.
References & documentation
- Draper, N. R., & Smith, H. (1998). Applied Regression Analysis (3rd ed.). Wiley.
- Heckert, N. A., Filliben, J. J., Croarkin, C., et al. (2002). NIST/SEMATECH e-Handbook of Statistical Methods, Ch. 4 “Process Modeling”. itl.nist.gov/div898/handbook.
- Wikipedia: Least squares · Coefficient of determination.
- Regression library: regression.js (Tom Alexander).
Frequently asked questions
Is my data sent to a server?
Why does my exponential fit look slightly off?
What do R² and RMSE mean?
Why did I get a warning about too few points?
Which model should I pick?
Runs entirely in your browser, no data leaves your device.