IC50 from a dose-response assay

Statistics
Curve Fitting
Scientific Computing
Fit a four-parameter logistic curve to a concentration-indexed replicate series, normalize with plate controls, and report the IC50 with its confidence interval, Hill slope, and validation against published datasets.

Overview

In pharmacological and biochemical assays, the dose-response relationship measures how an inhibitor or agonist compound affects biological activity across a dilution series. This template fits a four-parameter logistic (4PL) non-linear curve to concentration-indexed replicate readings, normalizes raw instrument signals using high and low plate controls, and reports key potency and efficacy metrics: the half-maximal inhibitory concentration (IC50 or EC50) with its asymmetric confidence interval, the Hill slope (steepness of the response transition), and the top and bottom plateaus.

The workbook comes pre-populated with a 3-fold dilution series (11 concentrations in triplicate) and dedicates separate sheets to raw replicate inputs, plate control wells, assay defaults, per-point diagnostics, validation against published reference datasets, and an adaptation guide.

Before you start

Requirements. Excel with Python for Excel enabled. The template operates strictly on data entered in this workbook and connects to no external networks or databases.

Key assay concepts. - Vehicle controls: Wells containing assay buffer/solvent and target/cells without active compound, representing the uninhibited condition (0% inhibition / 100% signal). - Background controls: Wells containing blank matrix or saturating inhibitor, representing maximal inhibition (100% inhibition / 0% signal). - % Inhibition: The default normalized response for an inhibition assay, computed as 100 × (mean Vehicle - Y) / (mean Vehicle - mean Background). As inhibitor dose increases, % inhibition rises from 0% toward 100%. - IC50: The compound concentration producing a response halfway between the bottom and top plateaus. - Hill slope: The cooperativity parameter governing the transition steepness around the IC50. A standard slope is near 1.0; slopes deviating substantially from 1.0 flag potential multi-site binding, aggregation, or assay artifacts.

Workbook tour

Sheet and range Description Role
Results (A4:E10, A13:B15, A18:B29, G4:H11, A31) Primary dashboard reporting fitted parameters, Wald confidence intervals at the selected confidence level, acceptance checks, fit statistics, interactive effect queries, and a native Excel scatter chart. Output & query
Plate Data (A4:G28) Tidy concentration-indexed replicate table accepting up to 24 concentrations with 4 replicate columns, an Exclude column, and annotations. Editable input
Controls (A4:C14) High and low control wells: Vehicle (0% inhibition / 100% signal) and Background (100% inhibition / 0% signal). Editable input
Defaults (A4:E17) Fit settings including Direction, concentration unit, zero-dose handling, normalization toggle, parameter constraints, replicate pooling, weighting, and confidence level. Editable input
Points (A5:K100) Per-well normalized responses (% inhibition and % of vehicle), model predictions, residuals, outlier flags, and fitting status. Diagnostic output
Curve (A4:D54) High-resolution 50-point fitted curve and confidence envelope coordinates feeding the native scatter chart on Results. Chart helper
Validation (A5:E28 check inputs, G5:M29 check results, A31:E140) 23 reference validation checks comparing live engine refits against published benchmarks (drc ryegrass, drc S.alba, NIST StRD Rat42). Verification
Modification Guide (A4:B14) Field guide explaining parameter constraints, adding replicate rows, weighting options, and model adaptation rules. Documentation

Using the template

1. Paste your plate data

  1. Open the Plate Data sheet.
  2. Enter your dilution series concentrations in column A, from zero or lowest dose up to the highest dose.
  3. Paste replicate instrument signals into columns B through E (Rep 1 to Rep 4). Unused replicate cells may be left empty.
  4. If an individual well suffered a pipetting error or outlier reading, enter its replicate number (e.g. 2) in column F (Exclude) to exclude that single well while retaining the remaining replicates. Enter x to exclude the entire concentration row.

2. Enter plate controls

  1. Switch to the Controls sheet.
  2. Enter the raw readings from vehicle/no-inhibitor control wells in column B (Vehicle).
  3. Enter the raw readings from saturating inhibitor or blank control wells in column C (Background).

3. Review Defaults

  1. Switch to the Defaults sheet to customize fit assumptions:
    • Direction: Choose Inhibition (default; reports % inhibition) or Stimulation (reports % of vehicle).
    • Concentration unit: Select M, µM, nM, or pM.
    • Top / Bottom / Hill slope: Leave as Free or enter a fixed numerical constraint (e.g., fix Bottom at 0 or Hill slope at 1.0).
    • Confidence level: Choose 90, 95, or 99%.

4. Review Results and Chart

  1. Return to the Results sheet.
  2. Inspect the fitted parameter table (A4:E10) for the IC50 estimate and its asymmetric confidence bounds.
  3. Confirm that the Acceptance checks and Fit statistics report Pass and None for fit-quality flags.
  4. View the native scatter chart (A31) displaying individual well observations alongside the solid fitted regression line and dashed confidence envelope.

Inputs and settings

Plate Data

  • Concentration (A5:A28): Numerical compound concentration in the unit configured on Defaults.
  • Rep 1 - Rep 4 (B5:E28): Raw instrument responses (luminescence, fluorescence, absorbance, or counts).
  • Exclude (F5:F28): Accepts 1, 2, 3, 4, or x via dropdown validation.
  • Note (G5:G28): Free-text operator notes.

Controls

  • Vehicle (B5:B14): Raw signals from wells without compound.
  • Background (C5:C14): Raw signals from blank or maximal inhibition wells.

Defaults Table

  • Model: 4PL variable slope (standard non-linear logistic curve).
  • Direction: Inhibition (reports IC50 and % inhibition) vs. Stimulation (reports EC50 and % of vehicle).
  • Concentration unit: Label unit (nM, µM, M, pM).
  • Zero-concentration wells: Top plateau (fitted through concentration form) vs. Exclude.
  • Normalize to controls: On (normalizes raw readings against control means) vs. Off (fits raw signal).
  • Top / Bottom / Hill slope: Free for unconstrained estimation, or a specific numerical value.
  • Replicates: Each replicate (commonly used in tools such as GraphPad Prism; fits every well individually) vs. Means (averages replicates per concentration prior to fitting).
  • Weighting: None (unweighted ordinary least squares) vs. 1/Y^2 (weights low responses proportionally).
  • Confidence level: Wald confidence level (90, 95, or 99%).

How results are calculated

  1. Control Means: Computes the arithmetic mean of valid entries in the Vehicle and Background columns.
  2. Per-Well Normalization: \[\text{\% Inhibition} = 100 \times \frac{\bar{Y}_{\text{vehicle}} - Y}{\bar{Y}_{\text{vehicle}} - \bar{Y}_{\text{background}}}\] \[\text{\% of Vehicle} = 100 \times \frac{Y - \bar{Y}_{\text{background}}}{\bar{Y}_{\text{vehicle}} - \bar{Y}_{\text{background}}}\]
  3. Log-Logistic Model: Concentrations are transformed to \(\log_{10}\) space. The 4PL equation is: \[Y = \text{Bottom} + \frac{\text{Top} - \text{Bottom}}{1 + 10^{(\log_{10}\text{IC50} - \log_{10}X) \times \text{Hill}}}\]
  4. Parameter Estimation: Unconstrained parameters are estimated via multi-start Levenberg-Marquardt non-linear least squares followed by Gauss-Newton covariance refinement.
  5. Confidence Limits: Standard errors are derived from the analytic Jacobian covariance. Confidence limits for the IC50 are computed on \(\log_{10}\text{IC50}\) using Student’s \(t\)-distribution and back-transformed (\(10^{\log_{10}\text{IC50} \pm t \cdot \text{SE}}\)), yielding asymmetric bounds on the linear scale.
  6. Effect Queries: The interactive function =BF.FUNCTION("ic_at", G6) computes the concentration achieving any arbitrary target response percent \(F \in (1, 99)\): \[\log_{10}(\text{EC}_F) = \log_{10}\text{IC50} + \frac{1}{|\text{Hill}|} \log_{10}\left(\frac{F}{100 - F}\right)\]

Reading the results

  • IC50 (or EC50): The compound concentration yielding 50% response between plateaus.
  • Low / High CI: The Wald confidence interval at the selected confidence level. If the curve lacks complete plateau definition, the interval widens.
  • Hill slope: Values near 1.0 indicate standard non-cooperative binding. Values below 0.3 or above 5.0 trigger a check slope fit-quality flag.
  • Bottom / Top: Estimated lower and upper asymptotes. In normalized % inhibition, Bottom approaches ~0% and Top approaches ~100%.
  • Span: The total dynamic range (\(\text{Top} - \text{Bottom}\)) with its standard error.
  • Goodness-of-Fit:
    • \(R^2\): Coefficient of determination.
    • \(s_{y.x}\): Residual standard deviation in response units.
    • Degrees of freedom (\(df\)): \(n_{\text{points}} - n_{\text{free parameters}}\).
  • Fit-Quality Flags:
    • extrapolated: Estimated IC50 lies outside the tested concentration range.
    • check slope: Hill slope steepness is outside heuristic thresholds (\(\lvert H \rvert < 0.3\) or \(\lvert H \rvert > 5.0\)).
    • plateau not defined: Fewer than 2 distinct concentrations bracket either side of the IC50.

Saving, sharing and App mode

  • App Mode: When opened in App Mode or viewed by collaborators without Python editing permissions, all calculations recalculate automatically in Excel Online and the native Excel chart updates automatically.
  • Sharing: You can save and email the .xlsx workbook. Recipients with Python for Excel will see full live reactive updates upon changing any cell on Plate Data, Controls, or Defaults.

Errors, empty states and limits

  • Minimum Concentrations: The fit requires at least 5 distinct compound concentrations. Entering fewer than 5 produces a clear error notification.
  • Minimum Wells: At least 5 usable data points are required to determine the 4 parameters.
  • Missing Controls: If Normalize to controls is set to On but vehicle or background wells are missing or equal, a diagnostic message advises completing the Controls sheet.
  • Plate Data Capacity: Up to 24 concentrations × 4 replicates = 96 data rows per workbook.

Customizing as an author

The top of notebook.py contains an explicitly delimited rules section:

# --- Edit these rules ---
RESIDUAL_FLAG_SD = 3.0  # flag a well when |residual| is above this many Sy.x
HILL_SLOPE_LIMITS = (0.3, 5.0)  # a |Hill slope| outside these limits gives "check slope"
MIN_CONCENTRATIONS = 5  # fewer usable concentrations than this: no fit
MIN_PLATEAU_CONCENTRATIONS = 2  # fewer concentrations on either side of the IC50 gives "plateau not defined"
MIN_R_SQUARED = 0.90
MAX_RESIDUAL_SD = 10.0  # residual SD threshold; rescale to your own signal's units
# --- End of rules ---

Template authors can adjust outlier residual multipliers (RESIDUAL_FLAG_SD), slope bounds (HILL_SLOPE_LIMITS), minimum \(R^2\) (MIN_R_SQUARED), or residual standard deviation thresholds (MAX_RESIDUAL_SD) to align with laboratory-specific SOPs. Note that MAX_RESIDUAL_SD is expressed in the units of the response signal (e.g. raw fluorescence counts vs. normalized % inhibition), so authors must rescale it when adapting the template to other assay readouts.

Limitations and when to use this

Known limitations. 1. Well-position / plate-layout effects: Spatial artifacts (edge evaporation, thermal gradients across microplate rows/columns) are deliberately out of scope. Input data is organized as a tidy concentration-indexed series rather than a physical multi-well plate coordinate map. 2. Confidence interval formulation: Confidence intervals use the Wald-on-\(\log_{10}(\text{IC50})\) delta method with Student’s \(t\) back-transformation. While commonly used in tools such as GraphPad Prism, profile-likelihood intervals are not computed in this release. 3. Fit-quality heuristics: Flag thresholds (Hill slope bounds 0.3–5.0 and 2 bracketing concentrations) are heuristic field rules, not universal regulatory standards.

Free alternatives

Free alternatives: the ConductScience IC50 fitter and Labreador (both free, browser-based) fit the four-parameter dose-response curve. This workbook keeps the fit in Excel and adds 23 engine-refit validation checks and editable parameter fixes.

Developer reference

Notebook implementation

notebook.py is authored as a reactive Marimo application adhering to the Boardflare Python-for-Excel runtime: - # engine-models: four_pl: Synced from the shared curve-fitting engine core (templates/curve-fitting/engine/core.py and models/four_pl.py). - bf.inputs(...): Reads named cell ranges across Plate Data, Controls, Defaults, and Validation. - bf.publish(...): Publishes structured output DataFrames to anchored spill ranges (results, checks, statistics, curve, points, validation) and registers the custom spreadsheet function ic_at.

How the calculation/model works

  1. Replicate Flattening: When Defaults specifies Means, points are grouped by unique concentration and arithmetic means are passed to fit_model. When Each replicate is active, every well is treated as an independent observation.
  2. Weights: Weighting \(1/Y^2\) assigns per-point \(\sigma_i = \max(\lvert Y_i \rvert, 10^{-9} \cdot \max(\lvert Y \rvert))\).
  3. Analytic Jacobian: Gradient vectors are computed analytically for Bottom, Top, \(\log_{10}\text{IC50}\), and Hill slope, preventing finite-difference round-off flutter across operating platforms.

Validation / expected results

The Validation sheet incorporates 23 reference validation checks across three benchmarks refit dynamically on every calculation: 1. drc ryegrass: 24 observations of root length vs. ferulic acid (Inderjit et al., 2002), confirming Bottom (0.481), Top (7.793), IC50 (3.058), Hill slope (-2.982), and standard errors. 2. drc S.alba: 68 observations of Sinapis alba dry matter treated with Glyphosate and Bentazone (drc CRAN package), confirming independent multi-herbicide potency parameters. 3. NIST StRD Rat42: 9 observations from the NIST Standard Reference Database (Ratkowsky, 1983), verifying certified nonlinear parameters \(b_1, b_2, b_3\), residual sum of squares (8.0565), and residual standard deviation (1.1588).

All 23 validation checks must report PASS.

Changelog

2026-10-25

  • Hand-crafted rebuild replacing generic two-column layout with concentration-indexed replicate architecture (issue #236).
  • Added dedicated Controls sheet with high (vehicle) and low (background) normalization controls.
  • Made % inhibition the default view for inhibition assays, automatically switching to % stimulation (100 minus % inhibition) when the assay is a stimulation assay.
  • Integrated full Validation sheet with 23 reference validation checks (NIST StRD Rat42 certified values; drc ryegrass and drc S.alba literature datasets refit for comparison).
  • Added interactive =BF.FUNCTION("ic_at", ...) query for user-selected target effect levels.
  • Added native Excel scatter chart with fitted 4PL curve and confidence envelope.