How to Use It?
To use the calculator, simply enter the nominal battery capacity in Amp-hours (Ah) or milliamp-hours (mAh), and the average current drawn from it to see an estimate of the battery’s runtime in seconds, minutes, hours, days, weeks, and years.
You can use this battery calculator in two ways. The simple mode assumes that the battery runs continuously until it is discharged. If you select the advanced mode, you can analyze what happens if your device spends a small portion of its time in an active mode and the rest of the time in a low-power Sleep Mode.
Please keep in mind that the results are estimates only; the actual results may vary depending on battery condition, age, temperature, discharge rate, and other factors.
How to Calculate Battery Life?
Battery life refers to the amount of time a battery can power a device or system before it needs to be recharged or replaced. It is an important consideration when evaluating the practicality and usability of electronic devices.
The formula for battery life is based on the concept of Amp-hours (Ah) or milliamp-hours (mAh). Amp-hours (Ah), also denoted as an Ampere-hours, is a unit of electric charge that measures how much current a battery can deliver over a period of time. For example, a battery with a capacity of 1 Ah can theoretically supply 1 A of current for one hour, or 500 mA for two hours, or 200 mA for five hours, and so on.
A milliamp-hour, also known as a milliampere-hour, is one thousandth of an amp-hour, so a 1000 mAh battery is equivalent to a 1 Ah battery.
Simple Mode
The simple version of the calculator will estimate battery life based on nominal battery capacity and device’s current consumption.
The formula for battery life is expressed as:

Where:
Battery Life is the amount of time the battery can power the device or system (measured in hours).
Battery Capacity is the capacity of your battery (measured in amp-hours or milliamp-hours). You can usually find this value printed on your battery.
Consumption is the average current drawn by the device or system from the battery (measured in amps or milliamps).
Advanced Mode
Assume you’re creating a battery-powered IoT device that spends a small portion of its time in an active mode and the rest of the time in a low-power Sleep Mode. In this case, you’ll probably want to calculate how long a battery will last. To find out, simply select the advanced mode!
In the advanced mode, you can adjust the following additional parameters:
- The time that your device is active
- The average consumption of your device in active mode
- The time that your device spends sleeping
- The average consumption of your device in sleep mode
To figure out how long a battery will last in this case, divide the battery’s capacity by the average amount of current that the device consumes over time. The average is the amount of current consumed when the device is awake multiplied by the percentage of time it is awake, plus the amount of current consumed when the device is in Sleep Mode multiplied by the percentage of time it is in Sleep Mode.


Where:
Battery Life is the amount of time the battery can power the device or system (measured in hours).
Battery Capacity is the capacity of your battery (measured in amp-hours or milliamp-hours). You can usually find this value printed on your battery.
Ia = Device current consumption when awake
Is = Device current consumption when in Sleep Mode
ta = Time spent awake
ts = Time spent in Sleep Mode
