Free calculator
Battery Life Calculator
A battery’s life is its capacity divided by the current the circuit takes. A 2000 mAh battery driving a 20 mA load lasts 2000 ÷ 20 = 100 hours in theory. Real batteries give less than the label, so this calculator multiplies by a derating factor (80 % to start) and shows the result in hours, days or years.
Result
- Capacity you can count on80 % of 2000 mAh
- 1600 mAh
- Average current
- 20 mA
- Battery life in hours
- 80 h
- Battery life in days
- 3.333 days
A rough guide: it assumes a steady supply voltage and ignores self-discharge. Always test with the real battery.
The formula
What each letter means
- Battery life (h) : How long the battery lasts before it is empty, in hours.
- Battery capacity (mAh) : The rated capacity on the battery label, in milliamp-hours.
- Usable share of the capacity (no unit) : The part of the rated capacity you can really use: 0.8 means 80 %. A ratio, so no unit.
- Average current (mA) : The current the circuit takes on average, counting both awake and asleep time.
- Awake current (mA) : The current while the circuit is awake and working.
- Awake time (s · second) : How long the circuit stays awake in each cycle.
- Sleep current (mA) : The current while the circuit is asleep.
- Period (s · second) : How long one full cycle lasts. T = 1 ÷ f.
How it works
Capacity in mAh says how many milliamps the battery can supply for one hour. Dividing by the current you use gives the hours. Use the average current: a circuit that draws 100 mA for one second out of every ten and 1 mA for the other nine uses (100 × 1 + 1 × 9) ÷ 10 = 10.9 mA on average, not 100 mA and not 1 mA. This is why a sensor that sleeps most of the time can run for months on a coin cell.
Why derate? The mAh on the label is measured under easy conditions: a small current, room temperature, and a fresh cell drained to a low cut-off voltage. In real life a higher current, cold weather, ageing and a circuit that stops working before the battery is flat each take some capacity away. Using about 80 % of the rating is a sensible rule for planning, and you can lower it for cold places or high currents, or set 100 % to see the ideal figure.
For very long lives the answer stops being reliable. Batteries slowly lose charge even when they are not used (self-discharge), and the battery voltage falls as it empties, which may drop below what your circuit needs. Treat the result as a first estimate, and measure the real current with a multimeter, both awake and asleep, before you trust a multi-year figure.
Worked example
- A 2000 mAh battery and a steady 20 mA. In theory it lasts 2000 mAh ÷ 20 mA = 100 hours, which is 4.167 days.
- With the 80 % derating, you can count on 1600 mAh, so it lasts 1600 mAh ÷ 20 mA = 80 hours, or 3.333 days.
- Now a sensor that is awake for 1 s every minute at 20 mA and sleeps at 10 µA. Average current = (20 mA × 1 s + 10 µA × 59 s) ÷ 60 s = 343.2 µA.
- Life = 1600 mAh ÷ 343.2 µA = 4662 hours, about 194.3 days. The 1 s awake each minute uses 97 % of the charge, even though it is only 1.7 % of the time.
Common questions
What should I use for the derating?
Start at 80 %. Go lower, 50 % to 70 %, for cold weather, for loads that draw close to the battery’s limit, or for cheap cells. Use 100 % only to see the ideal answer from the label. Alkaline cells lose a lot of capacity at high currents, and lithium cells in cold places lose more than you might expect.
How do I find the average current of my circuit?
Measure the current with a multimeter in each state (awake and asleep), and note how long each state lasts. Enter them in the duty-cycle mode. The sleep current is the hard one: many multimeters cannot read below a few microamps, and a tiny leak, such as a pull-up resistor, can use more than the chip itself.
Does the voltage matter?
Capacity in mAh is a charge, so it does not depend on the voltage, as long as the circuit takes the same current. A circuit that is fed through a regulator or a switching converter takes a different current from the battery than the load takes, so use the current drawn from the battery itself.
Try it live
- Try it live in lesson 1.3: Thevenin Equivalent & Why Batteries Sag Under Load
- Component guide: Battery
More calculators
- LED Resistor Calculator
- Ohm's Law Calculator
- Voltage Divider Calculator
- RC Time Constant Calculator
- RC Filter Calculator
- Resistors in Series and Parallel Calculator
- 555 Timer Calculator
- PCB Trace Width Calculator
- Resistor Color Code Calculator
- SMD Resistor Code Calculator
- Capacitor Code Calculator
- Wire Size and Voltage Drop Calculator