How do you convert mAh to hours of battery life?
Divide the usable capacity by the average current: hours = mAh × k ÷ mA, where k is the fraction you can really use (about 0.85 for most batteries). A 3000 mAh 18650 cell powering a 120 mA load lasts about 21 hours. Put the same load to sleep at 10 µA and wake it for 3 seconds every 10 minutes, and the average falls to 610 µA, so the cell lasts 5.7 months.
The hard part is the average current, not the division. For a device that sleeps and wakes, the simulation draws the current waveform on a log scale with the average marked, shows how much of the drain comes from waking and how much from sleeping, and runs the battery down in front of you. A power bank mode converts the 3.7 V label capacity to what the 5 V USB port can deliver. For the full power bank story, read how long a 10000 mAh power bank really lasts.
Key results from the simulation
- Sleep current decides long life: an ESP32 sensor that wakes for 3 s every 10 minutes lasts 5.7 months on 3000 mAh if it sleeps at 10 µA. On a development board whose regulator and USB chip draw 4 mA while the chip sleeps, the same code lasts 23 days.
- Waking less often helps more than a bigger battery: waking every minute instead of every 10 minutes raises the average from 610 µA to 6.01 mA, and life drops from 5.7 months to 18 days.
- A power bank gives about 60 percent of its label at 5 V: 10,000 mAh at 3.7 V is 37 Wh. After an 82 percent efficient boost to 5 V that is 6068 mAh, about 1.4 charges of a 5000 mAh phone.
- Alkaline cells lose capacity at high current: an AA gives about 2950 mAh at 25 mA but only about 1350 mAh at 500 mA, so a high-drain gadget runs 2.4 hours, not the 4.5 hours the label suggests.
Six setups worth trying
Each button loads the setup into the simulation. The usable fraction is 85 percent unless stated, and the current figures are typical values, not measurements of one board.
An ESP32 sensor that reports every 10 minutes
3000 mAh 18650, deep sleepThe chip wakes, joins Wi-Fi, sends a reading and goes back to deep sleep. Call it 120 mA for 3 seconds, a typical average while the radio is on, then 10 µA for the rest of the 600 second cycle. The average is (120 × 3 + 0.01 × 597) ÷ 600 = 610 µA.
Waking accounts for 98% of the charge used, so the 10 µA sleep hardly matters here. With 85 percent of 3000 mAh usable the cell lasts 4181 hours, which is 5.7 months. Shorter Wi-Fi connections (a static IP, a saved channel) help more than anything else.
The same code on a development board
4 mA asleep, from the board, not the chipThe ESP32 chip sleeps at microamps, but a typical development board keeps its voltage regulator, USB to serial chip and power LED running. Measurements of boards like the DevKitC show several milliamps in deep sleep. Set the sleep current to 4000 µA and the average rises to 4.58 mA.
Now sleeping uses 87% of the charge and life falls to 23 days. For battery projects use a board built for low power, or power the module directly from a low-quiescent regulator.
A Bluetooth beacon on a CR2032
235 mAh coin cell, 8 mA pulsesA beacon sends a short radio burst, about 8 mA for 5 ms, once a second and sleeps at 2 µA in between. The average is only 42 µA, so a 235 mAh coin cell lasts 6.5 months even at 85 percent usable.
Coin cells have a high internal resistance and are rated at tiny currents. Longer or stronger pulses make the voltage sag, and the cell can reach its cut-off with charge still inside. Keep pulses short and add a capacitor across the cell for the peaks.
An LED torch on two AA cells
2 × AA in series, 20 mA steadyTwo AA cells in series make 3 V but still hold 2500 mAh: series adds volts, not milliamp hours. At a steady 20 mA, with 90 percent usable, they run 113 hours, which is 4.7 days.
This is the simple case: mAh ÷ mA = hours. The derating stands for the cut-off voltage of the device. Many 3 V gadgets stop working when two alkaline cells fall to around 2 V, before the cells are truly empty.
An alkaline AA in a high-drain gadget
500 mA steadyAlkaline chemistry cannot keep up with large currents. Energizer's E91 datasheet shows about 2500 mAh at 100 mA but roughly 1350 mAh at 500 mA. The calculator reads that curve, so the effective capacity drops to 1350 mAh and the runtime to 2.4 hours.
A nickel metal hydride (NiMH) rechargeable of 2000 mAh keeps most of its capacity at this current, which is why it outlasts an alkaline in cameras, toys and game controllers.
A 10000 mAh power bank charging a phone
3.7 V cells, 5 V USB, 82% boostThe 10,000 mAh on the label is the charge of the lithium cells at 3.7 V, which is 37 Wh. The USB port runs at 5 V, so even a perfect converter could deliver only 7400 mAh at 5 V. With the 82 percent efficiency Anker quotes, it is 6068 mAh, or 30.3 Wh.
A 5000 mAh phone battery holds 19.3 Wh, and the phone loses roughly 10 percent more while charging. That gives 1.4 full charges. At a steady 1 A the bank lasts 6.1 hours.
ESP32 on a 3000 mAh cell: how the wake interval sets battery life
| Wakes | Average current | Waking share | Life at 10 µA sleep | Life at 4 mA sleep |
|---|---|---|---|---|
| Every 10 s | 36 mA | 100% | 3.0 days | 2.7 days |
| Every minute | 6.01 mA | 100% | 18 days | 11 days |
| Every 5 min | 1.21 mA | 99% | 2.9 months | 21 days |
| Every 10 min | 610 µA | 98% | 5.7 months | 23 days |
| Every hour | 110 µA | 91% | 2.6 years | 26 days |
| Once a day | 14.2 µA | 29% | 20.5 years | 27 days |
Each wake is 120 mA for 3 s. 85 percent of 3000 mAh usable. The last column is a development board whose regulator and USB chip draw 4 mA while the chip sleeps. Self-discharge, about 2 to 3 percent a month for lithium-ion, is not included and matters for the longest runs.
How the calculator works
For a steady load the average current is just the load. For sleep and wake it is the time-weighted mean over one cycle: I = (I_awake × t_awake + I_asleep × (T − t_awake)) ÷ T. The waking share is I_awake × t_awake divided by I × T, the fraction of each cycle's charge used while awake.
Runtime is usable charge divided by average current: hours = mAh × k ÷ mA. The usable fraction k (85 percent by default) stands for the device's cut-off voltage, cold, ageing and the regulator. A lithium cell has some charge left below 3.0 V that most devices cannot use.
For alkaline AA cells the capacity also depends on current. The simulation interpolates Energizer's E91 datasheet values: about 2950 mAh at 25 mA, 2500 at 100 mA, 1750 at 250 mA and 1350 at 500 mA, to 0.8 V.
Energy is mAh × volts ÷ 1000, in Wh. In power bank mode the charge at 5 V is mAh × 3.7 × efficiency ÷ 5, and phone charges are the delivered Wh × 0.9 (losses inside the phone) divided by the phone battery's Wh at 3.85 V.
What the model leaves out
- Self-discharge: batteries lose charge on the shelf. Over a year this can matter more than a microamp sleep current.
- Voltage sag and internal resistance: large pulses pull the voltage down, especially in coin cells and cold batteries, and a device may reset before the battery is empty.
- Temperature: capacity falls in the cold. An alkaline cell near freezing gives a fraction of its room-temperature capacity.
- The regulator: a linear regulator wastes the voltage difference, and a switching regulator has its own efficiency curve. The derating factor lumps these together.
- Ageing: a lithium cell loses capacity with cycles and years, often 20 percent after a few hundred cycles.
- Phone charging curve: a phone charges slowly near full, and the bank may shut off below a minimum current. The model treats charging as a steady flow of energy.
Common misconceptions
"mAh measures energy." It measures charge. Energy is mAh times volts. A 3000 mAh phone battery at 3.85 V holds more energy than a 3000 mAh pack at 1.2 V.
"Two batteries always give twice the life." In series they double the voltage and keep the same mAh. Only in parallel, or with a regulator that uses the extra voltage, do they double the runtime.
"A 10000 mAh power bank charges a 5000 mAh phone twice." The label is at 3.7 V, the port is at 5 V, and both conversions waste energy. One and a half charges is more realistic.
Frequently asked questions
How do I calculate battery life from mAh?
Divide the capacity in mAh by the load current in mA to get hours, then multiply by about 0.85 for the part you can really use. A 2000 mAh battery at 100 mA lasts about 17 hours.
How long will a 3000 mAh battery last?
It depends on the current: about 26 hours at 100 mA, 2.5 hours at 1 A, and 5.7 months for an ESP32 that averages 610 µA, all with 85 percent usable.
How long does an ESP32 last on a battery?
Always on with Wi-Fi it draws around 100 mA or more, so a 1000 mAh LiPo lasts about 7.1 hours. With deep sleep and a 3 s wake every 10 minutes, a 3000 mAh cell lasts about 5.7 months, if the board's own sleep current is low.
Why does my power bank give less than its rated mAh?
The rating is for the internal cells at 3.7 V. The USB port is at 5 V and the boost converter loses about 18 percent, so a 10000 mAh bank delivers about 6068 mAh at 5 V.
What is the difference between mAh and Wh?
mAh is charge and Wh is energy. Multiply mAh by the battery voltage and divide by 1000 to get Wh. Wh lets you compare batteries of different voltages, and airlines use it for their limits.
Keep learning
How Long Does a 10000mAh Power Bank Really Last?
A 10000 mAh power bank delivers about 6000 mAh at 5 V, roughly 1.4 charges of a 5000 mAh phone. The maths of 3.7 V, 5 V and conversion loss.
Why Phone Charging Slows After 80%: The CC-CV Curve
Fast charging fills a phone from 0 to 70% at full current, then a fixed voltage limit makes the current taper. The physics, the plating risk and the math.
LiPo C Rating Explained: Current, Sag and Real Limits
A 5000 mAh 50C LiPo is rated for 250 A, but at 3 milliohms per cell that current sags each cell by 0.75 V. What the C rating means and how to check it.
How Long Will a 150Ah Battery Last With Fans, TV and a Fridge?
Two fans, four bulbs, a TV and a fridge get about 3 hours from a 150Ah tubular battery, not the 3.6 the brochure formula says. Here is the maths and the fixes.