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.

mAh

Printed on the battery. 1 Ah is 1000 mAh. A coin cell is about 200 mAh, an AA about 2000 mAh.

A
%

Real batteries give less than the label: cold, age, high current and the voltage cut-off all take a share. 80 % is a sensible start. Use 100 % to see the ideal answer.

Result

Battery life
3.333 days
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

Battery life: capacity in mAh and current in mA give hours
tlife=Cbat kuseIavg\htmlData{sym=t_life}{t_{\mathrm{life}}} = \dfrac{\htmlData{sym=C_bat}{C_{\mathrm{bat}}}\,\htmlData{sym=k_use}{k_{\mathrm{use}}}}{\htmlData{sym=I_avg}{I_{\mathrm{avg}}}}
Average current of a circuit that wakes up and sleeps
Iavg=Iact tact+Isleep(T−tact)T\htmlData{sym=I_avg}{I_{\mathrm{avg}}} = \dfrac{\htmlData{sym=I_act}{I_{\mathrm{act}}}\,\htmlData{sym=t_act}{t_{\mathrm{act}}} + \htmlData{sym=I_sleep}{I_{\mathrm{sleep}}}\left(\htmlData{sym=T:period}{T} - \htmlData{sym=t_act}{t_{\mathrm{act}}}\right)}{\htmlData{sym=T:period}{T}}

What each letter means

tlifet_{\mathrm{life}}
Battery life (h) : How long the battery lasts before it is empty, in hours.
CbatC_{\mathrm{bat}}
Battery capacity (mAh) : The rated capacity on the battery label, in milliamp-hours.
kusek_{\mathrm{use}}
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.
IavgI_{\mathrm{avg}}
Average current (mA) : The current the circuit takes on average, counting both awake and asleep time.
IactI_{\mathrm{act}}
Awake current (mA) : The current while the circuit is awake and working.
tactt_{\mathrm{act}}
Awake time (s · second) : How long the circuit stays awake in each cycle.
IsleepI_{\mathrm{sleep}}
Sleep current (mA) : The current while the circuit is asleep.
TT
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

  1. A 2000 mAh battery and a steady 20 mA. In theory it lasts 2000 mAh ÷ 20 mA = 100 hours, which is 4.167 days.
  2. With the 80 % derating, you can count on 1600 mAh, so it lasts 1600 mAh ÷ 20 mA = 80 hours, or 3.333 days.
  3. 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.
  4. 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

More calculators

All calculators · All lessons · How components work