How it works
Everything runs in this page: the data you paste is never uploaded. The fitting engine is written in Rust and compiled to WebAssembly.
The model
The four-parameter logistic, in the form used by GraphPad Prism, with x the dose:
Bottom and Top are the plateaus; the EC50 (or IC50, for a falling curve) is the dose giving a response halfway between them; the Hill slope sets how steep the curve is, positive for rising curves and negative for falling ones. A dose of zero is allowed and is drawn at the left of a broken axis. It is the same curve as the log-logistic LL.4 model of the R package drc [1].
The five-parameter model adds an asymmetry factor s, raising the denominator to the power s, for curves that bend more sharply at one end than the other [2]. The EC50 reported is still the true half-way dose, not the curve's inflection point.
Fitting
The parameters minimise the sum of squared differences between the data and the curve, found with the Levenberg–Marquardt method [3] from several starting slopes, keeping the best. Every replicate counts as its own point, as it should.
Uncertainty
Standard errors come from the curvature of the sum of squares at the best fit (the asymptotic covariance, σ²(JᵀJ)⁻¹), and 95% confidence intervals are ±t standard errors with the residual degrees of freedom. The EC50's interval is worked out on the log scale and then converted, so it is not symmetric about the EC50, which is the honest way round. The shaded bands show where the true curve lies with 95% confidence, from the same covariance. When several curves are fitted together, their scatter is pooled into one residual variance, as in drc; this is what makes the comparisons below possible.
Comparing curves
To ask whether, say, two compounds have the same EC50, the curves are fitted twice: once with separate EC50s, once with one EC50 shared between them. If sharing makes the fit much worse than chance would, measured by the extra-sum-of-squares F test, the EC50s differ. The same test answers whether the slopes differ, and whether one curve would do for all [4].
Checked against
The engine is tested against the drc package's published fits of the ryegrass and white mustard data, to six significant figures, and against the certified values of the US National Institute of Standards and Technology's reference problem Rat43 [5], a deliberately awkward sigmoid fit. Its t and F distributions agree with SciPy to nine digits.
Example data
Ryegrass: root length against ferulic acid concentration (Inderjit, Streibig and Olofsdotter, Physiologia Plantarum 114, 2002). Two herbicides: white mustard dry matter against bentazone and glyphosate (Christensen, Teicher and Streibig, Pest Management Science 59, 2003). Five curves: spinach photosynthesis against bentazon and diuron (Streibig, Pesticide Science 55, 1999). All as distributed with drc [1].
References
[1] C. Ritz, F. Baty, J. C. Streibig and D. Gerhard, Dose-response analysis using R, PLOS ONE 10, e0146021 (2015).
[2] P. G. Gottschalk and J. R. Dunn, The five-parameter logistic: a characterization and comparison with the four-parameter logistic, Analytical Biochemistry 343, 54–65 (2005).
[3] D. W. Marquardt, An algorithm for least-squares estimation of nonlinear parameters, J. SIAM 11, 431–441 (1963).
[4] H. Motulsky and A. Christopoulos, Fitting Models to Biological Data Using Linear and Nonlinear Regression, Oxford University Press (2004).
[5] NIST, Statistical Reference Datasets: nonlinear regression.