How long will a battery run a device? In principle the answer is a simple division: the energy stored in the battery divided by the power the device draws. In practice you need the right units (mAh, Ah or Wh), the voltage to convert between them, and a realistic allowance for losses. This calculator puts all of that together.
In battery life mode, enter the capacity printed on the cell or pack, its nominal voltage, how cells are wired (in series or in parallel), and the device’s consumption in mA, A or W. You get the estimated runtime, the pack’s total energy and capacity, the current drawn and the discharge rate (C-rate). In capacity needed mode, enter the consumption and the runtime you want, and the calculator gives the capacity to look for, in mAh, Ah and Wh.
Two optional factors make the estimate more honest. Efficiency (or derating) covers losses in voltage converters and wiring and the capacity lost to cold or ageing. Usable depth of discharge reflects how much of the battery you are willing to empty: lead-acid batteries last far longer if you use only about half of their capacity.
How to use this calculator
- Choose Battery life or Capacity needed.
- Enter the capacity per cell in mAh, Ah or Wh, and the nominal voltage.
- For a pack, enter how many cells are in series (voltages add up) and in parallel (capacities add up).
- Enter the device consumption in mA, A or W. For a current, the calculator assumes it is drawn at the pack voltage.
- Adjust efficiency and usable depth of discharge (85 % and 100 % by default), then read the runtime. The table shows the runtime at other efficiency values.
The formula
The energy stored in a battery is its charge capacity times its voltage:
For cells in series and in parallel, the pack voltage is and the capacity , so the energy is times that of one cell. With a load of power (or current at the pack voltage, ), an efficiency and a usable depth of discharge :
When the load is a current, this is the familiar . Turned around, the capacity needed for a runtime is . The discharge rate is in C: 1C empties the full capacity in one hour.
Worked example
A 3000 mAh, 3.7 V lithium-ion cell powering a device that draws 200 mA. The cell stores 11.1 Wh. With 85 % efficiency: 12.75 hours, that is 12 hr 45 min. Without losses the ideal figure would be 15 hours.
A 10,000 mAh power bank (3.7 V) charging a 5 W device. It holds 37 Wh; at 85 % conversion efficiency it supplies 6.29 hours, about 6 hr 17 min.
Sizing a battery. A 12 V system must run a 2 W sensor for 24 hours, with 90 % efficiency and only 80 % of the capacity used: 66.67 Wh, so 5.56 Ah (5,556 mAh) at 12 V.
Battery capacity: mAh, Ah and Wh
Capacity in mAh or Ah is a quantity of charge: a 3000 mAh cell can in theory deliver 3000 mA for one hour, or 300 mA for ten hours. It only becomes comparable across batteries once multiplied by the voltage, which gives the energy in watt-hours (Wh). A 3000 mAh lithium cell at 3.7 V stores 11.1 Wh, while a 3000 mAh NiMH cell at 1.2 V stores only 3.6 Wh. That is why airlines and power-bank labels use Wh.
Manufacturers measure rated capacity under specific conditions (a low, steady current, room temperature, a set cut-off voltage). At higher loads, in the cold or as the battery ages, the usable capacity is lower.
Series, parallel and battery autonomy
Wiring cells in series adds their voltages but keeps the same mAh; wiring them in parallel keeps the voltage and adds the mAh. Either way the energy in Wh is the sum of the cells. Four 18650 cells of 3400 mAh and 3.6 V in a 2S2P pack give 7.2 V, 6800 mAh and 48.96 Wh; at 1 A, with 80 % depth of discharge and 90 % efficiency, they last about 4 hr 54 min.
At high discharge rates the effective capacity of many chemistries shrinks (the effect is strongest with lead-acid, where it is described by Peukert’s law). If the C-rate shown is above about 0.5C, keep a generous margin.
Frequently asked questions
How do I calculate battery life from mAh?
Divide the capacity in mAh by the current in mA to get hours, then multiply by an efficiency factor. A 2000 mAh battery at 100 mA lasts 20 hours in theory, or about 17 hours with an 85 % factor.
How do I convert mAh to Wh?
Multiply the mAh by the nominal voltage and divide by 1000. A 5000 mAh battery at 3.7 V holds 5000 × 3.7 / 1000 = 18.5 Wh.
What battery capacity do I need for my device?
Multiply the device power in W by the runtime in hours, then divide by the efficiency and the usable depth of discharge. For 2 W over 24 hours at 90 % and 80 %: 48 / 0.72 = 66.7 Wh. Divide by the voltage for Ah.
Why does my battery run out sooner than calculated?
Rated capacity is measured at low current and room temperature. Cold, high current, ageing, voltage converter losses and devices that draw peaks rather than a steady current all reduce the real runtime.
What does a C-rate of 0.5C mean?
It is the discharge current relative to capacity: 0.5C on a 2000 mAh battery is 1000 mA, which would empty it in about two hours. Most cells give close to their rated capacity at 0.2C to 0.5C.
Sources
- Battery University, BU-402: What Is C-rate?
- Battery University, BU-501: Basics about Discharging (depth of discharge, cut-off voltage)
- Energizer, Alkaline Manganese Dioxide Handbook and Application Manual (capacity vs drain rate)
Last updated: