Battery Life Calculator
Enter your battery capacity and the current your device draws to get the estimated runtime in hours, days, and weeks. Switch to advanced mode to model sleep-cycle devices like microcontrollers and IoT sensors. Or use reverse-solve mode to find the capacity you need for a target runtime. All results update instantly as you type.
Formula
Worked example
A smartphone with a 3000 mAh battery and 80% usable capacity running at 150 mA: (3000 x 0.80) / 150 = 16 h. For an IoT sensor with 80 mA active for 100 ms and 0.05 mA sleep for 5 s per cycle: average = (80 x 0.1 + 0.05 x 5) / (0.1 + 5) = 8.25 / 5.1 = 1.618 mA. A 3000 mAh pack at 80% usable delivers 2400 / 1.618 = 1483 h, or about 62 days.
How to use this calculator
Start by choosing your mode. "Runtime" calculates how long your battery lasts given its capacity and your device's current draw. "Required capacity" works backward: you enter your target runtime and the current draw, and the calculator tells you how large a battery you need. For simple always-on devices, leave "Device behaviour" on Continuous and fill in the battery capacity, current draw, and usable-capacity percentage. For microcontrollers, sensors, and radio modules that spend most of their time asleep, switch to Sleep-cycle mode and add the active and sleep currents plus their durations. All results update instantly.
The battery life formula
The core formula is simple: Runtime (hours) = Usable capacity (mAh) / Current draw (mA). Usable capacity is the rated capacity multiplied by the efficiency factor, which accounts for real-world losses from temperature, battery aging, and the minimum discharge voltage. The efficiency field defaults to 80%, a conservative figure suitable for most lithium cells at room temperature. For sleep-cycle devices, the effective current draw is the time-weighted average across one full cycle: Average current = (Active current x Active time + Sleep current x Sleep time) / (Active time + Sleep time). The calculator inserts this average into the main formula automatically.
Understanding usable capacity and battery efficiency
A battery labeled "3000 mAh" does not deliver exactly 3000 mAh under all conditions. Temperature, discharge rate (C-rate), cell age, and the device's minimum operating voltage all reduce the delivered energy. At 0 C, a lithium-ion cell may deliver only 50-70% of its rated capacity. At high current draw (above 1C), the delivered capacity drops sharply. As the cell ages through charge cycles, capacity fades roughly 20% over 500 cycles for most lithium chemistries. The usable-capacity field lets you enter a realistic percentage: 80% is a safe default; 100% suits brand-new cells in ideal lab conditions.
Sleep-cycle mode for IoT and embedded devices
Many modern microcontrollers, sensors, and wireless modules spend the vast majority of their time in a deep-sleep state drawing just a few microamps, waking briefly to read a sensor or transmit data. A BLE sensor module might draw 80 mA for 100 ms while advertising, then sleep at 5 uA for 5 seconds. The time-weighted average is about 1.6 mA, compared to 80 mA if it were always on. That difference turns a 2-hour runtime into over 5 days on the same battery. Sleep-cycle mode computes this average for you. Enter the current and duration for each phase, and the averaged figure flows into the battery life formula.
Typical current draw by device type
| Device type | Current draw | Notes |
|---|---|---|
| Bluetooth Low Energy sensor | 0.01 - 0.1 | Months to years on a coin cell |
| Wi-Fi IoT module (sleep) | 0.01 - 1 | Extended standby on small pack |
| Wi-Fi IoT module (active) | 50 - 200 | Minutes to hours on small pack |
| Fitness tracker | 5 - 30 | Days on a 200 mAh cell |
| Smartwatch | 15 - 80 | 1 - 3 days on a 300 mAh cell |
| Earbuds (per bud) | 20 - 60 | 4 - 8 h on a 50 mAh cell |
| Smartphone (standby) | 3 - 15 | Days in standby |
| Smartphone (active screen) | 150 - 400 | Hours in active use |
| Tablet | 100 - 500 | Hours of mixed use |
| Laptop (idle) | 500 - 1500 | Hours on a large pack |
| Laptop (load) | 2000 - 6000 | 1 - 2 h under load |
| AA alkaline battery (1.5 V) | 2500 - 3000 mAh | Capacity reference |
| 18650 Li-ion cell (3.7 V) | 1800 - 3500 mAh | Common rechargeable cell |
Approximate current draw ranges for common devices. Use these as starting estimates; check your device datasheet for precise figures.
Frequently asked questions
What does mAh mean and how does it relate to battery life?
mAh stands for milliamp-hours. It measures how much charge a battery stores: a 1000 mAh battery can supply 1000 mA (1 A) for one hour, 500 mA for two hours, or 100 mA for ten hours. Dividing the mAh rating by your device's mA current draw gives a first-pass estimate of runtime in hours. The efficiency factor then scales it down to account for real-world losses.
Why does the calculator have an efficiency or usable-capacity factor?
Battery capacity ratings are measured under controlled laboratory conditions, typically at a slow discharge rate and moderate temperature. In practice, high discharge rates, cold temperatures, and aged cells all reduce delivered capacity. The usable-capacity field lets you enter a realistic fraction: 80% is conservative and appropriate for most designs. If you are doing a worst-case analysis, use 70%; for brand-new cells at room temperature with a light load, 90-95% may be appropriate.
How do I find the current draw of my device?
Check the device or module datasheet under "supply current," "operating current," or "power consumption." For complex devices like smartphones, look for average active-use figures from the manufacturer. If you have a USB power meter or a bench power supply with current readout, you can measure directly. For IoT modules, the datasheet usually lists separate figures for transmit (TX), receive (RX), and sleep modes.
Can I use this calculator for Wh (watt-hour) batteries?
Yes. Select "Wh" as the capacity unit and enter the battery's nominal voltage. The calculator converts Wh to mAh using the formula: mAh = (Wh / V) x 1000. You can then enter the device current in mA or A as normal. This is useful for laptop batteries, power banks, and EV battery packs, which are often specified in Wh.
What is the difference between continuous mode and sleep-cycle mode?
Continuous mode assumes the device draws the same current at all times, which is a good model for always-on devices like radios, motors, and LED lights. Sleep-cycle mode models devices that alternate between a higher-current active phase and a near-zero sleep phase. Most modern microcontrollers and sensor nodes use deep sleep to extend battery life dramatically, sometimes by a factor of 10 to 100 over continuous operation.
How do I calculate the battery capacity I need for a target runtime?
Switch the mode selector to "Required capacity for a target runtime," enter the number of hours you want, the device's current draw, and the expected efficiency percentage. The calculator divides current (mA) x runtime (h) by the efficiency factor to give the rated capacity your battery must have. Add a 20-30% design margin on top of this figure to account for end-of-life capacity fade.
Why does temperature affect battery life so much?
Electrochemical reactions slow down at low temperatures, reducing the capacity a cell can deliver before reaching its cut-off voltage. A lithium-ion cell that delivers 100% capacity at 25 C might deliver only 70% at 0 C and 50% at -20 C. High temperatures speed up self-discharge and accelerate degradation. For outdoor or automotive applications, use a conservative efficiency factor and check the datasheet's temperature-vs-capacity curves.