Electronics · Batteries
Battery life calculator (mAh).
Divide capacity by current for hours of runtime. Add a usable-capacity factor and a sleep/active duty cycle for a realistic estimate.
Inputs
Result
Enter capacity and current.
How to estimate battery life from mAh
Runtime in hours = battery capacity (mAh) ÷ load current (mA). A milliamp-hour is a unit of charge: a 2,000 mAh battery can in theory supply 2,000 mA for one hour, 100 mA for 20 hours, or 1 mA for 2,000 hours. Wikipedia notes that in practice there are far more factors, and that capacity decreases as discharge current increases.
Worked example (always on). 2,000 mAh, 100 mA load, 80% usable: 2,000 × 0.80 = 1,600 usable mAh, ÷ 100 mA = 16 hours.
Worked example (sleep and wake). A sensor draws 80 mA for 5% of the time and 0.5 mA asleep the rest. Average current = 80 × 0.05 + 0.5 × 0.95 = 4.475 mA. On the same battery at 80% usable that is 1,600 ÷ 4.475 = 357.5 hours, or 14.9 days.
Why the 80%. The usable-capacity box is your safety margin for cut-off voltage, temperature and ageing. It is a rule of thumb, so lower it for cold weather, old cells or high loads. mAh also ignores voltage, so compare batteries of different voltage by watt-hours (volts × amp-hours) instead, as the battery backup runtime tool does.
Do not discharge lithium cells below their protection cut-off, never short a battery, and follow the maker's current and charging limits.
Frequently asked questions
How do I calculate how long a battery will last?
Hours = capacity in mAh ÷ load in mA. A 2,000 mAh battery at 100 mA lasts 20 hours in theory, or 16 hours with 80% usable capacity.
How long will a 2000mAh battery last at 500mA?
In theory 4 hours (2,000 ÷ 500). At 80% usable capacity it is 3.2 hours, and heavy loads usually shave off more.
How do I include a sleep mode?
Weight the currents by time: average mA = active mA × active share + sleep mA × sleep share. The sleep-and-wake example averages 4.475 mA and lasts about 14.9 days.
Is the answer exact?
No. Capacity depends on discharge rate, temperature, age and the cut-off voltage, and datasheets rate capacity at a stated current. Treat the result as an estimate and test the real device.
Can I compare batteries of different voltages by mAh?
Not fairly. Compare watt-hours: volts × amp-hours. A 3.7 V, 2,000 mAh cell holds 7.4 Wh.
Sources
Checked
Runs entirely in your browser. Nothing you type is sent or stored.
Scope and safety
Low-voltage hobby use only. These results are arithmetic from the formulas shown, not an engineering design or professional advice. Real parts vary with tolerance, temperature and age, so check the datasheet for every part. Never work on mains-powered circuits from a calculator result, and treat lithium and other rechargeable batteries with care.