What's going on
A real battery behaves like a perfect voltage source, its EMF (E), in series with a small internal resistance (r). When current flows, some voltage is lost across r before it reaches the terminals:
terminal voltage = E − I × r where I = E ÷ (R + r)
The harder you load the battery, the more its voltage sags. That's why a nearly flat battery can read a healthy voltage on a multimeter, which draws almost no current, and then collapse as soon as it has to power something. To test a battery properly, measure it under load.
Measuring internal resistance
Measure the voltage with nothing connected, which is close to E. Then connect a known load resistor, measure the voltage V again and work out the current I = V ÷ R. The internal resistance is r = (E − V) ÷ I. You can try it here: read the terminal voltage, then check your answer against the slider.
Maximum power transfer
The load gets the most power when its resistance equals the internal resistance. That maximum is E² ÷ 4r. But at that point just as much power is turned into heat inside the battery, so the efficiency is only 50%. Batteries and power supplies are therefore used with loads much bigger than their internal resistance, where efficiency is high. Matching the load to the source matters more in radio and audio circuits, where getting the most signal power across counts more than efficiency.
How this simulation works
The maths is exact for a source with a fixed EMF and a fixed internal resistance. In a real battery both change: the EMF falls and the internal resistance rises as it discharges, and the resistance also rises in the cold. It depends on the chemistry and size too, so check the maker's data for a real cell. To estimate how long a battery will last, use our battery life calculator.