Battery Life Calculator

By Bogna Szyk
Last updated: Oct 26, 2018

Whether you're trying to figure out how long will a battery in your brand new laptop last, or what will the runtime of your DIY electronic device be, look no further than this battery life calculator. It gives you a realistic approximation of the battery runtime basing on its capacity and the energy consumption of your device.

You can use this battery calculator in two ways. The default mode assumes that the battery runs continuously until it is discharged. If you open the advanced settings, you can analyze what happens if your device switches to a sleep mode.

How to calculate the battery runtime?

It would be wonderful never to have to charge a smartphone again. You're probably painfully aware of the fact that no battery lasts forever, though. This battery life calculator finds out the approximate runtime of your battery basing on the following formula:

battery life = capacity / consumption * (1- discharge safety)


  • Capacity is the capacity of your battery, measured in ampere hours. You can usually find this value printed on your battery.

  • Consumption is the average current draw of your electronic device, expressed in amperes. (If you want to learn more about the electric current, make sure to check out the Ohm's law calculator!)

  • Discharge safety is the percentage of your battery capacity that is never used. For example, if you use a LiPo battery to fly a drone, you should never discharge it below 20% - otherwise, it can be damaged. Our battery life calculator assumes a default discharge safety of 20%, but feel free to change it as you wish.

How long will a battery last: sleep mode

Now, let's imagine you are building an IoT device that spends most of the time in a sleep mode. You'll probably want to calculate how long will a battery last in such a case. All you have to do is open the advanced mode to find out!

In the advanced mode, you can adjust the following additional parameters:

  • Awake time is simply the time that your device is not sleeping during one operational cycle - for example, 2 seconds.

  • Consumption in sleep mode is the average consumption of your device in sleep mode, measured in amperes. This value is probably much lower than the consumption in awake mode.

  • Sleep time is the time that your device spends sleeping during one operation cycle.

Basing on the parameters listed above, the battery life calculator finds the average consumption according to the equation

average consumption = (consumption1 * time1 + consumption2 * time2) / (time1 + time2)

where index 1 describes the awake mode, and index 2 the sleep mode.

After determining the average consumption, our calculator substitutes for into the regular battery life formula to figure out the runtime of your battery.

Bogna Szyk
Battery capacity
Discharge safety
Device consumption
Battery life
People also viewed…


Want to know what is crosstalk in simple terms? Want to know the specific crosstalk in your circuit? Then Omni's crosstalk calculator is for you, Get ready to learn and get all the crosstalk solutions you've been seeking.

PCB Trace Resistance

The PCB trace resistance calculator is the easiest way to calculate the resistance of any trace in a PCB.


Use our titration calculator to determine the molarity of your solution.
main background