An algorithm to calculate the current in the two-diode equivalent circuit of a solar cell is described and characterized in detail. It enables fitting measured current–voltage characteristics with hundreds of voltage points and six fit parameters at practically instantaneous speeds and can handle thousands of voltage points within a few seconds, without simplifications of the two-diode model. This performance enables routine two-diode model parameter extraction at in-line speeds, which may help to enhance cell characterization for module integration. The source code is publicly available. Copyright © 2012 John Wiley & Sons, Ltd.