Battery Life Calculator
How long a battery lasts on a constant or duty-cycled load, with usable-capacity derating and Peukert's law, or the capacity a target runtime needs.
Currents accept 150 mA, 5 µA or 0.2 A (no unit means mA); times accept 100 ms, 10 s, 5 min or 2 h.
Ignores self-discharge and voltage sag; a constant current and the rated capacity are assumed within each cycle.
How to use
- Choose Runtime or Required capacity, and a constant or duty-cycled load.
- Enter the battery's capacity (mAh, Ah or Wh), its nominal voltage and the usable share; then the load current, or the active current, active time, sleep current and cycle period.
- Read the runtime, average current and power; tick Peukert's law for lead-acid batteries and enter its exponent and rated hours.
About this tool
ShowHide
Estimates how long a battery will run a device, or how big a battery a target runtime needs. For a steady load the answer is capacity divided by current. Most battery-powered electronics are not steady, though: a sensor wakes, measures, transmits and sleeps again, so the tool also takes an active current, how long it lasts, the sleep current and how often the cycle repeats, and works out the average current the battery really sees.
That average is where the surprises are. A sensor drawing 20 mA for 100 ms every 10 seconds and 5 µA asleep averages about 205 µA, so a 2000 mAh cell lasts roughly 9,760 hours — a little over 13 months. The tool shows what share of the charge goes to the active bursts and warns when sleep current is the bigger drain, because at long intervals a few microamps of leakage, a regulator's quiescent current or a forgotten pull-up resistor can outweigh the radio entirely.
Real batteries rarely deliver their full rating. The usable-capacity field derates it for the cut-off voltage of your circuit, cold temperatures and ageing; 70–90 % is a common planning range, and the tool leaves it at 100 % until you choose. Capacity can be entered in mAh, Ah or Wh; Wh is converted with the nominal voltage, which is also used for the energy and average-power figures.
For lead-acid batteries, Peukert's law corrects for the capacity lost at high current. A battery rated C amp-hours over H hours lasts H·(C/(I·H))^k at a current I, where k is typically 1.1–1.3 for lead-acid and close to 1.05 for lithium-ion. A 100 Ah battery rated over 20 hours with k = 1.2 runs a 20 A load for about 3.8 hours, not the 5 hours plain division suggests. The law describes a constant current, so with a pulsed load it is only an approximation.
The reverse mode takes a target runtime and returns the capacity needed, in Ah and Wh, applying the same derating and Peukert correction. The model ignores self-discharge, which matters over years (a few percent per month for NiMH, much less for lithium primaries), and the voltage sag that can reset a device before the cell is empty. All figures are computed in your browser.
Frequently asked questions
Why does my sensor's battery die so much sooner than the datasheet current suggests?
Because the average, not the active current, drains it, and small constant currents add up. A 20 mA burst of 100 ms every 10 s averages 200 µA; add 50 µA of sleep current and the average rises by a quarter. Measure the sleep current of the whole board, including regulators and pull-ups, not just the microcontroller.
What should I enter as usable capacity?
The share of the rated capacity your device can actually use. It depends on the voltage at which your circuit stops working, the temperature and the battery's age. 80 % is a reasonable planning figure for a new cell at room temperature; use less in the cold or if the device needs a high minimum voltage.
When should I use Peukert's law?
For lead-acid batteries discharged faster than their rating, where capacity falls noticeably at high current. Use k from the manufacturer if you have it (typically 1.1–1.3) and the rated hours of the capacity figure, often 20 h. For lithium-ion, k is close to 1.05 and the correction is small; leave it off for low currents.
How is a capacity in Wh converted?
By dividing by the nominal voltage you enter: 7.4 Wh at 3.7 V is 2 Ah. Use the battery's nominal voltage, not its full-charge voltage, because the Wh rating is calculated from the nominal one.
Does the estimate include self-discharge?
No. Over months it matters: NiMH loses several percent a month, lithium-ion 1–3 %, and lithium primary cells well under 1 % a year. For runtimes of a year or more, reduce the usable capacity by the expected self-discharge.
Why does a current typed without a unit read as mA?
Because battery loads are usually quoted in milliamps. Add a unit to be explicit: 150 mA, 5 µA (or 5 uA) and 0.2 A all work, and times accept ms, s, min and h.
Related tools
555 Timer Calculator (Astable & Monostable)
Frequency, period, high and low time and duty cycle of a 555 astable, the pulse width of a monostable, or RA and RB for a target frequency with E24 values.
Science & Engineering
PCB Trace Width Calculator (IPC-2221)
PCB trace width for a current and temperature rise, or the current a trace can carry, per IPC-2221 — with resistance, voltage drop and power loss.
Science & Engineering
Ohm's Law Calculator
Solve V, I, R, P from any two known values. V=IR, P=VI, P=V²/R, P=I²R — pick which pair you have, get the other two instantly.
Science & Engineering
Caffeine Half-Life Calculator
Pick a coffee, tea or cola dose and see how much caffeine is still in your system now, in an hour, in six, and when it drops below the sleep threshold.
Everyday
Sleep Cycle Calculator (90-min cycles)
Find the best bedtime or wake time aligned to 90-minute sleep cycles so you wake up between cycles, not mid-deep-sleep.
Everyday
Ideal Gas Law Calculator (PV = nRT)
Solve PV = nRT for pressure, volume, moles or temperature, with Pa/kPa/bar/atm/mmHg/psi, mL/L/m³, mol/mmol and K/°C/°F units.
Science & Engineering