# Battery life calculator > How long will your battery last? Runtime from battery capacity (mAh, Ah or Wh) and load, with an allowance for losses. Find how long a battery lasts from its capacity in mAh, Ah or Wh and the load in mA, A or W, with an allowance for losses and ageing. - Page: https://how.box/battery-life/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/about/terms/ ## Inputs Answer link: https://how.box/battery-life/?c={c}&cu={cu}&l={l}&lu={lu}&v={v}&u={u} - `c` (number 0.001 to 1e7): Battery capacity in cu. Example: `2000`. - `cu` (mah, ah or wh): mah, ah or wh. Example: `mah`. - `l` (number 0.001 to 1e7): Average load in lu. Example: `100`. - `lu` (ma, a or w): ma, a or w. Example: `ma`. - `v` (number 0.1 to 1000): Nominal battery voltage in volts. Example: `3.7`. - `u` (number 1 to 100): Usable share of the capacity, percent. Example: `80`. Example answer: https://how.box/battery-life/?c=2000&cu=mah&l=100&lu=ma&v=3.7&u=80 A complete link carries the primary answer in the page HTML; a missing or invalid value shows the default page. ## Agent tools - `battery_life_calculate`: Runtime of a battery under an average load. - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"battery_life_calculate","arguments":{"capacity":2000,"capacity_unit":"mah","load":100,"load_unit":"ma","voltage":3.7,"usable_percent":80}}}` - GET: https://how.box/mcp/run/battery_life_calculate?capacity=2000&capacity_unit=mah&load=100&load_unit=ma&voltage=3.7&usable_percent=80 ## How it works A battery stores a certain amount of charge or energy, and a device draws it at some rate. Divide one by the other and you get how long it lasts. Real batteries give back less than their label says, so the calculator lets you keep an allowance. Capacity in amp-hours (Ah) is charge; multiplied by the voltage it becomes energy in watt-hours: Wh = Ah × V, so 2000 mAh at 3.7 V is 7.4 Wh. A load in amps multiplied by the voltage is power in watts: 0.1 A × 3.7 V = 0.37 W. The runtime is the usable energy divided by the power: 7.4 Wh × 80 % ÷ 0.37 W = 16 hours. When both are charge (mAh and mA) or both energy (Wh and W), the voltage cancels out. The usable share is a planning allowance, not a physical constant: it covers conversion losses, the cut-off voltage at which a device stops and the loss of capacity with age and cold. Set it to 100 % for the ideal runtime. A real device rarely draws a steady load, so use a measured average, and expect a heavy draw to deliver less than a light one. ## FAQ **Can I compare two batteries by mAh alone?** Only if their voltages are the same. Compare watt-hours when the voltages differ, because the same charge can store different amounts of energy. **How many times can a power bank charge my phone?** Convert both batteries to watt-hours (mAh × volts ÷ 1000), divide the power bank's by the phone's and keep a margin, because the power bank loses part of its energy converting the voltage. **Should I enter the maximum current or the average current?** Use the average over the kind of use you want to estimate. A peak current describes a brief demand and will usually predict too short a runtime if treated as constant. **Can I use the output current printed on a USB charger?** That is usually the charger’s maximum output, not the device’s average draw. If the device runs at a different voltage from the battery, enter its power in watts and the battery’s own voltage. **Can this estimate how long charging takes?** No. It estimates discharge runtime; charging current often falls as a battery fills, so reversing the calculation would miss that change. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/about/agents/)