The battery life formula
Battery life (h) = capacity (mAh) × usable share ÷ average current (mA)
The usable share, 85% by default, covers the capacity you lose to temperature, battery age and the device’s cut-off voltage. Lithium cells deliver close to their rating; alkaline batteries in high-drain devices can deliver well under it.
Devices with a sleep mode
Most battery-powered electronics spend nearly all their time asleep. The average current decides battery life:
Average (mA) = active mA × active % + sleep mA × (100% − active %)
Example: a temperature sensor wakes once a minute, draws 15 mA for 60 ms (0.1% of the time) and sleeps at 5 µA. Its average is 0.02 mA, so a 225 mAh CR2032 coin cell lasts about 398 days 13 h. In practice, coin cell self-discharge and pulse-current limits shorten that, so test with your real hardware.
Typical battery capacities
| Battery | Nominal voltage | Typical capacity | Life at 10 mA |
|---|---|---|---|
| CR2032 coin cell | 3 V | 225 mAh | 19 h 8 min |
| AAA alkaline | 1.5 V | 1,000 mAh | 3 days 13 h |
| AA alkaline | 1.5 V | 2,500 mAh | 8 days 21 h |
| AA NiMH rechargeable | 1.2 V | 2,000 mAh | 7 days 2 h |
| 18650 lithium-ion | 3.6–3.7 V | 3,000 mAh | 10 days 15 h |
| 9 V alkaline | 9 V | 550 mAh | 46 h 45 min |
Capacities vary by brand and by how fast the battery is drained; alkaline ratings in particular are measured at low currents. Check the manufacturer’s datasheet for the current your device draws.
How to measure your device’s current
- Datasheet or spec sheet: look for the operating and standby current.
- Multimeter in series: set it to mA and place it between the battery and the device. It is fine for steady loads but misses short peaks.
- USB power meter: for USB-powered gadgets, it shows current and mAh used over time.
- Power profiler: for sleep currents in the microamp range, a dedicated power analyser captures both the sleep floor and the wake-up spikes.
For larger batteries rated in Ah or Wh, such as 12 V, UPS or power station batteries, the battery runtime calculator works in watts and accounts for inverter losses. The reasoning behind both calculators is in how battery runtime is calculated.