blog.hirnschall.net
home

Battery Runtime Calculator

Contents

Subscribe for New Projects

Calculator

Provide any two of capacity, current, and runtime — the third is solved. Battery voltage enables Wh output and power-based input. Converter efficiency, load voltage and depth of discharge are optional corrections.


Provide any two of capacity, current, and runtime to calculate.

Battery Runtime — Explanation

The runtime of a battery-powered device follows directly from the relationship between stored charge and current consumption. A battery rated at capacity \( C \) (in mAh or Ah) can deliver an average current \( I \) for a time: \[ t = \frac{C}{I} \] A 2000 mAh battery powering a 100 mA load will last 20 hours in the ideal case. The formula is the same regardless of chemistry — the mAh rating is the fundamental quantity that defines how much charge the battery holds.

When the load is specified as a power draw rather than a current, we first convert using the battery voltage \( V \): \[ I = \frac{P}{V}, \qquad t = \frac{C \cdot V}{P} \] This is useful when the datasheet of a module gives a power figure rather than a current figure, or when the load operates from a regulated voltage that differs from the battery voltage.

Converter Efficiency

Most battery-powered systems include a voltage regulator or DC-DC converter between the battery and the load. A switching converter (buck or boost) conserves power and is not lossless, so the battery has to supply the load power divided by the efficiency. We therefore have to consider not only efficiency but also the voltage ration between input and output. \[ I_{\text{battery}} = \frac{V_{\text{load}} \cdot I_{\text{load}}}{\eta \cdot V_{\text{battery}}} \] A 5 V load drawing 100 mA through an 85% efficient boost converter from a 3.7 V cell pulls about 159 mA from the cell. A 2000 mAh cell then lasts 12.6 hours rather than the 20 hours the bare capacity-over-current estimate suggests. The calculator uses this formula when a load voltage is entered. Without a load voltage it assumes the load runs at battery voltage, which reduces the formula to \( I_{\text{load}} / \eta \). When the load is given as a power, the load voltage is not needed and the battery current is \( P / (\eta \cdot V_{\text{battery}}) \).

A linear regulator (LDO) behaves differently: its output current equals its input current, and the voltage difference is dissipated as heat. For an LDO enter 100% efficiency and no load voltage. The battery current is simply the load current, and the loss shows up in the usable energy, not in the runtime.

Depth of Discharge

Most battery chemistries should not be discharged to zero. Doing so shortens cycle life significantly. The depth of discharge (DoD) sets what fraction of the nominal capacity is actually used:

When DoD is entered, the calculator reduces the effective capacity to \( C \cdot \text{DoD} \) before computing runtime or required capacity. For sizing a battery pack with longevity in mind, enter the DoD along with the required runtime to find the nominal capacity needed.

Purpose of the Calculator

Any two of capacity, current, and runtime determine the third. The rearranged formulas are:

When efficiency and DoD are provided, both are applied before solving, and the result reflects the real-world figure rather than the idealized one.

Practical Caveats

The calculation assumes a constant average current draw. Real devices rarely have a flat profile: a microcontroller sleeping most of the time with periodic radio bursts has a very different average than its peak consumption. For duty-cycled loads, compute the time-weighted average current and use that as the input.

Battery capacity also degrades with temperature. Most lithium cells deliver their rated capacity only at around 20–25 °C. At 0 °C available capacity can drop to 70–80% of the nominal value; at -20 °C it can fall below 50%. For outdoor or automotive applications, it is worth applying an additional temperature derating factor on top of the DoD.

For lead-acid batteries, the Peukert effect is relevant: capacity decreases at higher discharge rates, so the simple formula overestimates runtime under heavy loads. For lithium chemistries the Peukert effect is minor and can usually be ignored in first-order estimates.

More calculators: blog.hirnschall.net/tools/.

Get Notified of New Articles

Subscribe to get notified about new projects. Our Privacy Policy applies.
Sebastian Hirnschall
Article by: Sebastian Hirnschall
Updated: 11.05.2026