ScienceEngineering

Battery Life
calculator.

Estimate how long a battery runs a device, or the capacity you need for a runtime.

Before you rely on this result. This is a planning estimate. Check the cell's datasheet, and follow the maker's limits for charging, discharge current and temperature. Sources used on this page.

How it's worked out

A battery rating in mAh or Ah is a store of charge. Charge used is current times time, so the runtime is the charge you plan to use divided by the average current.

runtime\displaystyle \text{runtime}=C×uIavg\displaystyle {}= \frac{C \times u}{I_{\text{avg}}}

C is the rated capacity in amp-hours, u the usable share, and I avg the average current in amps. A rating in watt-hours is divided by the battery voltage first, and so is a load in watts.

A device that sleeps spends most of its time at a tiny idle current. Its average is the active current weighted by the share of time it is awake, plus the idle current for the rest.

Iavg\displaystyle I_{\text{avg}}=Iactive×d+Iidle×(1−d)\displaystyle {}= I_{\text{active}} \times d + I_{\text{idle}} \times (1 - d)

Lead-acid batteries give less than their label at high currents. Peukert's law corrects for that, with H the hours the rating was measured over (usually 20) and k the Peukert exponent. The Victron battery monitor manual uses 1.25 as its default for lead-acid, and the tool does too. Lithium cells are treated as k = 1.

t\displaystyle t=H×(C×uI×H)k\displaystyle {}= H \times \left(\frac{C \times u}{I \times H}\right)^{k}

Sizing runs the same law backwards: it solves for the usable charge that lasts your runtime, then divides by the usable share to get the rating to buy.

Worked examples

Maya checks a phone-size cell at 250 mA

Maya plans to use 90% of a 3,000 mAh lithium-ion cell, which is 2,700 mAh. At a steady 250 mA that lasts 10.8 hours, or 10 h 48 min.

The cell stores 11.1 Wh at its rating. Her board draws 0.925 W on average, so the usable 9.99 Wh gives the same runtime by the energy route.

Open this example in the tool

Theo runs a sensor on a coin cell

Theo's sensor draws 20 mA while it measures and sends, which is 1% of the time, and 10 µA asleep. Its average is 0.2099 mA, so a 220 mAh coin cell at 90% usable lasts about 39.3 days.

Left awake, the same cell would last only 9 h 54 min. Cutting the awake time to 0.5% stretches it to 75 days, because the active share is still most of the average.

Open this example in the tool

Sam runs a cool box from a lead-acid battery

A 120 W cool box on a 12 V battery draws 10 A. Sam only takes the 100 Ah battery down to half, so a plain division says 5 h.

With Peukert's law at k = 1.25 the estimate falls to 3 h 32 min, because 10 A drains it far faster than the 20 hours its rating was measured over. For a full 8 hour night at that load he would need about 192 Ah rated, not the 160 Ah a plain sum gives.

Open this example in the tool

Reading your result

The runtime is a planning figure. Cold, age and a drained cell sagging below the device's cutoff all cut it. Battery University advises designing for a pack that has faded to 70 to 80% of its rating, which is what the usable share is for.

Average current is the number to check first. If it comes out far above what you expected, look for a radio or a display that stays on. A USB power meter or a meter in series shows the real draw.

Rated energy decides the airline question. US rules in 49 CFR 175.10 allow lithium-ion batteries up to 100 Wh, and over 100 up to 160 Wh with the airline's approval, with spares in carry-on bags only. A 10,000 mAh bank at 3.7 V is 37 Wh, well inside.

Common mistakes

  • Comparing mAh across voltages. A 12 V battery and a 3.7 V cell with the same mAh hold very different energy. Compare watt-hours instead.
  • Using the peak current as the load. Radios draw short bursts many times the average. Use the average over a full cycle, or set the active time.
  • Expecting a power bank's label at its USB port. The rating is for its 3.7 V cells, and the boost to 5 V loses some energy on the way.
  • Planning on the full rating of a lead-acid battery. Its usable share and Peukert exponent both matter, and both cut the runtime at high loads.

Questions people ask

Divide the amp-hours you plan to use by the average current in amps. A 2,000 mAh cell at 200 mA gives 10 hours before any allowance. Set the usable share below 100% to leave room for age, cold and the cutoff voltage.

Sources