How to Fit a Curve to Lab Data: Nonlinear Regression Made Simple
Fit Michaelis–Menten, exponential, Hill, logistic and other models to XY data, read parameter errors and residuals, and export a publication-ready graph.

Fitting a curve to data turns a cloud of points into numbers you can report: a rate constant, a half-life, a maximum velocity. Straight lines are easy in any spreadsheet, but nonlinear models need iterative fitting, and spreadsheets give little help with parameter uncertainty. The free Scientific Graph and Curve Fitting Studio does proper nonlinear regression in your browser and draws a clean graph for your report. This guide explains how to use it well.
Step 1: organise your data
Put x in the first column and y in the second. If you measured replicates, use the mean as y and put the standard deviation in a third column; it becomes error bars and can be used for weighting. A header row is optional. Paste straight from a spreadsheet.
Step 2: choose a model that makes sense
Pick a model from the science, not just the best-looking curve. Enzyme rates against substrate concentration follow Michaelis–Menten, or the Hill equation if binding is cooperative. Radioactive decay and drug elimination are exponential. Signal that falls to a non-zero background suits exponential decay to a plateau. Spectral peaks are often Gaussian. Dose-response data suits the four-parameter logistic. Calibration curves are often linear or quadratic.
Step 3: decide on weighting
Ordinary least squares assumes every point has the same uncertainty. If your error bars differ greatly, weight by 1/SD² so precise points count more. If the error grows with the size of the value, relative weighting by 1/Y² is appropriate.
Step 4: read the results
Each parameter is shown with its standard error and a 95 percent confidence interval. A narrow interval means the data pins the value down; a very wide one means the data cannot distinguish it, often because the range of x is too narrow. R² describes how much variation the curve explains, but for nonlinear models it is less useful than looking at the residuals.
Practical example
The sample data is an enzyme assay with substrate from 0.5 to 32 mM. Fitting Michaelis–Menten gives Vmax = 10.32 with a standard error of 0.119 and Km = 1.049 mM with a standard error of 0.054, with R² = 0.99650 and 5 degrees of freedom. Switching to the Hill model gives a lower AIC, −36.55 against −23.47, and a Hill coefficient of about 1.15, suggesting the extra parameter is supported by these data.
Step 5: check the residuals
Switch the view to residuals. If the points scatter randomly above and below zero, the model is adequate. A systematic curve, for example all positive at the ends and negative in the middle, means the model has the wrong shape and you should try another.
Step 6: compare models with AIC
The Akaike information criterion balances fit against the number of parameters. A difference of more than about two in favour of one model is meaningful. Do not add parameters just because R² rises slightly.
Step 7: export the graph
Set axis labels with units and a title if needed, and use a log x axis when values span several orders of magnitude. Download SVG for a journal, a high-resolution PNG for slides, and CSV files of parameters and fitted values for your appendix.
Good practice for lab reports
State the model equation, the fitting method and weighting, report each parameter with its uncertainty and the number of points, and show the residual plot if you discuss fit quality. Keep the raw data in your appendix so others can repeat the fit.
Privacy
The fit runs in your browser and your data is not uploaded.
Summary
Choose a model from the science, weight sensibly, check residuals and compare with AIC. The curve fitting studio gives you parameters with uncertainty and a graph ready to publish.


