How long a load really runs from a given cell — duty cycle, regulator topology and self-discharge included, which is exactly where the naive mAh ÷ mA answer goes wrong.
Inputs
In milliamp-hours (mAh). An 18650 is 2,000–3,500 mAh, an alkaline AA about 2,500 mAh, a CR2032 about 225 mAh.
V
Used for the energy figure and, when a regulator is fitted, as its input voltage. Li-ion 3.7 V, LiFePO4 3.2 V, alkaline 1.5 V, CR2032 3.0 V.
A
Draw while the device is awake and transmitting. Type 80m for 80 mA. Measure it — datasheet typicals are optimistic.
A
Draw between wake-ups, including regulator quiescent current, pull-ups and any LED you forgot about. Type 10u for 10 µA.
%
Fraction of each cycle spent awake. Awake 3 s per hour is 3 / 3600 = 0.083%. Set 100 for a device that never sleeps.
A switching converter conserves power, not current. Getting this wrong is the single most common error in battery life estimates.
%
How much of the nameplate capacity you take out before the device browns out. 80% for Li-ion, 50% for lead-acid, 90% for a primary cell run to exhaustion.
%
Capacity lost to cold, ageing, cell-to-cell spread and pulse-load internal resistance. 10% is generous, 25% is honest for a coin cell driving a radio.
%
Percent of nameplate capacity lost per month sitting on a shelf. Li-ion 2–3%, alkaline 0.3%, NiMH (LSD) 1%, lithium thionyl chloride under 0.1%.
The active burst dominates: it is 98% of the average load current. Shortening the awake time or lowering the transmit power moves the needle more than any further sleep-current work.
Usable capacity is 72% of nameplate — 1872 mAh of 2600 mAh — after 80.0% depth of discharge and 10.0% derating for temperature, ageing and pulse-load losses.
Diagram
Worked examples
LoRaWAN sensor waking once an hour
An 18650 running a class-A node that wakes, reads a sensor and transmits for three seconds every hour. The canonical low-power design.
17,500 h — 729 days, just under two years, with 63% of the drain lost to self-discharge
BLE beacon on a CR2032
A coin cell advertising for 2 ms every second. Watch the derating: a CR2032 has 10–20 Ω of internal resistance and hates the pulse.
9,160 h — about 12.5 months, not the two years the 225 mAh label implies
Why is my ESP32 dead in three days?
A 2,000 mAh LiPo, a dev board waking for eight seconds every fifteen minutes — and a board-level 15 mA that never sleeps because of the USB-serial chip and the on-board regulator.
85 h — 3.5 days. The 15 mA that never sleeps is 93% of the average current
Boost converter from a single AA
A 3.3 V load fed from one 1.5 V alkaline cell through a boost converter. The reason single-cell designs disappoint.
1,090 h — 45 days. The cell has to supply 1.55 mA to deliver 0.62 mA to the load
Always-on device — no duty cycling at all
A 150 mA load running continuously from an 18650. Sleep current is irrelevant here; only capacity and depth of discharge matter.
12.5 h — usable capacity divided by 150 mA, and nothing else matters
Why capacity ÷ current is always optimistic
When to use this: you have a battery-powered design — a sensor node, a beacon, a datalogger, a handheld tool — and you need to know whether it lasts a week, a season or the five years the specification asks for. This page is about how long a load runs. If the question is how big a bank to buy in the first place, the solar battery sizing calculator works the problem from the other end.
Almost every battery life estimate starts as one division: capacity in milliamp-hours over current draw in milliamps, giving hours. A 2,600 mAh cell feeding 0.4 mA gives 6,500 hours, about nine months. That number is wrong in a predictable direction — it is always too high, and usually by between 30% and 300%. There are four reasons, and the calculator above puts each of them on the screen so you can see which one is actually hurting you.
You never get the nameplate capacity out. The label is measured under laboratory conditions, at room temperature, at a gentle continuous drain, discharged all the way down to a terminal voltage your circuit stopped working at long ago. Your device browns out when the regulator drops out or the microcontroller hits its undervoltage threshold, and for rechargeable chemistries you also stop early to protect cycle life. That fraction is the depth of discharge, and on top of it sits a derating for cold, ageing, cell-to-cell spread and the capacity a high internal resistance swallows under pulse loads. Eighty per cent depth of discharge with 15% derating leaves 68% of the label.
Your average current is not your active current. Duty-cycled devices spend most of their life asleep, so the average is a weighted blend of two very different numbers. Get the weighting wrong by a factor of two and the runtime moves by a factor of two.
The current you measured at the load is not the current the cell supplies. If anything sits between the battery and the circuit — an LDO, a buck, a boost — the translation is not one to one, and for a boost converter it is dramatically not one to one.
The cell is discharging itself the whole time. Self-discharge is a constant background drain that does not care whether your firmware is efficient. Below roughly 50 µA of average load it is the term that decides the answer, and it is the term nearly every other calculator on the internet leaves out entirely.
The duty-cycle model in plain English
A low-power device does one thing over and over: it sleeps, it wakes up, it does some work, it goes back to sleep. Call the whole repeating interval the cycle — one hour for a sensor that reports hourly, one second for a beacon that advertises every second. The fraction of that cycle spent awake is the duty cycle.
The insight is that you do not need to simulate the on/off waveform to predict runtime. Over thousands of cycles, a load that pulls 45 mA for 3 seconds every hour removes exactly as much charge as a load that pulls a steady 37.5 µA forever. Charge is charge; the battery cannot tell the difference. So you flatten the whole schedule into one equivalent constant current — the time-weighted average of the awake current and the asleep current — and divide usable capacity by it.
Written out, three seconds of activity per hour is 3 / 3600 = 0.083% duty cycle. The awake term contributes 45 mA × 0.00083 = 37.5 µA. The asleep term contributes the sleep current multiplied by the remaining 99.917%, which is essentially the whole sleep current. If the board sleeps at 5 µA, the total average is about 42.5 µA and the burst is dominant. If it sleeps at 500 µA — entirely normal for a development board with a USB-serial chip and a cheap always-on regulator — the average is 537 µA, the burst is irrelevant, and no amount of radio optimisation will save you.
This is why the calculator reports which of the two terms is winning. It changes what you should work on. At very low duty cycles, shaving microamps off sleep is worth more than anything you can do to the transmission. Once the duty cycle climbs above a fraction of a per cent, shortening the awake burst or dropping transmit power pays better.
One honest adjustment: include retries. A node that fails to get an acknowledgement and retransmits three times has quadrupled its duty cycle for that cycle. If 10% of your uplinks retry twice, budget for it — a 20% duty-cycle error is a 20% runtime error.
The formula, with every term defined
The whole model is four lines:
I_avg = I_active × D + I_sleep × (1 − D) I_cell = I_avg × k_reg I_self = C_Ah × (S / 100) / 730.5 t = C_Ah × DoD × (1 − k_derate) / (I_cell + I_self)
Symbol
Meaning
Units
Where it comes from
C_Ah
Nameplate capacity
Ah (mAh ÷ 1000)
Cell datasheet — verify it, cheap cells lie
I_active
Current while awake
A
Measured average over the whole burst, including radio ramp-up
I_sleep
Current between wake-ups
A
Includes regulator quiescent current, pull-ups, leakage
D
Duty cycle
fraction, 0–1
Awake time ÷ total cycle time
k_reg
Regulator referral factor
ratio
1 for none and LDO; V_out / (V_in × η) for buck and boost
S
Self-discharge rate
% of nameplate per month
Chemistry, and it roughly doubles per 10 °C
DoD
Depth of discharge
fraction, 0–1
How far down you run before brown-out or cycle-life damage
k_derate
Real-world derating
fraction, 0–1
Cold, ageing, pulse losses, cell spread
t
Runtime
hours
The answer, also given in days and years
The 730.5 is hours per average month, derived from a 8,766-hour Julian year so that the hours, days and years results stay mutually consistent rather than drifting apart by a few per cent.
Battery chemistry reference
Capacity is only one of four numbers that matter, and it is the one people quote in isolation. Nominal voltage decides the energy, self-discharge decides whether a very low-power design is even possible, and usable depth of discharge decides how much of the label you can spend.
Cell
Typical capacity
Nominal voltage
Self-discharge
Usable DoD
Alkaline AA
2,000–2,900 mAh at low drain
1.5 V, sloping to 0.9 V
~0.3%/month
90% (primary, run to exhaustion)
Li-ion 18650
2,000–3,500 mAh
3.7 V (4.2–3.0 V)
2–3%/month
80%
LiPo pouch
100–10,000 mAh
3.7 V (4.2–3.0 V)
2–5%/month
80%
CR2032 coin
210–240 mAh at 0.2 mA
3.0 V, sloping to 2.0 V
~1%/year
90% at low drain, far less pulsed
LiFePO4
1,000 mAh to 300 Ah
3.2 V, very flat
2–3%/month
80–90%, thousands of cycles
Two entries deserve a warning. The CR2032 is the most over-promised cell in electronics: 225 mAh is real at a couple of hundred microamps, but the 10–20 Ω internal resistance means a 10 mA radio pulse collapses the terminal voltage, and usable capacity under pulsed loads is commonly 20–30% below nameplate. Put that in the derating field rather than pretending it is not happening. The alkaline AA is the other: its voltage slopes continuously from 1.5 V to 0.9 V, so a circuit with a 1.2 V minimum throws away a large part of the cell before it is remotely empty. Flat-discharging chemistries such as LiFePO4 are far easier to design around, which is a real advantage the capacity figure does not show.
What the regulator does to your runtime
This is the single most common error in published battery life estimates, and it is worth being precise about. A switching converter conserves power, not current. The current your meter reads on the regulated rail is not the current leaving the cell.
Topology
Current drawn from the cell
Effect on runtime
What to watch
None — direct from cell
Exactly the load current
Baseline; the naive division is correct here
Load must tolerate the full voltage swing of the cell
LDO
Load current, unchanged
Unchanged in current terms; energy wasted as heat
Quiescent current adds directly to sleep — a 50 µA LDO out-drinks a 2 µA MCU twenty-five times over
Buck (step-down)
I_load × V_out / (V_in × η) — less than the load current
Extends runtime versus an LDO on any large voltage drop
Efficiency collapses at microamp loads; check the light-load curve
Boost (step-up)
I_load × V_out / (V_in × η) — more than the load current
Shortens runtime, often by more than 2×
Gets worse as the cell sags, because V_in falls as it empties
Make it concrete. A load pulling 100 mA at 3.3 V from a single 1.5 V alkaline cell through a boost converter at 90% efficiency does not draw 100 mA from the cell. It draws:
I_cell = 100 mA × (3.3 V / 1.5 V) / 0.9 = 244 mA
Nearly two and a half times the figure a naive calculator uses, so the runtime is nearly two and a half times shorter. And it gets worse as the cell discharges: at 1.1 V the same load pulls 333 mA. Almost every competing battery life calculator asks for a current and a capacity and stops there, which means every single-cell boost design it is used on is overestimated by a factor of two or more. The regulator selector above exists precisely to catch this.
The LDO row is the mirror image and is also widely misunderstood. An LDO is a series pass element: it passes the load current straight through and burns the surplus voltage as heat. Running a 3.3 V load from a 4.2 V Li-ion through an LDO wastes 21% of the energy but does not shorten runtime in milliamp-hour terms at all — because milliamp-hours are charge, and the charge passes through unchanged. What does shorten runtime is the regulator’s own quiescent current, which never sleeps.
Self-discharge: the term nearly every calculator drops
Every cell loses charge internally with nothing connected to it. Manufacturers quote it as a percentage of nameplate capacity per month, and the numbers look harmless until you convert them into an equivalent constant current.
A 2,600 mAh Li-ion cell losing 2% a month is losing 52 mAh per month, which over 730.5 hours is a constant 71 µA. If your design averages 40 µA, the battery is flattening itself nearly twice as fast as your circuit is using it. Self-discharge is 64% of the total drain, and the runtime a calculator that ignores it would report is not slightly optimistic — it is 2.8 times too long. Every microamp your firmware team claws back moves the answer by almost nothing, because they are optimising the smaller of two terms.
This is the reason serious multi-year designs change chemistry rather than firmware. Lithium thionyl chloride (LiSOCl₂) cells self-discharge at well under 1% per year, which is why they are in every utility meter and industrial wireless sensor that claims a ten-year life. A low-self-discharge NiMH cell holds charge far better than a standard one. Alkaline is roughly 0.3% per month, and a coin cell is around 1% per year — genuinely good, and part of why coin cells suit ultra-low-duty applications despite their tiny capacity.
Two practical consequences. First, temperature: self-discharge roughly doubles for every 10 °C of temperature rise, so a sensor in a warm loft has a materially shorter shelf life than one in a cellar, even though the cold cellar hurts delivered capacity instead. Second, there is a ceiling on any battery life prediction. If the calculator returns a runtime approaching the time the cell would take to flatten itself with no load at all, the answer has stopped being a load calculation and become a shelf-life estimate — and seal leakage, electrolyte dry-out and capacity fade will decide it before your firmware does. The calculator says so explicitly when you cross that line.
The Peukert caveat for lead-acid
Everything above assumes capacity is independent of discharge rate. For lithium and alkaline chemistries at sensible currents that is close enough. For lead-acid it is not, and the error runs the wrong way.
Peukert’s law describes how a lead-acid cell delivers less total charge the faster you take it out. A 100 Ah battery is rated at the 20-hour rate — 5 A for 20 hours. Pull 50 A from it and you do not get two hours; with a typical Peukert exponent of 1.2 to 1.3 you get closer to 60–75 minutes, an effective capacity nearer 55–65 Ah. Flooded cells are worse than AGM, and old cells are worse than new ones.
This calculator does not model Peukert directly, because for the duty-cycled electronics it is aimed at the discharge rates are a tiny fraction of C and the effect is negligible. If you are working with lead-acid at anything above about C/10, put the loss in the derating field: 25–35% is a realistic figure at a one-hour rate. And keep the depth of discharge at 50% — lead-acid cycle life roughly triples going from 80% depth of discharge down to 50%, the same trade-off that governs off-grid bank sizing.
Measuring the numbers you feed in
Measure sleep current with an instrument that can see microamps. A standard multimeter’s burden voltage on the µA range can brown out the device under test, and its sampling rate will miss the wake-up spikes entirely. A dedicated low-current analyser or a sense resistor and a scope is the honest way.
Average the whole burst, not the peak. The active figure should include crystal start-up, radio association, the transmission itself and the receive window afterwards. Peak transmit current tells you what the cell’s internal resistance has to cope with; it is the wrong number for the energy budget.
Measure at the battery terminals. That way the regulator’s quiescent current and any board-level leakage are already included, and the regulator referral is handled for you.
Verify the cell. Capacity printed on unbranded cells is frequently optimistic by 30% or more. One discharge test on one sample costs an afternoon and settles the argument.
Test cold if it will be deployed cold. An alkaline cell delivers roughly half its rated capacity at −20 °C, and Li-ion loses 20–30% at 0 °C and must not be charged below freezing at all.
How to use this calculator
Enter the cell, not the pack label
Use the nameplate capacity in mAh and the nominal voltage of one cell (or of the series string, if cells are stacked). Capacity written on cheap cells is frequently optimistic by 30% or more — if the runtime matters, measure one cell with a discharge tester first.
Measure active and sleep current, do not trust the datasheet
Put a current meter capable of microamps in series with the battery. The active figure should be the average over the whole awake burst including radio ramp-up, and the sleep figure must include the regulator quiescent current, pull-up resistors and every peripheral you did not explicitly power down.
Work out the duty cycle honestly
Duty cycle is awake time divided by total cycle time. Three seconds of activity per hour is 3 / 3600 = 0.083%. Include retries: a LoRaWAN node that misses an acknowledgement and retransmits three times has tripled its duty cycle for that hour.
Set the regulator topology
If the load sits behind a boost converter, the current drawn from the cell is higher than the current you measured at the load, by the voltage ratio and again by one over the efficiency. A buck converter works the other way. An LDO passes current straight through and turns the surplus voltage into heat.
Derate for reality, then read the runtime
Set depth of discharge for how far you actually run the cell down before brown-out, add a derating for cold, ageing and pulse losses, and enter the self-discharge from the datasheet. The runtime is then given in hours, days and years, with the self-discharge share alongside so you can see which term is limiting you.
Frequently asked questions
How do I calculate battery life from mAh?
Divide usable capacity in mAh by the average current draw in mA to get hours. Usable capacity is not the number on the label: multiply the nameplate by your depth of discharge and by a derating factor for temperature and ageing. A 2,600 mAh cell run to 80% depth with 10% derating gives 1,872 mAh usable, so a 0.41 mA average load lasts about 4,570 hours rather than the 6,340 hours the raw division suggests.
Why does my device die far sooner than the calculator predicted?
Four reasons, in order of how often they bite. The sleep current is higher than you think — dev boards routinely draw 10–20 mA in "deep sleep" because of the USB-serial chip and the on-board LDO. The active burst is longer than you think, because a radio spends time associating before it transmits. The cell delivers less than its label at cold temperatures and under pulse loads. And self-discharge is quietly eating capacity the whole time.
Does a boost converter really shorten battery life?
Yes, and by more than most people expect. A converter conserves power, not current. Drawing 100 mA at 3.3 V from a 1.5 V cell at 90% efficiency means the cell supplies 100 mA × (3.3 / 1.5) / 0.9 ≈ 244 mA. The runtime you get from a single AA is therefore roughly 2.4 times shorter than the naive capacity-divided-by-load-current figure. This is the single most common mistake in published battery life estimates.
What is self-discharge and when does it matter?
Every cell loses charge internally even with nothing connected — typically 2–3% of capacity per month for Li-ion, about 0.3% for alkaline and under 0.1% for lithium thionyl chloride. On a 2,600 mAh Li-ion cell, 2% a month is an equivalent constant drain of about 71 µA. If your average load is under that figure, the battery is flattening itself faster than your circuit is using it, and no amount of firmware optimisation will help.
How long will a CR2032 run my BLE beacon?
A CR2032 holds about 225 mAh, but only at low continuous currents. Its 10–20 Ω internal resistance means a 10 mA radio pulse drops the terminal voltage sharply, and the usable capacity at pulse loads is commonly 20–30% below nameplate. Realistically, a beacon advertising every second with a 6 mA, 2 ms burst averages around 14 µA and runs somewhere between eight and fourteen months, not the two years a naive division suggests.
Should I reduce sleep current or shorten the active burst?
Compare the two contributions. Sleep contributes I_sleep × (1 − D) to the average and the burst contributes I_active × D. At very low duty cycles sleep almost always dominates, so shaving microamps is worth far more than optimising the radio. Once the duty cycle rises above a fraction of a percent the burst takes over, and shortening the awake time or lowering transmit power pays better. The calculator states which side is winning.
Why can I not use the full capacity of the battery?
Because your circuit browns out before the cell is empty. Depth of discharge is the fraction you can actually extract before the terminal voltage falls below your regulator dropout or your microcontroller brown-out threshold, and for rechargeable cells it also sets cycle life — Li-ion cycled to 100% lasts a fraction as long as one cycled to 80%. Lead-acid should not go below 50% state of charge at all.
Does the calculator account for temperature?
Through the derating factor, which is where you should put it. Capacity falls sharply in the cold: a typical alkaline cell delivers roughly half its rated capacity at −20 °C, and Li-ion loses about 20–30% at 0 °C and must not be charged below freezing. Self-discharge moves the other way and roughly doubles for every 10 °C of temperature rise, so a warm cupboard is as bad for a long-life sensor as a cold one.