OctaCalc / Battery Life Calculator

Battery Life Calculator

Estimate how long a battery will last by entering its capacity in mAh and the current draw of your circuit in mA.

Estimated Runtime
hrs

For educational and reference use only. Always verify results before use in real-world designs or safety-critical applications. For more information, see Calculation Assumptions and Disclaimer.

How to Use This Battery Life Calculator

Find your battery's capacity (printed on the label or in the datasheet, in mAh) and measure or estimate your circuit's average current draw in milliamps. Click Calculate Runtime. Note that real-world runtime is typically 70–80% of the theoretical value due to battery efficiency, temperature, and discharge curves.

Battery Life Formula

The battery life formula divides total stored charge by the rate at which it is consumed:

Time (hours) = Capacity (mAh) / Current (mA)

Example

Scenario: AA battery (2500 mAh) powering an Arduino at 30 mA average
Time = 2500 / 30
Time ≈ 83.3 hours (3 days 11 hours)

Real-world estimate at 80% efficiency: ≈ 66.7 hours

Frequently Asked Questions

How accurate is this battery life calculator?
The result is a theoretical maximum based on the simple mAh ÷ mA formula. Real-world runtime is typically 70–80% of this figure due to factors like battery chemistry, temperature, discharge rate, and the efficiency of any voltage regulators in your circuit.

Why does my battery die faster than the calculator predicts?
Batteries lose capacity as they age, perform worse in cold temperatures, and most chemistries cannot be fully discharged without damage. A Li-ion cell is usually only usable down to about 3 V, which cuts into the rated capacity. High current draws also reduce effective capacity due to internal resistance losses.

What is mAh and why does it matter?
mAh stands for milliamp-hours — it is a measure of how much charge a battery can store. A 2000 mAh battery can theoretically supply 2000 mA for one hour, or 200 mA for ten hours. The higher the mAh rating, the longer the battery lasts for a given load.

How do I measure my circuit's current draw?
Place a multimeter set to DC current (mA) in series with your circuit's power supply. For devices with variable loads (e.g. a microcontroller that sleeps and wakes), measure both the active and sleep currents and calculate a weighted average based on how long the device spends in each state.

Can I use this calculator for lithium, NiMH, and alkaline batteries?
Yes — the formula works for any battery chemistry. However, each chemistry has a different usable voltage range and discharge curve, so the 70–80% efficiency rule of thumb is a rough guide. Lithium cells tend to be more consistent across their discharge cycle; alkaline cells drop off more noticeably toward the end.