Battery Life Calculator
Estimate how long your battery will last.
Estimating Battery Runtime
Calculating Battery Life is one of the most common questions in electronics: "How long will my device run on this battery?" While a simple formula provides a rough baseline, real-world battery physics involve variables like discharge curves, temperature, and cut-off voltages.
Whether you are powering a Raspberry Pi from a USB power bank or flying a drone with a LiPo pack, this calculator gives you a realistic estimate by converting everything into common units and applying a safety derating factor.
How to Calculate (The Formula)
The theoretical runtime is calculated by dividing the total capacity by the load current. However, we must apply a Derating Factor to account for inefficiencies (e.g., heat loss, voltage converter efficiency, and the fact that you can't drain a battery to 0%).
Time (Hours) = (Capacity (mAh) / Current (mA)) × Derating_Factor
Example
A microcontroller project draws 50mA on average. You power it with a 2000mAh Li-Ion cell. Assuming a standard derating of 0.85:
(2000 / 50) × 0.85 = 34 Hours.
Without derating, you might expect 40 hours, but in reality, the voltage would drop below the device's minimum operating level before then.
Practical Applications
Accurate battery life estimation is vital for:
- IoT Devices: Determining if a sensor node can last a year on a coin cell.
- Backup Power: Sizing a UPS (Uninterruptible Power Supply) to keep servers running during an outage.
- Wearables: Balancing battery size vs. runtime for smartwatches.
FAQ
Why does a battery drain faster at high currents?
This is known as the Peukert Effect. As discharge rate increases, the battery's internal resistance causes more energy to be wasted as heat (I²R loss), effectively reducing its usable capacity. A battery rated for 100Ah might only deliver 60Ah if drained very quickly.
What is a good derating factor?
For most consumer applications (Li-Ion, Alkaline), 0.85 (15% loss) is a safe standard. For lead-acid batteries, which should not be discharged below 50% to prevent damage, use a factor of 0.50.
How do I convert Watts to Amps?
If your device lists power in Watts, use the formula I = P / V. For example,
a 5W device running on 12V draws 5 / 12 = 0.41 Amps (410mA).