Battery Life Calculator

Estimate how long a battery will last from its mAh or Wh, the load current or power, usable capacity and sleep/active duty cycle.

  • Free, no signup
  • Works on mobile
  • Formula + worked example

How to use the battery life calculator

  1. Pick a battery preset or type your own capacity (mAh, Ah or Wh) and nominal voltage. Presets are typical values — the label on your battery is better.
  2. Set the usable capacity. 80 % is a sensible default: cut-off voltage, temperature, age and high currents all reduce what you really get.
  3. Choose how you know the load:
    • Current — the average current your circuit draws (measure it with a multimeter in series).
    • Power — the load's power in watts, plus the efficiency of the regulator between the battery and the load.
    • Duty cycle — for circuits that wake up, do some work and go back to sleep (ESP32 deep sleep, data loggers, remote sensors).
  4. Read the runtime, average current, C-rate and charge used per day. Red and yellow notes warn when the current is too high for the battery type.

Formula

Usable capacity (mAh) = Rated capacity × Usable % Runtime (h) = Usable capacity (mAh) ÷ Load current (mA) Capacity (Wh) = Capacity (mAh) × Voltage ÷ 1000 Battery current (A) = Load power ÷ Efficiency ÷ Battery voltage Average current = (I_active × t_active + I_sleep × t_sleep) ÷ (t_active + t_sleep)

The C-rate is the current divided by the capacity: 500 mA from a 2500 mAh pack is 0.2 C. The higher the C-rate, the less of the rated capacity you actually get.

Typical battery capacities and safe currents

BatteryNominal voltageTypical capacityComfortable current
AA alkaline1.5 V~2000–2800 mAh at low currentup to ~100 mA; much less capacity above that
4 × AA holder6 Vsame as one AAsmall gear motors, with reduced runtime
9 V PP3 alkaline9 V~400–600 mAhtens of mA — not for motors
18650 Li-ion3.7 V2000–3500 mAh1–2 C for standard cells; more for high-drain cells
1S LiPo pouch3.7 Vas labelledcheck the C rating
CR2032 coin cell3 V~220 mAhabout 3 mA continuous, short pulses up to ~10–15 mA

These are typical figures for planning. Always check the datasheet of the exact battery you use.

Typical currents to start with

LoadTypical current
Arduino Uno board, idleabout 40–50 mA
ESP32 board with Wi-Fi onabout 80–250 mA, with short peaks
ESP32 chip in deep sleepabout 10 µA (dev boards draw far more)
Small BO gear motor, runningabout 100–200 mA each
HC-SR04 ultrasonic sensorabout 15 mA
Standard LED10–20 mA

Common mistakes

  • Using the chip's sleep current for a whole dev board. An ESP32 chip sleeps at about 10 µA, but a dev board's USB-serial chip, power LED and regulator can draw around 1 mA or more. At 1 mA sleep, the sensor above lasts about 55 days instead of 153.
  • Forgetting the regulator. A linear regulator (like the 7805 or an LM317) wastes the voltage difference as heat — use the Power mode with the right efficiency, or see the LM317 calculator.
  • Mixing mAh across voltages. 2500 mAh at 7.4 V is twice the energy of 2500 mAh at 3.7 V. Compare batteries in Wh when the voltages differ.
  • Ignoring motor peaks. Motors draw several times their running current when starting or stalled. Use the average for runtime, but size the battery for the peaks.

Thin wires also waste battery power — check them with the wire gauge and voltage drop calculator. Choosing between 18650, LiPo and AA packs? Read the robot battery guide and the L298N robot car guide. Ready to build? Browse our robotics kits.

Frequently asked questions

How do I calculate battery life from mAh?+

Divide the usable capacity by the load current. A 2500 mAh battery used to 80 % gives 2000 mAh; at 500 mA it lasts 2000 ÷ 500 = 4 hours. Use the average current if the load changes over time.

Why use only 80 % of the rated capacity?+

You never get the full rated mAh in practice. The circuit stops working at a cut-off voltage, capacity falls at high currents and low temperatures, and batteries lose capacity as they age. 70–90 % is a realistic planning range.

How long will an ESP32 last on an 18650 battery?+

It depends almost entirely on how often it wakes up. Waking every 5 minutes for 2 s at 80 mA and sleeping at 10 µA averages about 0.54 mA, so 2000 mAh of usable capacity lasts about 153 days. A dev board that sleeps at 1 mA lasts only about 55 days.

Can I run a robot from a 9 V battery?+

Not well. A 9 V PP3 battery is made for low currents of a few tens of milliamps. Robot motors draw hundreds of milliamps, so the voltage collapses and the battery is flat in minutes. Use a 4 × AA holder or a 2S 18650 Li-ion pack.

What is the difference between mAh and Wh?+

mAh measures charge, Wh measures energy. Wh = mAh × voltage ÷ 1000. A 2500 mAh pack at 7.4 V stores 18.5 Wh, twice as much as a 2500 mAh cell at 3.7 V, so compare batteries of different voltages in Wh.

From the Thinking Robot store

Shop all
All tools
WhatsApp