1. Home
  2. Calculators
  3. Battery Life Calculator

Battery Life Calculator

For Arduino and ESP32 projects, torches, radios and backup power: find how long a battery will last, including sleep modes.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use Battery Life Calculator

  1. Enter your numbers, or press a sample to see an example.
  2. Read the results and the table under them.
  3. Copy the results or download the table as a CSV file.

Features

  • mAh, Ah or Wh capacity
  • Series and parallel packs
  • Constant current, constant power or a duty cycle
  • Efficiency and usable capacity
  • Peukert correction for lead-acid cells

Supported formats

Input

  • Typed numbers with SI prefixes (4.7k, 100n, 20m)

You get

  • On-screen results
  • Copyable text
  • CSV table

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Battery Life Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Self-discharge, temperature and ageing are not modelled.
  • The Peukert exponent is an approximation that suits lead-acid cells better than lithium ones.

Guide

Estimating battery runtime: capacity, load, efficiency, duty cycle and the Peukert effect

How long will a battery run a device? The answer matters for a trail camera, a sensor in a field, a handheld radio or a robot, and the simple answer, capacity divided by current, is usually optimistic. This calculator starts from that ratio and adds the corrections that matter in practice: conversion efficiency, how much of the rating you will really use, duty cycles and, for lead-acid batteries, the Peukert effect.

The basic formula

Capacity in milliamp-hours divided by the current in milliamps gives hours. A 2000 mAh cell feeding a 100 mA load would last 20 hours in theory. The calculator multiplies the capacity by the usable fraction, because you should not run most cells flat, and by the efficiency of the regulator or converter between the battery and the load, then divides by the load current. With 80% usable and 90% efficiency the same cell lasts 14.4 hours.

Capacity units and packs

Capacity can be given in mAh, Ah or Wh. For watt-hours, enter the voltage; the tool converts to mAh. You can also set cells in series and cells in parallel. Parallel cells add capacity: two 2000 mAh cells give 4000 mAh. Series cells add voltage but not capacity, and the tool shows the pack voltage and the energy in the pack in Wh.

Loads that sleep

Many battery projects spend nearly all their time asleep. Choose the duty-cycle load, then enter the active current, the sleep current and the percentage of time active. A sensor drawing 80 mA for 2% of the time and 0.01 mA the rest averages 80 × 0.02 + 0.01 × 0.98 = 1.61 mA. On two AA cells in series with 2500 mAh, 85% efficiency and 85% usable, that gives 1,122 hours, about 46.75 days. The table beside the result shows how runtime changes at a quarter, half, double and four times the load, which is the quickest way to see the value of a lower sleep current.

Constant power

If the load is rated in watts, as with a fan or amplifier, choose constant power and enter the battery voltage. The current is the power divided by the voltage. A 20 W load on a 12 V battery draws 1.667 A. The runtime then depends on how the battery voltage falls during discharge, which the tool does not model, so keep a margin.

The Peukert correction

Lead-acid batteries give less than their rated capacity when discharged quickly, and Peukert’s law describes it with an exponent k, usually 1.1 to 1.3. Tick the option, enter k and the number of hours the capacity rating applies to, commonly 20 for a lead-acid battery. The 12 V 7 Ah example with 50% usable capacity and a 20 W load lasts 1.338 hours with k = 1.2, whereas without the correction it would be 2.1 hours. Lithium cells have a much smaller effect, so leave it off for them.

What reduces your runtime

Real runtime is shorter when the battery is cold, old or discharged at a high rate, and when the load has current spikes. The tool warns if the load is above 1C, meaning it would flatten the battery in under an hour, and if the estimated runtime is longer than a year, when self-discharge becomes significant. Use the usable-capacity field to build in your own margin.

Limits

The estimate is only as good as the numbers you give it. Capacity ratings are measured under specific conditions, the discharge curve is not flat, and the cut-off voltage of the load decides how much of the capacity can be used. Measure the real current with a meter when you can.

Checked against the current version of the Battery Life Calculator on .

Frequently asked questions

How do I enter a battery rated in watt-hours?

Choose Wh as the unit and give the battery voltage; the tool converts the energy to milliamp-hours by dividing watt-hours by voltage and multiplying by 1,000. A 7.4 Wh pack at 3.7 V is 2,000 mAh. If you enter a constant-power load in watts it divides by the pack voltage to get the current, so the voltage field appears for both.

Why does a bigger load shorten the runtime by more than the simple ratio for a lead-acid battery?

Lead-acid cells deliver less total charge at high discharge rates, which is what the Peukert exponent captures. The 12 V 7 Ah example running at 20 W lasts 1.34 hours with k = 1.2, against 2.1 hours if capacity were fixed. The effect is small in lithium-ion cells, so leave the option off for them.

How do I calculate battery life for a device that sleeps most of the time?

Choose the duty-cycle load. The tool averages the active and sleep currents by the time spent in each, then divides the usable capacity by that average.

Why do I get less than the calculation?

Capacity falls in the cold, with age and at high currents, and every converter wastes some energy. Lower the usable capacity and efficiency to be safe.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.