Board Power Budget and Battery Runtime Calculator
List each load with voltage, current and supply path (direct / LDO / DC-DC) to get total input power and current, a margin-inclusive supply rating, and battery runtime converted through energy. Calculated in the browser; nothing is uploaded.
Result
Worked examples
Every row is produced by our Python reference implementation using the same constants and thresholds the page recalculates with; decimals go only as far as you can hand-check.
| Case | Inputs | Total output-side power W | Total power referred to the input W | Total input current A | Recommended supply current with margin A | Highest single LDO dissipation W | Usable battery energy Wh | Runtime at average power h |
|---|---|---|---|---|---|---|---|---|
| Default four loads (ESP32 gateway: 0.12 + 0.04 + 0.02 A @3.3 V through an LDO, 0.15 A @5 V direct) | 5 V · 4 loads · 25 % · 2000 mAh · 3.7 V · 80 % | 1.344 | 1.650 | 0.330 | 0.413 | 0.204 | 5.92 | 3.59 |
| The same loads fed from 12 V: the LDO dropout grows and efficiency collapses | 12 V · 4 loads · 25 % · 2000 mAh · 3.7 V · 80 % | 1.344 | 2.910 | 0.243 | 0.303 | 1.044 | 5.92 | 2.03 |
| Replace the three 3.3 V LDO rows with DC-DC at 90% efficiency | 5 V · 4 loads · 25 % · 2000 mAh · 3.7 V · 80 % | 1.344 | 1.410 | 0.282 | 0.353 | 0.000 | 5.92 | 4.20 |
Where the number comes from
- η: direct = 100%; LDO = Vout/Vin (linear regulation, the rest becomes heat); DC-DC = the efficiency you enter
- V_in: input rail voltage, i.e. the USB or adapter voltage
- margin: headroom on the supply rating, covering inrush and peaks; it does not take part in the runtime maths
- C · V_batt · DoD: battery capacity × nominal voltage × usable share, in Wh
The fit reproduces the published IPC-2221 current capacity chart; it is not the standard text. All constants are listed below, please check them.
Constants: k=0.048 (outer layer) / 0.024 (internal layer) · b=0.44 · c=0.725 · 1 oz=1.378 mil=35 µm · 1 mil=0.0254 mm=25.4 µm · rho(Cu, 20 °C)=0.0172 ohm·mm²/m
What this result cannot be used to decide
This is a steady-state average power budget, not a power supply certificate: it excludes startup inrush and capacitor charging shocks, battery internal resistance and cold-temperature derating, DC-DC light-load efficiency curves and switching losses, and sleep current with wake frequency. Battery products must be re-checked against the measured discharge curve at your target temperature.
Frequently asked questions
Why is an LDO counted as an efficiency loss?
An LDO regulates linearly: input power is V_in × I, and the difference (V_in − V_out) × I turns into heat. So 5 V in, 3.3 V out is only 66% efficient. The page writes that as η = Vout/Vin and also reports the dissipation, so you can judge whether that regulator can sit on a small footprint.
Why not divide battery mAh by the load current?
Because battery voltage and system voltage are not the same number. 3.7 V × 2000 mAh = 7.4 Wh is the energy in the cell, and the system consumes energy at the input side, so runtime = usable Wh ÷ P_in. Dividing mAh by a 5 V-side current overstates runtime by roughly V_in/V_batt (about 1.35× here).
Where does the default 25% margin come from?
It is a starting point we chose, not a standard. It covers WiFi transmit peaks, motor and servo startup, capacitor charging inrush, ageing and high-temperature derating. Change it freely; it only moves the recommended supply current, never the runtime — margin buys instantaneous capability, not energy.
What depth of discharge should I enter?
80% is the usual conservative figure for lithium cells, leaving room for the end-of-discharge voltage sag. LiFePO4 and packs with a protection board should use the vendor usable capacity instead. This number scales runtime linearly, so do not treat the nominal capacity as usable.
So which power supply should I buy?
Read the "recommended supply current with margin" row and round up to a common rating (1 A / 1.5 A / 2 A / 3 A). If the source is a USB port, remember USB 2.0 ports are capped at 500 mA — exceeding it means one cable cannot feed the board.
Do my inputs get uploaded?
No. This page calculates in the browser only: no backend call, no database write, no analytics. Everything disappears when you close it. That is also why the constants are printed on the page — so you can check what it actually computes.
Related on this site
Data and formulas last checked:2026-11-02