NewAI Part GeneratorFree to get started
FREE TOOL

Battery runtime calculator

How long a battery lasts depends on its capacity and its load. This battery runtime calculator takes the active and sleep current of a device that wakes, or one average current. The result includes a derating margin and self-discharge, with a chart of the charge remaining over time.

Load described by
Examples
mAh

Batteries in series add voltage, not mAh: 2 × AA is still one AA of capacity.

%

Your margin for temperature, pulses, aging and cut-off voltage.

%/month

Percent of the remaining charge lost per month at rest.

A
s
A

Include regulator quiescent current and leakage.

s

Time from one wake-up to the next: 60 for once a minute, 3600 for hourly.

Estimated battery life

2.84 years

Average current
6.999 µA
Duty cycle
0.05 %
Load charge used while active
71.4 %
Load charge used while asleep
28.6 %
Usable capacity after derating
180 mAh
Life in hours
24940 h
Life in days
1039 days
Life in years
2.84 years
Usable charge lost to self-discharge
3.04 %

CR2032 capacity is rated at a steady 0.2 mA. Pulses above that reduce what you get, so keep a real derating margin.

Usable charge remaining over time
05010015000.511.522.5Time (years)Charge (mAh)Empty at 2.84 years
With self-dischargeLoad only

What the wake interval does to battery life

Wake everyAverage currentBattery life
1 s52 µA144 days
10 s7 µA2.84 years
1 min2.83 µA6.73 years
10 min2.08 µA8.93 years
1 h2.01 µA9.21 years
1 day2 µA9.27 years

How long will a battery last?

Battery life in hours = usable capacity in mAh ÷ average current in mA. A CR2032 derated to 180 mAh, feeding a device that averages 7 µA, lasts about 2.84 years once self-discharge is included. For a device that sleeps, average the current over one full wake period first.

Battery life formula

Charge is conserved, so what matters is the average current over a whole wake period. Short bursts count in proportion to how long they last.

Iavg = (Ia × ta + Is × (P − ta)) ÷ P
Iavg
average current
Ia, ta
active current and active time per wake
Is
sleep current
P
wake period, from one wake-up to the next

The usable charge is the rated capacity less your margin. With no self-discharge the life is simply:

T = Q0 ÷ Iavg
Q0
usable charge in mAh = rated capacity × (1 − derating)
T
battery life in hours

Self-discharge is modeled as a loss proportional to the charge still in the cell. Solving dQ/dt = −Iavg − kQ gives the charge remaining and the time to empty:

Q(t) = (Q0 + Iavg ÷ k) × e^(−kt) − Iavg ÷ k     T = ln(1 + k × Q0 ÷ Iavg) ÷ k
k
rate constant = −ln(1 − s) ÷ 730.5 h, for s lost per month
Q(t)
charge remaining at time t

How to calculate battery life: worked examples

Example 1: CR2032 sensor waking every 10 seconds

10 mA for 5 ms and 2 µA for the rest of a 10 s period averages 7 µA. The active bursts use 71.4 % of that charge and sleep the rest, so both are worth reducing. A 225 mAh cell derated 20 % leaves 180 mAh. Load only that is 2.93 years; with 0.18 % per month of self-discharge the result is 2.84 years.

Example 2: two AA alkaline cells, reporting every 5 minutes

30 mA for 2 s every 5 min with 15 µA of sleep current averages 215 µA. Two cells in series still hold 2500 mAh, so derating 15 % gives 2125 mAh and a life of 405 days.

Example 3: 18650 GPS tracker waking every 10 minutes

60 mA for 30 s every 10 min and 100 µA asleep averages 3.09 mA. From 2400 mAh usable, the battery lasts 32 days. Active time is 5 % of the period but dominates the charge used, so a shorter GPS fix is the biggest lever.

mAh to hours: battery life at common average currents

Using the same margins as the presets. A dash means the current is above what that cell is rated or characterized for, so its rated capacity no longer applies. Results past ten years are not meaningful: shelf life takes over.

Battery5 µA20 µA100 µA1 mA10 mA100 mA
CR2032 (225 mAh)3.93 years371 days74.8 days———
2 × AA alkaline (2500 mAh)Over 10 yearsOver 10 years2.34 years88.2 days8.85 days21.2 hours
18650 Li-ion (3000 mAh)Over 10 years6.03 years2.1 years96.8 days9.97 days24 hours

How the wake interval changes battery life

A 225 mAh CR2032 derated 20 %, with 10 mA for 5 ms per wake and 2 µA of sleep current. Past a point, waking less often gains little because sleep current and self-discharge take over.

Wake everyAverage currentBattery life
1 s52 µA144 days
10 s7 µA2.84 years
1 min2.83 µA6.73 years
10 min2.08 µA8.93 years
1 h2.01 µA9.21 years
1 day2 µA9.27 years

Where the preset figures come from

Capacity is always quoted at a specific load and end voltage. Check your own cell’s datasheet.

BatteryRated capacityRated atSelf-discharge used
CR2032 (Panasonic)225 mAh0.2 mA continuous drain0.18 %/month (10 % in 5 years)
AA alkaline (Energizer)2500 mAh100 mA to 0.8 V0.25 %/month (about 3 %/year)
18650 Li-ion (Samsung 30Q)3000 mAh0.2C to 2.5 V2 %/month

What the model leaves out

  • Voltage. A device stops when the loaded voltage reaches its minimum, often before the rated capacity is used. An alkaline AA at 100 mA gives 2500 mAh to 0.8 V but only 1500 mAh to 1.2 V.
  • Pulse loading. A CR2032 is rated at a steady 0.2 mA. TI found the move from 15 mA to 30 mA peaks cost 9 % on average, but some vendors reached only about 50 % of rated capacity at either level, and a capacitor across the cell improved poor cells by more than 40 %.
  • Temperature. Capacity falls in the cold and self-discharge rises with heat, so a device on a warm enclosure wall will not match a room-temperature estimate.
  • Everything on the rail. Add regulator quiescent current, pull-up resistors, sensors and leakage to the sleep current.
  • Early self-discharge. Battery University notes Li-ion loses about 5 % in the first 24 hours before settling, and a protection circuit adds about 3 % per month.

Glossary

mAh
Milliamp-hours, a measure of charge: 1000 mAh equals 1 A for one hour or 1 mA for 1000 hours.
Duty cycle
The fraction of each period the device is active.
Average current
The steady current that would move the same charge over one period as the real, varying current.
Derating
A deliberate reduction of the rated capacity to allow for temperature, load and aging.
Self-discharge
Charge a battery loses at rest through slow internal reactions.
Cut-off voltage
The loaded battery voltage at which the device stops working. Capacity is always quoted to a specific end voltage.

Related guides

Frequently asked questions

How do you calculate battery life?

Divide the usable capacity in mAh by the average current in mA to get hours. For a device that sleeps and wakes, the average current is (active current × active time + sleep current × sleep time) ÷ the total period.

How long does a CR2032 last?

It depends almost entirely on the average current. A node drawing 10 mA for 5 ms every 10 s and sleeping at 2 µA averages 7 µA, which gives about 2.84 years with a 20 % derating. Load the CR2032 preset to try your own numbers.

How do I convert mAh to hours?

Divide the capacity in mAh by the current in mA: ideally, 1000 mAh delivers 1 A for one hour or 1 mA for 1000 hours. A plain mAh to hours calculator stops there, while this one also subtracts a derating margin and self-discharge.

Can this battery life calculator handle a device that never sleeps?

Yes. Choose the Average current mode and enter the steady draw, as the steady 18650 preset does. For a constant load the result is usable mAh divided by mA, with self-discharge still counted.

How much should I derate battery capacity?

There is no universal figure, so treat it as your margin for cold, high pulses, aging and a device cut-off voltage above the rated end voltage. The presets use 15 to 20 %. Use more for CR2032 cells that see radio pulses: TI measured some vendors at about 50 % of rated capacity with 15 mA and 30 mA peaks.

Does self-discharge matter for battery life?

It matters when the load is tiny. In the CR2032 example it costs 3.04 % of the runtime; at higher currents it fades to nothing. Published figures are about 3 % per year for alkaline cells, about 10 % in 5 years for primary lithium, and 1 to 2 % per month for Li-ion.

Do two AA batteries in series last twice as long as one?

No. In series the voltage doubles and the capacity stays at one cell’s mAh. Two cells in parallel double the mAh instead. With a switching regulator, the extra energy of a series pair shows up as a lower input current; with a linear regulator it does not.

Why did my coin cell die sooner than the calculation said?

The most common causes are current peaks far above the 0.2 mA the CR2032 is rated at, cold temperatures, and sleep current that is higher than the datasheet of the microcontroller alone (regulators, pull-ups and sensors all add to it). Measure the real sleep current and add a bulk capacitor across the cell for radio bursts.

How do I find the average current of my device?

Measure the current over one full wake cycle and take the mean, or add up each state as current × time and divide by the period. If you have more than two states, sum them all first and use the Average current mode.

More free PCB tools

See all free electronics tools →

Sources

Design the whole board, not one number

ProtoFlow is free AI PCB design software: describe a circuit and get a schematic with real parts, PCB layout with an autorouter, SPICE simulation and Gerber files. Native KiCad, Altium and EAGLE import and export. Free on macOS, Windows and Linux.

Get for Mac

Free to start. No card required.