Battery Life Calculator

How long a battery lasts with a constant or duty-cycled load (deep sleep), and how long charging takes – with usable capacity, energy and C rate.

Runs locally in your browser
mAh
A
V
Runtime
16 h
Average current100 mA

Self-discharge, regulator quiescent current and temperature are not included – for runtimes of months, add them to the sleep current.

About this tool

How long does a 2000 mAh battery last at 100 mA? The runtime is the usable capacity divided by the average current. Because a battery is never fully discharged and loses capacity with age and cold, the calculator uses 80 % of the rated capacity by default.

For devices that mostly sleep and only wake up briefly – an ESP32 or Arduino in deep sleep, for example – enter the active time, period and sleep current; they give the average current. The second mode calculates the charge time for a charge current and a charge range, with the C rate.

How it works

  1. Choose “Runtime” or “Charge time” and enter the capacity in mAh.
  2. For the runtime: enter the current for a constant load, or choose “Cyclic” and enter the active current, active time, period and sleep current (currents in A with a prefix, e.g. 80m or 10µ).
  3. For the charge time: enter the charge current, the start and target state of charge and the efficiency.

Frequently asked questions

Why only 80 % usable capacity?

The rated capacity applies at an ideal temperature and a small discharge current down to the cut-off voltage. In practice the device often shuts down earlier, cells age, and capacity drops in the cold. 80 % is a common safety margin; you can change it.

How do I calculate the runtime with deep sleep?

Average current = active current · active share + sleep current · (1 − active share). An ESP32 drawing 80 mA for 2 s every 5 min and 10 µA in deep sleep averages about 0.54 mA – a 2500 mAh battery lasts around 5 months.

What is the C rate?

Charge current divided by capacity: 1000 mA into a 2000 mAh battery is 0.5 C. Many Li-ion cells are charged at 0.5–1 C; the datasheet gives the maximum.

Why does charging take longer than capacity divided by current?

Some energy is lost as heat, and Li-ion batteries are charged from about 80 % at constant voltage with a falling current. The efficiency (85 % by default) approximates that; going from 20 to 80 % is therefore relatively faster.

How do I find the current of my circuit?

Measuring is best. For single parts Ohm’s Law Calculator helps, and an LED’s current is set by its series resistor, which you work out with the LED Resistor Calculator calculator.