Estimate how long a battery will last based on capacity (mAh) and current drain (mA). Supports duty cycles, efficiency factors, and all common battery types — from coin cells to power banks.
Whether you're designing an IoT sensor node, building an Arduino project, sizing a power bank, or just wondering how long your flashlight will last, understanding battery life calculation is essential. The basic formula is simple, but real-world factors like efficiency, duty cycles, and temperature significantly affect actual runtime. This guide covers everything from basic calculations to advanced optimization techniques.
| Battery | Capacity | Voltage | Wh | Type |
|---|---|---|---|---|
| AA Alkaline | 2,500 mAh | 1.5V | 3.75 | Disposable |
| AAA Alkaline | 1,000 mAh | 1.5V | 1.50 | Disposable |
| CR2032 | 220 mAh | 3.0V | 0.66 | Coin cell |
| 18650 Li-ion | 2,500–3,500 | 3.7V | 9.3–13 | Rechargeable |
| AA NiMH | 2,000–2,800 | 1.2V | 2.4–3.4 | Rechargeable |
| Phone (avg) | 3,000–5,000 | 3.7V | 11–18.5 | Li-ion |
| 9V Alkaline | 550 mAh | 9V | 4.95 | Disposable |
| LiPo 1S | 500–2,000 | 3.7V | 1.85–7.4 | RC/Drone |
The theoretical formula gives an optimistic estimate. In practice, several factors reduce actual runtime: Voltage regulation — buck/boost converters are 80–95% efficient, linear regulators waste energy as heat. Peukert effect — higher drain rates reduce effective capacity, especially in alkaline batteries. Temperature — cold weather can reduce lithium battery capacity by 20–40%. Self-discharge — batteries lose 1–5% per month even when idle. Age — rechargeable batteries lose 20% capacity after 300–500 cycles. Using a 0.7–0.85 efficiency factor gives realistic estimates.
For embedded/IoT projects, sleep modes are the single most effective technique. An ESP32 draws 240 mA active but only 10 µA in deep sleep — that's a 24,000× reduction. Design your firmware to sleep as much as possible, waking only to read sensors and transmit data. Other tips: use the lowest voltage regulator that works (LDO vs. switching), minimize LED usage, choose low-power sensors, and reduce wireless transmission frequency and power.