You are building a small gadget, such as a sensor, a light or a data logger, and it will run from batteries. The first question is always the same: how long will it run before the batteries are flat? Guess too high and your project dies in the middle of the night. Guess too low and you carry a bigger pack than you need.
The answer is one division, with a few honest corrections. Once you have it you can size a pack before you buy anything, compare two different packs fairly, and see at a glance whether a load is gentle or hard on the cells. (This post stays at low voltage and is arithmetic only, not a safety guide.)
The one sum behind battery life
A battery’s capacity is printed in milliamp-hours (mAh). A 2,500 mAh cell can, in principle, supply 2,500 milliamps for one hour, or 250 milliamps for ten hours, or 25 milliamps for 100 hours. So:
hours = capacity in mAh ÷ current drawn in mA
Your project draws a certain current, and the cells hold a certain capacity. Divide one by the other. Everything else in this post is about getting those two numbers right.
Series adds volts, parallel adds hours
Cells are combined in two ways:
- In series (end to end): the voltages add, the capacity stays the same. Three 1.5 V cells make 4.5 V, still 2,500 mAh.
- In parallel (side by side): the voltage stays the same, the capacities add. Two 2,500 mAh cells in parallel are still 1.5 V but 5,000 mAh.
Most projects need a certain voltage first (to run the electronics), then enough capacity (to run long enough). Series gets you the volts, parallel gets you the hours.
The example: three AA cells and a 900 mA load
Say you have three alkaline AA cells in series. Each is 1.5 V and printed as 2,500 mAh. Your gadget draws 900 mA while it is running. Follow the steps.
- Pack voltage and capacity. 3 × 1.5 V = 4.5 V. Parallel strings: just one, so the capacity stays 2,500 mAh.
- Energy in watt-hours. Wh = volts × amp-hours = 4.5 V × 2.5 Ah = 11.25 Wh.
- Take the usable share. The printed capacity assumes the cell is drained all the way down to about 0.8 V. Your circuit will stop working long before that, and capacity below your cutoff is capacity you never get. The calculator uses 80% as a starting point: 2,500 × 0.80 = 2,000 mAh usable. (The book works this carefully for its project, with a cutoff of 1.167 V per cell. Your own figure depends on where your circuit gives up, so treat 80% as a planning value, not a promise.)
- Divide by the current. 2,000 mAh ÷ 900 mA = 2.22 hours, about 2 hours 13 minutes.
- Compare with the label. Using the printed 2,500 mAh would have said 2,500 ÷ 900 = 2.78 hours, about 2 hours 47 minutes. That is more than half an hour too optimistic.
Notice how fast the hours fall as the current rises. Halve the current and you double the runtime, so cutting what the circuit draws is the cheapest way to get more hours: lower the brightness, sleep between readings, or switch the load off when it is not needed.
The C-rate: is this load gentle or hard?
The C-rate is the load current divided by the capacity. For our pack: 900 mA ÷ 2,000 mAh = 0.45C. Under 1C is gentle for alkaline cells, with some voltage sag. Well over 1C is hard: the voltage drops, and the cells deliver much less than their printed capacity at that rate. If your C-rate comes out high, the runtime from the simple division is an overestimate, so use a bigger pack or a cell type built for high current.
The calculator rates the load against the usable capacity, not the printed one. The printed figure includes capacity you cannot reach, so using it would make a load look gentler than it is.
Compare packs in watt-hours, not mAh
mAh on its own is a trap when the voltages differ. A single 3.7 V lithium-ion cell sold as 3,000 mAh sounds bigger than three AAs at 2,500 mAh. Convert both to energy:
- 3 AA: 4.5 V × 2.5 Ah = 11.25 Wh
- One 3.7 V, 3,000 mAh cell: 3.7 V × 3.0 Ah = 11.1 Wh
They hold nearly the same energy. (The lithium figures here are example values for the arithmetic, not a product recommendation.)
Watt-hours let you compare any packs on one scale. mAh only compares packs at the same voltage.
Common mistakes
- Using the printed capacity as if it were all usable. Subtract the part below your circuit’s cutoff voltage.
- Adding the capacities of cells in series. Series adds volts, not hours.
- Using the average current when the load comes in bursts. A gadget that draws 900 mA for 10% of the time and almost nothing otherwise needs the time-weighted average, not the peak.
- Forgetting the voltage the electronics need. A pack that gives hours but sags below what your circuit needs gives nothing.
- Trusting the sum for lithium cells without reading the datasheet. Lithium cells need the right charger and protection circuit. The arithmetic is the same, the safety rules are not.
Rule of thumb
Hours = usable mAh ÷ current in mA. Usable is roughly 80% of printed. Double the current, halve the hours. Compare packs in watt-hours.
Try it with your own numbers
The free Battery Capacity, Watt-Hours and C-Rate calculator takes the volts and mAh per cell, how many cells in series and in parallel, the usable share and your load, and shows the pack, the energy, the design capacity and the C-rate. It comes from Chapter 2 of Maker Electronics Math.
This is arithmetic for planning a low-voltage project, not a safety guide. Check each part’s datasheet and keep away from mains electricity.