A 4PL curve fitter for ELISA, checked against SciPy

Every ELISA ends the same way: a column of concentrations, a block of ODs, and the question of how to turn them into numbers you trust. The four-parameter logistic (4PL) fit is the standard answer, but the software for it is often locked to a plate reader, licensed per seat, or buried in a spreadsheet nobody wants to touch.

So we built our own, put it on our website, and opened it up to everyone. It has quietly become the busiest page on our site, so this month we gave it a thorough check-up.

Open the 4PL Curve Fitting Tool →

How to use it

1. Paste your data. Column 1 is concentration, the following columns are replicate ODs, one row per standard. Tabs, commas or spaces all work, and decimal commas are recognised.

2. Check the parsed data. The tool shows what it read, lists any rows it skipped and why, and gives row means and %CV.

The tool after pasting eight standards in triplicate, showing the parsed table with row means, SD and %CV

Figure 1. Pasted data and the parsed-data check (simulated sandwich ELISA).

3. Fit. Choose no weighting, 1/Y or 1/Y², and get the four parameters with their standard errors, plus a standards table showing each standard’s back-calculated concentration and % recovery.

Fitted four-parameter curve on a log concentration axis, with the replicates and mean ± SD at each standard

Figure 2. The fitted curve on a log X axis, with replicates and error bars switched on.

Fit results: the four parameters with standard errors, RMSE, R², and a table of eight standards each with back-calculated concentration and percent recovery between 92% and 109%

Figure 3. Parameters with standard errors, and the standards table: every standard is read back through the curve and checked against its nominal value.

4. Calculate your samples. The batch calculator converts OD to concentration (or back) and flags results outside the standards’ range or too close to a plateau to read reliably.

Batch calculator: three OD values converted to concentrations, two of them flagged as outside the range of the standards and one as near a plateau

Figure 4. A reading above the highest standard is flagged “Outside range” and, being close to the top plateau, “Near plateau, unreliable”.

5. Take the report. Download an Excel report or have it emailed to you.

First sheet of the downloaded Excel report, listing the fitted parameters, their standard errors, weighting, convergence and standards within limits

Figure 5. The first sheet of the Excel report. The second sheet lists the standards with % recovery.

Try it with our sample data. These two datasets are simulated: they were generated from a 4PL curve with added noise, not measured on a real assay. Each has eight standards in triplicate and three unknown samples, as a CSV and as plain text you can paste straight in. Paste the standards into box 1, then paste the unknowns into the batch calculator (OD → concentration).

  • Sandwich ELISA (signal rises with concentration): standards CSV or text; unknowns CSV or text.
  • Competitive ELISA (signal falls with concentration): standards CSV or text; unknowns CSV or text.

In each set one unknown sits comfortably inside the curve, one is above the highest standard or close to a plateau, and one falls below the lowest standard, so you can see the flags.

How the fit works

What the curve is. An ELISA standard curve is S-shaped when signal is plotted against the logarithm of concentration. The four-parameter logistic (4PL) model describes that S with four numbers: the response at zero concentration (A), the response at infinitely high concentration (D), the concentration at the middle of the S (the EC50 or IC50, C), and a slope factor (B). In a sandwich ELISA the signal rises with concentration, so A is below D; in a competitive ELISA it falls, so A is above D. The same fit handles both.

What you paste in. One row per standard: the concentration, then one or more replicate readings. The tool averages the replicates in each row and fits the curve to those averages. Decimal commas are converted (and you are told), every row that could not be used is listed with the reason, and %CV is “n/a” for single replicates.

How the curve is found. The tool searches for the four numbers that put the curve as close as possible to your averaged points. Closeness is the sum of squared vertical distances, and by default every point counts equally. You can instead choose 1/Y or 1/Y² weighting, which gives low-signal standards more influence and is worth trying when scatter grows with the signal. The search is Levenberg–Marquardt from several starting guesses, on data rescaled internally so units (pg/mL or copies/mL, OD or luminescence) do not matter. It then checks it reached a least-squares solution and tells you if not.

Bar chart of percent recovery for ten standards, unweighted versus 1/Y² weighting; the lowest standard recovers 78% unweighted and 99.5% weighted

Figure 6. Weighting matters when scatter grows with signal: on a simulated curve with 8% CV at every level, the lowest standard recovers 78% unweighted and 99.5% with 1/Y².

What you get back. The four values, each with a standard error; the RMSE using n − 4 degrees of freedom; and R², which we still show but no longer grade. R² says how close the curve passes to the points, not how accurately unknowns are read. Instead the tool reads each standard back through the curve and shows its % recovery, flagging any outside ±20% of nominal (±25% for the lowest and highest standard).

Warnings. The tool warns if the fit did not converge, the data are flat, there are fewer than five distinct concentrations, too few standards lie on the slope, or the standards are not monotonic. If the curve has not fully levelled off at one end (the end standard is still more than 20% of the span from its plateau), it adds a note rather than a warning: concentrations inside the range of the standards are unaffected.

Two warnings shown after fitting data with no dose-response: the responses are flat, and the standards are not monotonic

Figure 7. Paste in flat data and the tool says so, instead of drawing a confident-looking curve.

Reading concentrations from signal. For each reading the batch calculator either gives a concentration or says why it cannot. A reading at or beyond a plateau is reported in words, as at or beyond the response at zero or infinite concentration. Readings below the lowest or above the highest standard are marked “outside range”, and readings within a few residual standard deviations of a plateau are marked “near plateau, unreliable”. The Excel report carries the same flags.

How we checked it

We compared the fitting engine with SciPy’s curve_fit, a widely used independent implementation in Python, on simulated and constructed data. SciPy was started from many different guesses and its best fit was kept as the reference. We did not compare against R’s drc package or a commercial package, and we did not use real assay data in this comparison.

A fit counts as “same as SciPy” when all four parameters agree within 0.01%, or when the two fits have the same sum of squares and the parameters agree within 0.1% (SciPy’s own stopping tolerance).

Test set Fits Same as SciPy Better than SciPy Differs, tool warns Differs, no warning
18 constructed datasets × 3 weightings 54 54 0 0 0
400 random curves, no weighting 400 367 3 30 0
100 random curves, 1/Y² weighting 100 93 0 7 0
Total 554 514 3 37 0

The constructed datasets cover sandwich and competitive curves, steep and shallow slopes, a missing plateau, an outlier, flat data, a blank at zero, and signals from about 0.0001 to 200,000. “Better than SciPy” means the tool found a lower sum of squares than SciPy’s best. Of the 37 fits where the answers differed, 34 had fewer than two standards on the sloping part of the curve (so the data cannot pin down C and B), two were flat, and one had non-monotonic standards; the tool warned in every case. Nine of the 500 random fits were flagged as not converged.

Log-log scatter of concentrations back-calculated by this tool against SciPy, all points on the identity line

Figure 8. 765 back-calculated concentrations (standards and samples) from the 54 constructed fits that agreed with SciPy.

Concentrations read from the curve. Away from the plateaus, the largest difference from SciPy was 0.0004%. Readings flagged “near plateau”, where a tiny change in OD moves the concentration a lot, agreed within 0.22%.

Standard errors. On the 120 standard errors (A, D, C, B) from converged fits that had reached both plateaus, the largest difference from SciPy’s was 0.0002%.

Units. We refit the same data with concentration units spanning 1e-6 to 1e9 and signal scales from 0.001 to 100,000. Every combination (7 × 5) gave the same curve.

Before and after. On the same 400 random curves, the old engine disagreed with SciPy with no warning in 48 (12%). In 28 of those its fit was worse than SciPy’s; in the other 20 the fit was as good but C and B differed, because the data could not tell them apart. The new engine matches or beats SciPy on 370 of the 400 and warns on the other 30.

Stacked bars for 400 random curves: the old engine agreed with SciPy on 352 and differed without warning on 48; the new engine agreed on 370 and differed with a warning on 30

Figure 9. The same 400 random curves, fitted by the old and new engine and compared with SciPy.

This shows the arithmetic is sound on simulated data. It does not show that your assay is good: that is what the standards table and the warnings are for.

Your data stays with you

The fitting runs entirely in your browser, so your ODs and concentrations stay on your computer unless you choose to have the report emailed to you. Telling us which kit you ran is optional and helps us improve our kits and tools.

Need more than a fit?

Our ELISA Validation Suite uses the same fitting engine and adds per-calibrator pass/fail, accuracy and precision statistics and run-acceptance checks in line with FDA bioanalytical guidance. And if you don’t have a plate reader to hand, our phone plate reader turns a photo of a 96-well plate into OD values you can fit here.

Tell us what you’d like next

We built these tools because we use them every day. If something would make the fitter more useful in your lab, we’d love to hear from you.