Estimating DNA fragment size from an agarose gel
Within a useful separation range, migration distance is often approximately linear with the logarithm of linear DNA fragment size. A ladder run on the same gel provides the calibration points.
This calculator fits one least-squares line to log10(bp) versus distance. It reports R² and warns when the unknown is outside the measured ladder-distance range, where extrapolation is less reliable.
How to estimate a gel band size
- Measure one ladder lane: Measure band centers from the same origin in millimeters.
- Enter ladder pairs: Pair each manufacturer-specified ladder size with its measured distance.
- Enter the unknown distance: Measure the unknown band from the identical origin on the same gel.
- Assess the fit: Review R², inspect ladder-band identification, and avoid extrapolation when possible.
Formula and variables
The slope and intercept are estimated from the entered ladder standards by ordinary least squares.
log10(bp) = a(distance) + b; estimated bp = 10^[a(distance) + b]- bp — Fragment size
- Linear DNA length (base pairs)
- distance — Migration distance
- Distance measured from one common origin (mm)
- a — Slope
- Fitted change in log10 size per distance (per mm)
- b — Intercept
- Fitted log10 size at zero distance (dimensionless)
Unknown between ladder bands
Five standards from 10,000 to 500 bp are measured between 10 and 70 mm; the unknown is at 40 mm.
- Standards
- 10,000/10, 5,000/20, 3,000/30, 1,000/50, 500/70 bp/mm
- Unknown distance
- 40 mm
- Fit log10(bp) = a(distance) + b
- Evaluate the fitted line at 40 mm
- Convert back with 10^x
Result: The default data estimate a fragment of roughly 1,700 bp.
The unknown is interpolated within the measured distance range, but gel conditions and fit quality still govern reliability.
Understanding your results
Use R² with the calibration range
A high R² describes agreement with this straight-line model; it does not prove exact fragment identity.
- Interpolation between nearby ladder bands is preferable to extrapolation.
- Misidentified, overloaded, distorted, or poorly resolved ladder bands can bias the fit.
- A curved relation across a wide size range may require a restricted range or another calibration model.
Assumptions
- Standards and unknown are linear DNA run under the same gel and buffer conditions.
- Distances share one measurement origin and are expressed in millimeters.
- Log10 fragment size is approximately linear with distance over the fitted range.
Limitations
- Does not analyze an image, identify bands, or quantify measurement uncertainty.
- Not intended for proteins, RNA, pulsed-field gels, or differently conformed plasmid DNA.
- A single straight line may not describe the full ladder range.
- R² alone does not detect every calibration or measurement error.
Common mistakes
- Using catalog distances instead of measuring the ladder lane on the same gel.
- Measuring different bands from different origins.
- Using supercoiled or open-circular plasmid mobility as though it were linear DNA.
- Trusting an extrapolated estimate outside the ladder range.
Practical use cases
Restriction or PCR product screening
Estimate the size of a resolved linear DNA band relative to its same-gel ladder.
Teaching semi-log calibration
Connect electrophoretic migration measurements with logarithmic regression.
Frequently asked questions
Why use the logarithm of base-pair size?
Over a useful agarose-gel range, migration distance is commonly approximately linear with log fragment size rather than raw size.
What R² is good enough?
There is no universal cutoff. Inspect band identity, residual pattern, measurement quality, and whether the unknown is bracketed; the page flags R² below 0.95 only as a review prompt.
Can I use standards from another gel?
No. Voltage, agarose concentration, buffer, DNA conformation, stain, and run conditions affect migration, so measure a ladder run with the unknown.
Sources and review
- Agarose Gel Electrophoresis for the Separation of DNA Fragments — Journal of Visualized Experiments via PubMed Central. Accessed 2026-07-13.
Reviewed 2026-07-13.