Step 1: Convert capacity to watt-hours
Batteries are labelled in amp-hours (Ah), milliamp-hours (mAh) or watt-hours (Wh). Only watt-hours describe energy on their own, so everything is converted first:
Wh = Ah × V
Wh = mAh ÷ 1,000 × V
Wh = kWh × 1,000
For a bank of identical batteries, energy is simply one battery’s Wh × the number of batteries, whether they are in series (voltage adds) or parallel (amp-hours add). A 12 V 100 Ah battery holds 1,200 Wh; two in series make a 24 V 100 Ah bank of 2,400 Wh.
Step 2: Find the power taken from the battery
AC appliances run through an inverter, which loses part of the energy as heat. The battery has to supply the load plus that loss:
Battery power (W) = load (W) ÷ efficiency
Typical efficiencies: 85–95% for a modern pure sine wave inverter at a sensible share of its rating, about 85% for a UPS or a power station’s AC outlets, and 95–100% for loads wired straight to the battery. Inverters also draw idle power, often 5–30 W, which matters at very light loads: add it to the load if you know it.
Step 3: Count only the usable capacity
Draining a battery completely shortens its life, and many systems cut off before it is empty. The share you can use is the depth of discharge (DoD). The calculators use these defaults, which you can change:
| Battery type | Usable (DoD) | Peukert exponent |
|---|---|---|
| LiFePO4 lithium | 90% | 1.05 |
| Lithium-ion (NMC) | 90% | 1.05 |
| AGM / sealed lead-acid | 50% | 1.15 |
| Gel lead-acid | 50% | 1.15 |
| Tubular / flooded lead-acid | 50% | 1.25 |
The 50% figure for lead-acid is a lifespan choice, not a hard limit: a UPS or home inverter will take a lead-acid battery to 80–85% before cutting off, and the UPS and inverter calculators use those values. LiFePO4 handles deep cycling well, so 90% leaves a margin while using most of the battery.
Step 4: Correct for the discharge rate (Peukert’s law)
A battery’s Ah rating is measured over a set time, usually 20 hours. Drain it faster and it delivers less, an effect that is strong in lead-acid and small in lithium. Peukert’s law models it:
t = H × (C ÷ (I × H))k
Here t is the time to empty in hours, H the rated discharge time (20 h), C the rated capacity, I the current and k the Peukert exponent. Because voltage cancels out of the ratio C ÷ (I × H), the same formula works with watt-hours and watts, which is how the calculators apply it.
At loads lighter than the 20-hour rate, the formula predicts more than the rated capacity. Real batteries do give slightly more at very low currents, but not reliably, so the calculators cap the result at the rated capacity. Share of a 1,200 Wh battery’s rating delivered at different loads:
| Load on 1,200 Wh | C-rate | k = 1.05 (lithium) | k = 1.15 (AGM) | k = 1.25 (flooded) |
|---|---|---|---|---|
| 60 W | 0.05C | 100% | 100% | 100% |
| 120 W | 0.10C | 97% | 90% | 84% |
| 240 W | 0.20C | 93% | 81% | 71% |
| 600 W | 0.50C | 89% | 71% | 56% |
| 1200 W | 1.00C | 86% | 64% | 47% |
Peukert’s law is an approximation fitted to constant-current discharge. It is useful for comparing loads but less accurate for loads that switch on and off, for very high currents, and across temperatures.
Step 5: Adjust for battery health
Every battery loses capacity as it ages. A battery at 80% state of health holds 80% of its original capacity, so it runs 80% as long. Cold also reduces available capacity, especially for lead-acid; if your battery lives somewhere cold, lower the health setting to allow for it.
Putting it together
Runtime (h) = min(H × (Wh ÷ (Pb × H))k, Wh ÷ Pb) × DoD × health
where Pb = load (W) ÷ efficiency
Worked example 1: LiFePO4 battery and a 100 W appliance
- Battery: 12 V 100 Ah LiFePO4 = 1,200 Wh
- Battery power: 100 W ÷ 0.90 = 111 W
- Rate: 1,200 ÷ (111 × 20) = 0.54, raised to the power 1.05 and × 20 = 10.5 h to empty (97% of the rating)
- Usable at 90%: 10.5 × 0.9 = 9.43 h (9 h 26 min)
Worked example 2: a small UPS at 200 W
- Battery: 12 V 7 Ah AGM = 84 Wh
- Battery power: 200 W ÷ 0.85 = 235 W, a discharge rate of 2.8C
- Without Peukert: 84 Wh × 80% ÷ 235 W = 17 minutes
- With Peukert (k = 1.15) the battery delivers only 55% of its rating at this rate: 9 min
The second example is why simple calculators overestimate UPS runtime: small lead-acid batteries under heavy loads are exactly where Peukert’s law bites.
Sizing a battery: the same formula in reverse
The battery size calculator and solar battery calculator solve the formula for capacity. Ignoring Peukert, the rated energy needed for a runtime T is Pb × T ÷ (DoD × health). With Peukert, the capacity must also satisfy H × (Wh ÷ (Pb × H))k ≥ T ÷ (DoD × health), which gives Wh ≥ Pb × H × (T′ ÷ H)1/k, with T′ = T ÷ (DoD × health). The calculators use whichever requirement is larger, then round up to whole batteries.
Converting between Ah, mAh and Wh
Amp-hours measure charge; watt-hours measure energy. Voltage links them: Wh = Ah × V, and mAh = Ah × 1,000. A 10,000 mAh power bank with 3.7 V cells is 10 Ah × 3.7 V = 37 Wh. Always use the battery’s own nominal voltage, never the 5 V USB or 120/230 V AC output. The Ah to Wh calculator and mAh to Wh calculator do the conversion both ways.
How charging time is calculated
The battery charge time calculator splits a charge into two stages. In the bulk stage the charger delivers its full current; above a taper point (about 95% for lithium, 80% for lead-acid) it holds the voltage and the current falls, which we model as 50% of the rated current on average. Charge efficiency is 95% for lithium and 85% for lead-acid.
Time (h) = Ah in bulk ÷ (A × eff) + Ah in taper ÷ (A × 0.5 × eff)
Example: a 100 Ah AGM battery from 50% on a 10 A charger needs 3.53 h of bulk charging and 4.71 h of absorption, 8 h 14 min in total. Real absorption time depends on the charger’s voltage settings and the battery’s age, so treat it as an estimate.
What the calculators do not model
- Inverter idle draw (add it to the load) and inverter low-voltage cut-off thresholds, which vary by model.
- Self-discharge, which matters over weeks and months rather than hours.
- Temperature directly: use the battery health setting as an allowance.
- Varying loads: use the average power over the period. For motors and compressors, the start-up surge affects inverter sizing, not runtime.
Treat every result as an estimate. Before buying batteries or relying on a system for medical equipment, confirm with the battery and inverter datasheets.