The basic formula for battery life is simple, but real-world results depend heavily on the "Derating Factor" (Efficiency).
My device sleeps most of the time. What current do I enter?
Enter the average current. If your device uses 50mA for 1 second and 0.1mA for 59 seconds, calculate the weighted average (~0.93mA) and input that value.
Why multiply by 0.85 (Efficiency)?
Batteries are never 100% efficient. Energy is lost as heat (internal resistance), voltage converters consume power, and you can rarely drain a battery to absolute zero without damaging it. 0.85 is a safe real-world estimate.
What is the difference between mAh and Ah?
1 Ah (Ampere-hour) = 1000 mAh (Milliampere-hours). A standard AA battery is about 2000mAh (or 2Ah). A car battery might be 50Ah (50,000mAh).
Does voltage matter?
For this basic calculation, no. However, if you are using a DC-DC converter (e.g., stepping 9V down to 5V), the calculation is more complex and should be based on Watt-hours (Wh) rather than mAh.
Does discharge rate affect capacity? (Peukert's Law)
Yes. Discharging a battery very fast (high current) reduces its total effective capacity. This calculator assumes a standard, low-to-moderate discharge rate.