Skip to main content

How to Calculate Battery Life: Electronics Guide

Tech Expert Tom · 2024-05-03 · 14 min read · Technology

Learn how to calculate battery runtime for devices and power banks. Master capacity ratings in mAh and Wh, convert between current and power, apply real-world efficiency factors, and estimate how long a battery will last under load.

How to Calculate Battery Life

Battery life — more precisely, runtime — is how long a battery can power a device before it is depleted. Whether you are sizing a power bank, designing a low-power sensor, or comparing phone batteries, the calculation rests on energy capacity divided by the rate at which the device draws that energy.

Get the units right and apply a realistic efficiency factor, and the estimate is usually within 10–20% of measured runtime. Get them wrong and you can be off by a factor of two or more.

The core formulas

There are two equivalent ways to state the same relationship, depending on whether you work in current (mA) or power (W).

Current form (most common for small electronics):

t = (C)/(I)

Where t is runtime in hours, C is capacity in milliampere-hours (mAh), and I is load current in milliamperes (mA).

Power / energy form (better when voltage matters):

t = (E)/(P) = \fracC_\mathrmWhP

Where E (or C_\mathrmWh) is energy in watt-hours and P is power draw in watts.

Convert mAh to Wh using the battery's nominal voltage V:

E_\mathrmWh = \fracC_\mathrmmAh × V1000

A 5,000 mAh phone cell at 3.7 V stores:

E = (5000 × 3.7)/(1000) = 18.5 \text Wh

That Wh figure is what you should compare across packs at different voltages. Two 10,000 mAh banks are not equal if one is 3.7 V and the other is a 12 V lead-acid — the energies differ by more than 3×.

Worked example: phone powering a load

Problem. A 5,000 mAh battery powers a device that draws 500 mA continuously.

Theoretical runtime:

t = (5000)/(500) = 10 \text hours

Real-world runtime. Batteries and power electronics are not 100% efficient. Multiply by an efficiency factor \eta between about 0.7 and 0.9:

t_\mathrmactual = \eta × (C)/(I)

With \eta = 0.8:

t_\mathrmactual = 0.8 × 10 = 8 \text hours

Expect roughly 7–9 hours in practice, depending on temperature, age, and discharge rate.

When you know power in watts

Many datasheets list power consumption in watts rather than current. Use energy:

t = \fracC_\mathrmmAh × V1000 × P

Example. A 10,000 mAh, 3.7 V pack powers a 2 W IoT gateway:

t = (10000 × 3.7)/(1000 × 2) = (37)/(2) = 18.5 \text hours

With \eta = 0.85:

t_\mathrmactual = 0.85 × 18.5 ≈ 15.7 \text hours

Capacity ratings: mAh, Ah, and Wh

Rule of thumb for travel: most airlines limit spare lithium batteries to about 100 Wh per cell (sometimes up to 160 Wh with airline approval). Convert before you pack:

E_\mathrmWh = \fracC_\mathrmmAh × V1000

A 26,800 mAh / 3.7 V power bank is about 99 Wh — just under the common limit.

Peukert's effect and high drain

Capacity is not constant. At high discharge rates, chemistry and internal resistance reduce the usable capacity. For lead-acid and some other chemistries, Peukert's law is a useful correction:

t = (C)/(I^k)

Where k is Peukert's exponent (about 1.1–1.3 for lead-acid; closer to 1.0–1.05 for many lithium cells). For light loads on lithium-ion, the simple C/I formula is usually enough. For motor loads, heaters, or high-current bursts, derate more aggressively (use \eta near 0.7 or measure under load).

Temperature and aging

Temperature changes effective capacity and internal resistance:

  • Cold (below about 0 °C): capacity can drop 20–40%; lithium-ion should not be charged below 0 °C.
  • Hot (above about 35–40 °C): runtime may fall and calendar aging accelerates.
  • Optimal: roughly 20–25 °C for most consumer lithium cells.

Aging also matters. After hundreds of charge cycles, a pack that was 5,000 mAh when new may deliver only 4,000–4,500 mAh. Use the current capacity in the formula, not the label from the box.

A practical adjustment:

t = \eta_\mathrmtemp × \eta_\mathrmage × \eta_\mathrmconv × (C)/(I)

Typical ranges: \eta_\mathrmconv (converter / regulator) 0.85–0.95, \eta_\mathrmtemp 0.7–1.0, \eta_\mathrmage 0.8–1.0 for mid-life packs.

Usage patterns matter

Continuous draw is the easiest case. Real devices cycle:

For duty-cycled devices, compute average current first:

I_\mathrmavg = I_\mathrmactive × D + I_\mathrmsleep × (1 - D)

Where D is the duty cycle (fraction of time active). Then:

t = \eta × (C)/(I_\mathrmavg)

Example. A sensor draws 50 mA for 2% of the time and 10 µA asleep, on a 2,000 mAh cell:

I_\mathrmavg = 50 × 0.02 + 0.01 × 0.98 = 1.0 + 0.0098 ≈ 1.01 \text mA

t ≈ 0.9 × (2000)/(1.01) ≈ 1,780 \text hours ≈ 74 \text days

Sleep current often dominates long-life designs — cutting I_\mathrmsleep helps more than shaving active current.

Power banks and USB conversion losses

Power-bank marketing quotes cell capacity at ~3.7 V. USB output is 5 V (or higher for PD). Energy conservation plus boost-converter losses mean you never get the full mAh at 5 V:

C_5\mathrmV,\mathrmout ≈ \eta × C_3.7\mathrmV × (3.7)/(5)

With \eta ≈ 0.85 and a 10,000 mAh cell:

C_5\mathrmV,\mathrmout ≈ 0.85 × 10000 × 0.74 = 6,290 \text mAh equivalent at 5 V

That is why a "10,000 mAh" bank often delivers closer to 6,000–7,000 mAh into a phone. Always think in Wh when comparing banks.

Series and parallel packs

Parallel (same voltage, capacity adds):

C_\mathrmtotal = C_1 + C_2 + ·s

Series (capacity in Ah stays the same, voltage adds):

V_\mathrmtotal = V_1 + V_2 + ·s

Energy still adds in both cases:

E_\mathrmtotal = Σ C_i V_i / 1000 \quad (\textwith C \text in mAh)

Never mix unmatched cells in series or parallel without a proper BMS — imbalance shortens life and can be unsafe.

Common mistakes

Mixing mA and mAh without converting time. Runtime in hours is C/I only when both use the same current unit (mA with mAh, or A with Ah).

Comparing mAh across different voltages. Convert to Wh.

Ignoring efficiency. A 10-hour theoretical result that ships as a 10-hour claim will disappoint users; use 0.7–0.9.

Using peak current instead of average. Peak drain sizes wires and protection; average drain sizes the battery.

Trusting the label on a worn pack. Measure or derate for age.

Forgetting regulator dropout and cut-off voltage. "Empty" is often 3.0–3.3 V per lithium cell, not 0 V — usable capacity is less than the full coulomb count from 4.2 V to 0 V.

Frequently asked questions

Is battery life the same as cycle life? No. Runtime (this guide) is how long one charge lasts. Cycle life is how many charge/discharge cycles until capacity falls to a threshold (often 80% of nominal).

Why does my phone die faster in winter? Cold increases internal resistance and reduces available capacity. The gauge may also read lower. Warm the phone gradually; do not charge lithium-ion below freezing.

Should I use mAh or Wh? Use mAh when voltage is fixed and you know load current. Use Wh whenever voltages differ or you care about airline limits and fair comparisons.

How accurate is C/I? For lithium-ion at moderate C-rates and room temperature, within about 10–20% after an efficiency factor is excellent. Validate critical designs with a timed discharge test.

What C-rate should I assume? C-rate is discharge current relative to capacity: 1C means emptying in one hour. A 2,000 mAh cell at 1C is 2 A. Higher C-rates need more derating.

Can I add runtimes from two batteries? Only if they truly share the load (e.g. parallel with proper balancing). Two separate packs used one after another add in sequence; they do not double current capability unless paralleled correctly.

Summary

Start from energy over power, or capacity over current:

t = (C)/(I) = \fracC_\mathrmmAh × V1000 × P

Convert everything to consistent units, multiply by a realistic efficiency (often 0.7–0.9), and adjust for temperature, age, and duty cycle. Prefer Wh when comparing packs at different voltages.

Estimate device runtime with our Battery Life Calculator.

Topics: battery, power, electronics, runtime, capacity, mAh, watt-hours