{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"battery-runtime"},"result":{"entity_type":"calculator","id":"battery-runtime","calculator_id":"battery-runtime","canonical_url":"https://tttkmbb.com/engineering/battery-runtime","name":"Battery Runtime Calculator","title":"Battery Runtime Calculator – Hours of Operation from Capacity (mAh, Ah or Wh), Load and Depth of Discharge","category":"engineering","category_name":"Engineering & Automotive","tool_name":"estimate_battery_runtime","featured_mcp_tool":false,"description":"Estimates how long a battery runs a load from its capacity (mAh, Ah or Wh), nominal voltage, the load in watts or amperes, and the usable depth of discharge (80 % for lithium-ion, 50 % for lead-acid by default).","use_when":"You want to know how many hours a power bank, UPS, solar or vehicle battery will supply a given load, or size a battery for a required runtime.","do_not_use_when":"The load is intermittent or very high-rate (Peukert losses reduce lead-acid capacity above the 20-hour rate), or you need charging time (use battery-charge-time).","inputs":[{"name":"capacity_mah","label":"Capacity","type":"number","unit":"mAh","required":false,"exclusive_min":0,"description":"Rated capacity in milliampere-hours (phones, power banks). Give exactly one of capacity_mah, capacity_ah, capacity_wh.","example":10000},{"name":"capacity_ah","label":"Capacity","type":"number","unit":"Ah","required":false,"exclusive_min":0,"description":"Rated capacity in ampere-hours (car, solar and UPS batteries)."},{"name":"capacity_wh","label":"Capacity","type":"number","unit":"Wh","required":false,"exclusive_min":0,"description":"Rated energy in watt-hours (laptop packs, e-bikes)."},{"name":"voltage_v","label":"Nominal battery voltage","type":"number","unit":"V","required":false,"exclusive_min":0,"description":"Nominal voltage: 3.7 for a single lithium-ion cell or power bank rating, 12 / 24 / 48 for lead-acid and LiFePO4 banks. Needed to convert between Ah and W.","example":3.7},{"name":"load_w","label":"Load power","type":"number","unit":"W","required":false,"exclusive_min":0,"description":"Average power drawn by the load in watts. Give either load_w or load_a.","example":5},{"name":"load_a","label":"Load current","type":"number","unit":"A","required":false,"exclusive_min":0,"description":"Average current drawn by the load in amperes (needs voltage_v)."},{"name":"battery_type","label":"Battery chemistry","type":"enum","required":false,"default":"li_ion","values":[{"value":"li_ion","label":"Lithium-ion / LiPo / LiFePO4 (80 % usable)","aliases":["lithium","lipo","lifepo4","li-ion"]},{"value":"lead_acid","label":"Lead-acid / AGM / gel (50 % usable)","aliases":["agm","gel","sla"]}],"description":"Sets the default depth of discharge: 80 % for lithium chemistries, 50 % for lead-acid (deeper cycling shortens life).","example":"li_ion"},{"name":"depth_of_discharge_percent","label":"Usable depth of discharge","type":"number","unit":"%","required":false,"max":100,"exclusive_min":0,"description":"Override the usable fraction of capacity (100 = run until empty)."}],"outputs":[{"name":"battery_energy_wh","label":"Battery energy","type":"number","unit":"Wh","decimals":2,"description":"Rated energy: Ah × voltage_v, or capacity_wh as given."},{"name":"battery_capacity_ah","label":"Battery capacity","type":"number","unit":"Ah","decimals":3,"description":"Rated charge in ampere-hours (only when voltage_v is known or capacity was given in Ah/mAh)."},{"name":"depth_of_discharge_percent","label":"Depth of discharge used","type":"number","unit":"%","decimals":0,"description":"Usable fraction applied."},{"name":"usable_energy_wh","label":"Usable energy","type":"number","unit":"Wh","decimals":2,"description":"battery_energy_wh × depth_of_discharge / 100."},{"name":"load_power_w","label":"Load power","type":"number","unit":"W","decimals":3,"description":"Load in watts (load_a × voltage_v when current was given)."},{"name":"load_current_a","label":"Load current","type":"number","unit":"A","decimals":4,"description":"Load in amperes (load_w / voltage_v when power was given and voltage is known)."},{"name":"runtime_hours","label":"Runtime","type":"number","unit":"h","decimals":3,"description":"usable_energy_wh / load_power_w."},{"name":"runtime_formatted","label":"Runtime (h:mm:ss)","type":"string","decimals":4,"description":"Runtime as hours:minutes:seconds."},{"name":"runtime_to_empty_hours","label":"Runtime to 100 % discharge","type":"number","unit":"h","decimals":3,"description":"battery_energy_wh / load_power_w, ignoring the depth-of-discharge limit."}],"input_schema":{"type":"object","properties":{"capacity_mah":{"description":"Rated capacity in milliampere-hours (phones, power banks). Give exactly one of capacity_mah, capacity_ah, capacity_wh. Unit: mAh.","type":"number","exclusiveMinimum":0,"examples":[10000],"x-unit":"mAh"},"capacity_ah":{"description":"Rated capacity in ampere-hours (car, solar and UPS batteries). Unit: Ah.","type":"number","exclusiveMinimum":0,"x-unit":"Ah"},"capacity_wh":{"description":"Rated energy in watt-hours (laptop packs, e-bikes). Unit: Wh.","type":"number","exclusiveMinimum":0,"x-unit":"Wh"},"voltage_v":{"description":"Nominal voltage: 3.7 for a single lithium-ion cell or power bank rating, 12 / 24 / 48 for lead-acid and LiFePO4 banks. Needed to convert between Ah and W. Unit: V.","type":"number","exclusiveMinimum":0,"examples":[3.7],"x-unit":"V"},"load_w":{"description":"Average power drawn by the load in watts. Give either load_w or load_a. Unit: W.","type":"number","exclusiveMinimum":0,"examples":[5],"x-unit":"W"},"load_a":{"description":"Average current drawn by the load in amperes (needs voltage_v). Unit: A.","type":"number","exclusiveMinimum":0,"x-unit":"A"},"battery_type":{"description":"Sets the default depth of discharge: 80 % for lithium chemistries, 50 % for lead-acid (deeper cycling shortens life).","type":"string","enum":["li_ion","lead_acid"],"default":"li_ion","examples":["li_ion"]},"depth_of_discharge_percent":{"description":"Override the usable fraction of capacity (100 = run until empty). Unit: %.","type":"number","maximum":100,"exclusiveMinimum":0,"x-unit":"%"}},"additionalProperties":false},"output_schema":{"type":"object","properties":{"battery_energy_wh":{"description":"Rated energy: Ah × voltage_v, or capacity_wh as given. Unit: Wh.","type":"number","x-unit":"Wh"},"battery_capacity_ah":{"description":"Rated charge in ampere-hours (only when voltage_v is known or capacity was given in Ah/mAh). Unit: Ah.","type":"number","x-unit":"Ah"},"depth_of_discharge_percent":{"description":"Usable fraction applied. Unit: %.","type":"number","x-unit":"%"},"usable_energy_wh":{"description":"battery_energy_wh × depth_of_discharge / 100. Unit: Wh.","type":"number","x-unit":"Wh"},"load_power_w":{"description":"Load in watts (load_a × voltage_v when current was given). Unit: W.","type":"number","x-unit":"W"},"load_current_a":{"description":"Load in amperes (load_w / voltage_v when power was given and voltage is known). Unit: A.","type":"number","x-unit":"A"},"runtime_hours":{"description":"usable_energy_wh / load_power_w. Unit: h.","type":"number","x-unit":"h"},"runtime_formatted":{"description":"Runtime as hours:minutes:seconds.","type":"string"},"runtime_to_empty_hours":{"description":"battery_energy_wh / load_power_w, ignoring the depth-of-discharge limit. Unit: h.","type":"number","x-unit":"h"}}},"formula":"battery_energy_wh = capacity_ah × voltage_v (capacity_mah / 1000 × voltage_v) or capacity_wh; load_power_w = load_a × voltage_v; runtime_hours = battery_energy_wh × depth_of_discharge_percent / 100 / load_power_w","method":"Linear estimate at the nominal voltage; real capacity falls at high discharge rates (Peukert effect, mainly lead-acid), low temperatures and with age. Inverter or converter losses (typically 10–15 %) are not included: divide the runtime by the efficiency if the load runs through an inverter.","sources":[{"name":"Battery University – BU-501: Basics about Discharging","url":"https://batteryuniversity.com/article/bu-501-basics-about-discharging","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wikipedia – Depth of discharge","url":"https://en.wikipedia.org/wiki/Depth_of_discharge","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"10,000 mAh 3.7 V power bank, 5 W load","inputs":{"capacity_mah":10000,"voltage_v":3.7,"load_w":5},"expected":{"battery_energy_wh":37,"battery_capacity_ah":10,"depth_of_discharge_percent":80,"usable_energy_wh":29.6,"load_power_w":5,"load_current_a":1.3514,"runtime_hours":5.92,"runtime_formatted":"5:55:12","runtime_to_empty_hours":7.4},"url":"https://tttkmbb.com/api/v1/calculate/battery-runtime?capacity_mah=10000&voltage_v=3.7&load_w=5"},{"name":"100 Ah 12 V lead-acid, 10 A load","inputs":{"capacity_ah":100,"voltage_v":12,"load_a":10,"battery_type":"lead_acid"},"expected":{"battery_energy_wh":1200,"depth_of_discharge_percent":50,"usable_energy_wh":600,"load_power_w":120,"runtime_hours":5,"runtime_to_empty_hours":10},"url":"https://tttkmbb.com/api/v1/calculate/battery-runtime?capacity_ah=100&voltage_v=12&load_a=10&battery_type=lead_acid"}],"faq":[{"q":"Why is a power bank's mAh rating misleading?","a":"It is quoted at the 3.7 V cell voltage. Boosting to 5 V USB output costs about 10–15 %, so a 10,000 mAh bank delivers roughly 6,000–6,500 mAh at 5 V; enter the load in watts to avoid the confusion."},{"q":"Why only 50 % for lead-acid?","a":"Lead-acid cycle life drops sharply with deeper discharge; 50 % is the common design limit for deep-cycle use, while lithium chemistries tolerate 80–90 %."}],"tags":["battery runtime","battery life calculator","how long will a battery last","mah to hours","depth of discharge"],"related":[{"calculator_id":"battery-charge-time","reason":"Time to recharge the same battery."},{"calculator_id":"solar-panel-output","reason":"Daily energy available to recharge from solar panels."},{"calculator_id":"electric-power","reason":"Find the load in watts from voltage and current."}],"links":{"html":"https://tttkmbb.com/engineering/battery-runtime","markdown":"https://tttkmbb.com/engineering/battery-runtime.md","json":"https://tttkmbb.com/engineering/battery-runtime.json","api":"https://tttkmbb.com/api/v1/calculate/battery-runtime","schema":"https://tttkmbb.com/api/v1/calculators/battery-runtime","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T01:51:01Z"}