Power and Battery Safety

Estimating Runtime From Capacity and Load

Learn the simple capacity-divided-by-current sum for battery runtime, then see why real-world results usually fall short and how to build in margin.

On this page
  1. The neat sum
  2. Getting the load right
  3. Why reality falls short
  4. A more realistic estimate
  5. Energy view for different voltages
  6. Check it by testing
  7. Summary of the approach

The neat sum

A battery’s capacity is often given in milliamp-hours (mAh) or amp-hours (Ah). The load is the current your circuit draws, in milliamps (mA) or amps (A). Dividing one by the other gives hours:

runtime (hours) = capacity (mAh) / average current (mA)

For example, a 2000 mAh pack feeding a circuit that draws 200 mA on average gives 2000 / 200 = 10 hours. A 1000 mAh pack running a 50 mA load gives 1000 / 50 = 20 hours.

That is the whole formula, and it is a perfectly good first estimate. The rest of this article is about why you should not trust it to the minute.

Getting the load right

The formula needs an average current, and that is where most errors start.

Add up every part. Include the microcontroller, sensors, indicator LEDs, radios, displays and any regulator losses. Datasheets list typical and maximum currents; read them carefully, since the habit of reading datasheets prevents many surprises.

Account for duty cycle. Many projects alternate between a low-power state and bursts of activity. Suppose a sensor node draws 100 mA for 1 second out of every 60 and 1 mA the rest of the time. The average is roughly (100 x 1 + 1 x 59) / 60 = 159 / 60, which is about 2.65 mA. The average can be far lower than the peak, which is why sleeping between tasks matters so much for battery life. It can also be higher than you expect if the sleeping state is not as quiet as hoped.

Measure when you can. An estimate from datasheets is a guess. A multimeter in series, or a dedicated measuring tool, gives actual numbers, though multimeter readings can be misleading on rapidly changing currents. Measurements are best made safely, with the right range and connections.

Why reality falls short

Several effects combine to cut the usable runtime below the neat sum.

Rated capacity is measured under specific conditions. The figure on the label usually comes from a particular discharge rate and temperature. Draw current faster, or operate in the cold, and you typically get less. Batteries with higher internal resistance suffer more.

Voltage drops as the cell discharges. The circuit may stop working before the cell is truly empty, because the voltage falls below what it needs. A project that needs a minimum voltage cannot use the final part of the capacity.

You should not drain some cells completely. Lithium cells are normally protected against over-discharge, and a protection circuit disconnects them before they are empty. Running them flat can damage them. The practical capacity is therefore smaller than the label.

Conversion losses. If a regulator sits between the battery and the circuit, it takes some energy. A linear regulator wastes the voltage difference as heat, and a switching one loses a smaller share. This is the main trade-off in the comparison of voltage regulators. When the load is measured at the battery rather than at the circuit, this is taken into account automatically.

Age and temperature. Older cells hold less than new ones. Cold weather reduces what many chemistries deliver. Heat can shorten life over time.

Variation between cells. Two cells with the same label can differ. Cheap or unbranded packs sometimes list optimistic capacities, so treat unusually generous claims sceptically, much as you would when reading efficiency claims for other products.

A more realistic estimate

A common habit is to apply a derating factor to the capacity. Rather than quote a number that suits every battery, choose a conservative allowance based on your cell, the load and the conditions. As an illustration only, if you assume 70 percent of the labelled capacity is usable, the 2000 mAh pack above gives 2000 x 0.7 = 1400 mAh usable, and 1400 / 200 = 7 hours rather than 10. The 70 percent is an assumption for the example, not a rule; your own measurements should decide.

Then add margin. If the project must last a certain time, design for noticeably more, so that a worn cell or a cold day does not leave it stranded.

Energy view for different voltages

Sometimes it is helpful to think in watt-hours instead of amp-hours, since watt-hours account for voltage. Watt-hours are capacity in amp-hours multiplied by nominal voltage. For instance, a 2 Ah pack at a nominal 3.7 V holds about 2 x 3.7 = 7.4 Wh. If a circuit takes 1 W from the battery, the rough runtime is 7.4 hours before losses and derating. This approach is useful when a regulator changes the voltage, because power in is roughly power out plus losses. It is also how larger setups, such as home battery storage, are discussed.

Check it by testing

The best way to learn a project’s runtime is to measure it. Charge the pack, run the real load, and log how long it lasts, preferably in conditions similar to real use. Do this in a safe place, with the supervision and precautions covered in the guidance on safe charging practices and battery chemistry, and never leave an experimental pack running unattended near anything flammable. If a cell is warm, swelling or smells unusual, stop.

Summary of the approach

  1. Find or measure the average current.
  2. Divide usable capacity by that current.
  3. Apply a derating allowance, then add design margin.
  4. Test the actual runtime and adjust.

Treat any result as a rough guide. Real devices vary, and outcomes depend on the cell, the temperature and how the load behaves.

The complete guide to power and battery safety

Powering Hobby Projects Safely A Planning Guide
Read the guide

Keep exploring

Guides from other topics

All topics →