How Do You Calculate Battery Life for an Embedded Device?
Last updated 29 June 2026 · 7 min read
Direct Answer
Battery life (hours) ≈ Battery capacity (mAh) ÷ Average current draw (mA). For an embedded device that cycles between active and sleep states, the average current is the duty-cycle-weighted sum of each state's current consumption. A device with a 1000 mAh battery drawing 10 mA active for 1% of the time and 20 µA in sleep for 99% of the time has an average current of approximately 0.12 mA, giving a theoretical runtime of over 8000 hours (nearly a year) from that battery.
Detailed Explanation
Battery life calculation is one of the most important steps in designing a battery-powered embedded device. Getting it wrong by a factor of 2–5× is common when designers use peak current figures instead of average current, or forget that quiescent currents add up.
The Fundamental Formula
Battery life (hours) = Battery capacity (mAh) ÷ Average current draw (mA)
This is the starting point. The critical variable is the average current draw — not the peak current, not the idle current, but the actual time-weighted average over a full duty cycle.
Example: A 2000 mAh Li-ion cell powering a device that draws 50 mA:
Battery life = 2000 mAh ÷ 50 mA = 40 hours
Simple when the device runs at constant current. The engineering work comes in calculating the true average for a device with variable states.
Calculating Average Current for a Duty-Cycle Device
Most battery-powered embedded systems cycle between at least two states: active and sleep. The average current is:
I_avg = (I_active × t_active + I_sleep × t_sleep) / (t_active + t_sleep)
Or equivalently, using duty cycle D = t_active / (t_active + t_sleep):
I_avg = I_active × D + I_sleep × (1 − D)
Example: IoT sensor node
- Active (MCU awake, sensor reading, transmit): 15 mA for 200 ms
- Sleep (MCU in deep sleep, radio off): 20 µA for 9.8 s
- Cycle period: 10 s → 10 cycles per minute → 86,400 cycles/day
- Duty cycle: 200 ms / 10,000 ms = 2%
I_avg = 15 mA × 0.02 + 0.02 mA × 0.98 = 0.30 mA + 0.020 mA = 0.32 mA
Battery life (2000 mAh) = 2000 ÷ 0.32 = 6250 hours ≈ 260 days
Building a Full Current Budget
For any real device, the current model must include every current-consuming component:
| Component | Active current | Sleep/idle current | Notes |
|---|---|---|---|
| MCU (e.g. STM32L4) | 5–30 mA | 1–10 µA | Varies by clock speed and peripheral state |
| Radio (e.g. nRF52 BLE) | 6–15 mA TX | 0.4 µA | TX peak can be 20+ mA burst |
| Sensor (e.g. BME280) | 0.5–3 mA | 0.1 µA | Check forced-mode vs normal mode in datasheet |
| Flash memory (e.g. W25Q32) | 10–25 mA active | 1–5 µA standby | Standby current is often missed |
| Voltage regulator (LDO or buck) | — | 1–50 µA quiescent | Add IQ for every regulator in the chain |
| Protection circuit IC | — | 3–10 µA | Present even when device appears off; multi-cell packs replace this with a BMS (typically 50–200 µA) |
| LED indicators | 0.5–20 mA | 0 | Easy to forget if always-on; consider pulse-mode |
The quiescent currents add up: a system with three LDOs at 20 µA each, a flash in standby at 3 µA, and a protection IC at 5 µA already has 68 µA of standing load before the MCU's own sleep current. For a device targeting sub-100 µA sleep current, this is a major fraction of the budget.
The Peukert Effect and C-Rate Derating
The stated capacity of a Li-ion battery (e.g. 2000 mAh) is typically measured at a slow discharge rate, often C/5 (0.2C). At higher discharge rates:
- Internal resistance causes additional voltage drop
- The cell hits its cutoff voltage sooner
- The actual delivered charge is less than the rated mAh
Practical impact for embedded designs: for most IoT devices with average currents well below 0.1C, this effect is negligible. For devices with sustained high-current loads (a cellular modem transmitting at 1–2A bursts, a motor driver), the available capacity at those high rates may be 80–90% of the rated capacity. Factor this in for accurate predictions on high-drain designs.
The Effect of Temperature on Capacity
Li-ion cells lose effective capacity at low temperatures:
| Temperature | Approximate capacity vs room temp |
|---|---|
| 25°C | 100% (reference) |
| 0°C | ~80–85% |
| −10°C | ~65–75% |
| −20°C | ~50–60% |
| −40°C | ~20–40% (depends heavily on cell chemistry) |
For devices deployed in outdoor, automotive, or cold-chain environments, use worst-case temperature capacity when sizing the battery. A device designed to last one year at room temperature may only last six months in a cold warehouse.
Self-Discharge as a Current Budget Item
Li-ion self-discharge is approximately 2–3% of rated capacity per month at 25°C. Converting to a current:
I_self = 2% × 2000 mAh ÷ (30 days × 24 hours) = 0.056 mA = 56 µA
For devices targeting multi-year battery life at very low active duty cycles, 56 µA of effective self-discharge is significant — comparable to the MCU's sleep current. Add it as a constant term in the current budget for long-life designs.
Adding a Design Margin
Theoretical calculations are optimistic. Apply a 20–30% derating factor to account for:
- Cell capacity tolerance (±10% between units is common)
- Capacity fade over the product's service life (expect 80% capacity after 500 cycles)
- Temperature derating in the worst-case deployment environment
- Unmodelled standby currents and leakage paths
Practical runtime = Theoretical runtime × (1 − margin)
For a calculated 260-day runtime with 30% margin: 260 × 0.70 = 182 days as the design target.
Design Considerations
- Measure, don't estimate: manufacturer datasheet current figures are often under typical conditions, not worst-case. Use a power analyser to measure actual current in every operating state — including boot, OTA update, and error recovery paths — before finalising the battery size.
- Optimise sleep current first: in low-duty-cycle designs, the sleep current dominates the average. Cutting sleep current from 50 µA to 10 µA saves more battery life than cutting active current from 20 mA to 15 mA.
- Account for voltage regulator quiescent current across the full voltage range: LDO IQ typically increases slightly at low input voltage. Measure it at the battery's minimum operating voltage (around 3.0–3.3V), not only at 3.7V nominal.
- Know your Li-ion battery's voltage range: the full usable voltage window is approximately 3.0–4.2V. Your power supply circuit must keep the output rail stable across this range — check that your switching regulator or LDO can maintain regulation down to 3.0V input.
- Power profiling as a hardware validation step: including a precision power measurement break-out (a 0.1Ω shunt resistor and test points) in the prototype design makes current profiling straightforward. Removing it in production costs only the unpopulated pads.
- Low-power circuit design: architecting an embedded system for multi-year battery life involves choosing the right MCU sleep mode for each idle period, clock gating peripherals, and coordinating radio duty cycles with power domains — work that Zeus Design's firmware and hardware teams approach systematically for IoT and wearable products.
Common Mistakes
- Using peak current as the "typical" draw: a BLE radio transmitting at 15 mA for 5 ms per second has an average current of 75 µA from radio alone — but if the designer uses 15 mA as the current draw, they underestimate battery life by 200×.
- Forgetting regulator and protection quiescent currents: these are always present, even in deep sleep. For ultra-low-power designs, every component in the power chain has an idle current that contributes to the battery drain floor.
- Assuming rated capacity equals usable capacity: a 2000 mAh cell derated for temperature, aged to 80% capacity, and operating at a higher-than-test C-rate may deliver only 1200–1400 mAh in the field.
- Not profiling edge case states: the "device performing OTA firmware update" state often draws 5–10× the typical active current for 10–60 seconds. If OTA happens daily, this can represent a non-trivial fraction of total energy consumed and must be included in the budget.
Frequently Asked Questions
- Why does my measured battery life differ from my calculation?
- Several factors cause real battery life to fall short of the calculation: (1) capacity derates at high discharge rates (Peukert effect) — a 1000 mAh cell delivers less actual charge at high continuous current; (2) battery capacity degrades with age and cycle count; (3) voltage regulators and protection circuits add quiescent current not always in the datasheet typical figures; (4) radio transmission current spikes are often much larger than average figures suggest; (5) temperature reduces effective capacity significantly below 0°C and above 40°C. A 20–30% design margin is good practice.
- How do I measure my device's actual current consumption?
- Use a current probe and oscilloscope to capture the full current waveform, including peaks during transmission bursts. Alternatively, use a precision power analyser (e.g. Nordic PPK2, Otii Arc, Monsoon) that logs both the instantaneous current and the charge consumed over time. These tools calculate average current and project battery life directly. Do not rely solely on multimeter averages — brief high-current peaks that average out to a low DC reading can still drain a battery and are invisible on a multimeter.
- Does self-discharge matter for IoT battery life calculations?
- For devices active most of the time, no — self-discharge at 2–3%/month is negligible. For ultra-low-power devices that sleep for most of their life, self-discharge can be a significant fraction of total capacity loss. A device designed for a 10-year battery life at 5 µA average current draw will lose a material fraction of the battery's capacity to self-discharge (in addition to the circuit's own quiescent draw) over that timeframe. Include self-discharge as a constant offset current (approximately 2–3%/month of rated capacity, converted to mA) in the average current budget.
References
Related Questions
What Is a Lithium-Ion Battery and How Does It Work?
Li-ion batteries have a 3.6–3.7V nominal cell voltage and high energy density. Learn how they work, what C-rate means, and essential Li-ion safety rules.
How Do Lithium-Ion Batteries Charge?
Li-ion batteries charge via CC/CV method to 4.2V per cell. Learn how each charge phase works, what terminates charging, and what charger ICs handle.
What Is a Battery Protection Circuit?
A Li-ion protection circuit prevents overcharge, overdischarge, overcurrent, and short circuits using a dedicated IC and back-to-back MOSFETs.
What Is a Battery Management System (BMS)?
A BMS monitors and protects multi-cell Li-ion packs with cell balancing, state-of-charge estimation, temperature monitoring, and communication.
What Is a Microcontroller (MCU)?
A microcontroller (MCU) combines a CPU, flash, RAM, and peripherals on one chip. Learn how MCUs work and how they differ from microprocessors and FPGAs.
How Does a Fuel Gauge IC Measure Battery State of Charge?
A fuel gauge IC estimates battery state of charge so your device can show accurate battery level. Learn how voltage-based and coulomb-counting gauges work.
Related Forum Discussions
MAX17048 reporting 0% SoC at power-on — reading jumps to ~70% after several seconds
Adding a MAX17048 to an ESP32 project — single 18650 cell, standard SOT-23 breakout board, I2C on pins 21/22. Address 0x36, confirmed with a
TP4056 CHRG LED stays on for hours — is the charge ever going to terminate?
Built a small Li-ion charger using one of those cheap blue TP4056 modules from AliExpress. Battery is a single-cell 2000 mAh flat LiPo (nomi
LDO overheating and shutting down on a 2S Li-ion powered board
Got a board running off a 2S Li-ion pack (7.4V nominal, up to 8.4V fresh off the charger) feeding an LDO down to 3.3V for the MCU and a coup