
How to Use the Battery Life Calculator

- Choose a constant load or a sleep and active duty cycle.
- Enter the battery capacity in mAh, Ah or Wh and its voltage.
- Enter the load current or power.
- Set the usable capacity to account for losses, cold and aging.
- Read the estimated battery life, with hours, days and average current.
Enter the battery capacity in milliamp-hours (mAh), amp-hours (Ah) or watt-hours (Wh), and the nominal battery voltage. For a device that draws a steady current, choose Constant load and enter the current in mA or A, or the power in watts. For sensors, trackers and other devices that sleep most of the time, choose Sleep and active and enter the active current, the percentage of time the device is awake, and the sleep current in microamps.
Set the usable capacity to account for losses. The result shows the runtime in hours, days or years, along with the average current, usable capacity, stored energy and average power.
The Battery Life Formula
Average current = active current × duty + sleep current × (1 − duty)
mAh = Wh × 1,000 ÷ V mA = W × 1,000 ÷ V
Capacity in mAh tells you how many milliamps a battery can supply for one hour. Dividing by the current gives hours. Real batteries deliver less than their label for several reasons: voltage regulators and converters waste some energy, the device stops working before the battery is fully empty, capacity drops in the cold and with age, and high currents reduce the usable charge. An efficiency of 80% to 90% is a reasonable starting point for many designs.
Worked Examples
Constant load. A 2,500 mAh lithium-ion cell powers a device that draws 150 mA. With 85% usable capacity, 2,500 × 0.85 = 2,125 mAh are available, and 2,125 ÷ 150 = 14.17 hours, or 14 hours 10 minutes. At 3.7 V the cell stores 9.25 Wh.
Sleep and active. A sensor wakes for 2% of the time and draws 20 mA when active and 50 µA asleep. The average current is 20 × 0.02 + 0.05 × 0.98 = 0.449 mA. The same 2,125 usable mAh then last 2,125 ÷ 0.449 = 4,733 hours, or about 197.2 days. Sleep current accounts for 10.9% of the drain, so cutting it would extend life noticeably.
Typical Battery Capacities
| Battery | Nominal voltage | Typical capacity |
|---|---|---|
| CR2032 coin cell | 3 V | about 220 mAh |
| AAA alkaline | 1.5 V | about 1,000 mAh at low drain |
| AA alkaline | 1.5 V | about 2,500 mAh at low drain |
| AA NiMH rechargeable | 1.2 V | about 2,000 mAh |
| 18650 lithium-ion cell | 3.6 to 3.7 V | about 2,500 to 3,500 mAh |
| 9 V alkaline | 9 V | about 500 mAh |
These are typical published ranges. Alkaline capacity in particular depends heavily on the discharge current, so check the manufacturer’s datasheet for your load.
Series, Parallel and Power Banks
Cells in parallel add their capacity at the same voltage: two 2,500 mAh cells give 5,000 mAh. Cells in series add voltage but keep the same mAh: two 3.7 V 2,500 mAh cells give 7.4 V and 2,500 mAh. Comparing batteries of different voltages is easiest in watt-hours. Power banks are rated at the internal cell voltage, usually 3.6 or 3.7 V, but deliver 5 V or more over USB, so the output in mAh at 5 V is lower than the label even before conversion losses. Use the Wh option and your device’s power draw for a fairer estimate.
Tips for Longer Battery Life
- Measure real current with a meter. Datasheet figures for microcontrollers rarely include sensors, LEDs and regulators.
- In low duty cycle designs, sleep current often dominates. A regulator with a high quiescent current can drain more than the device itself.
- Self-discharge matters for multi-year designs: some chemistries lose a few percent a year, others much more. Check the datasheet.
When comparing products, check whether the quoted capacity is at the cell voltage or the output voltage, and whether runtime claims assume a low brightness or idle state. A calculation with your own measured current is usually more realistic than the box.
Frequently asked questions
How do I calculate battery life?
Divide the usable battery capacity in mAh by the device's current in mA to get hours. A 2,500 mAh battery at 85% efficiency running a 150 mA load lasts 2,125 divided by 150, about 14.2 hours.
How long will a 2000 mAh battery last?
It depends on the load. At 100 mA it lasts about 20 hours in theory, or 17 hours with 85% usable capacity. At 500 mA it lasts about 4 hours before losses and 3.4 hours after.
How do I convert Wh to mAh?
Multiply watt-hours by 1,000 and divide by the battery voltage. A 9.25 Wh battery at 3.7 V holds 2,500 mAh. Going the other way, multiply mAh by volts and divide by 1,000.
What efficiency should I use?
Use 80% to 90% for most designs with a voltage regulator, lower in cold weather or at high current. Use 100% only to compare batteries on paper, because real devices never use the full rated capacity.
How do I calculate battery life with sleep mode?
Find the average current: active current times the fraction of time awake, plus sleep current times the fraction asleep. Then divide usable capacity by that average. The duty cycle mode does this for you.
Why does my battery die sooner than the calculation?
Rated capacity is measured under ideal conditions. High current, low temperature, aging, the device's cutoff voltage, regulator losses and self-discharge all reduce runtime. Lower the efficiency figure to reflect your conditions.