ForHosting KIT · Engineering & construction

Battery runtime calculator

Divide the usable energy in watt-hours by the load power in watts to see how long a pack keeps a device running: 72 Wh into a 12 W load lasts 6 hours. Handy for power banks, camera rigs and backup hold-up times. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Energy wh
100
Power w
10
You get
Hours
10 h
Minutes
600
Seconds
36,000
Precision
10

This battery runtime calculator turns usable stored energy in watt-hours and a constant load power in watts into the operating time you can expect before the pack is empty. The relation is fully deterministic: time in hours equals energy in watt-hours divided by power in watts, which is the same first-order energy balance used on datasheets, UPS labels, and portable-power marketing when efficiency and Peukert effects are ignored. Zero energy with a positive load yields zero runtime; zero load is rejected because division by zero would imply infinite run time rather than a usable number. Small checks you may already know include one hundred watt-hours into a ten-watt load for ten hours, fifty watt-hours into a twenty-five-watt load for two hours, and seventy-two watt-hours into a twelve-watt load for six hours. The engine uses only finite arithmetic with no network calls, no sampling, and no date-dependent shortcuts.

What battery runtime means and what you get

Battery runtime under a constant load is the interval during which a fixed amount of usable energy can sustain a fixed power draw. Power is the rate of energy transfer; dividing stored energy by that rate recovers time. With energy given in watt-hours and power in watts, the closed form is t equals E divided by P in hours.

Multiplying by sixty and by three thousand six hundred yields minutes and seconds for the same duration, which helps when a datasheet lists hours while a product UI prefers minutes. This calculator is not a full battery model: it does not apply Peukert exponents, temperature derating, converter efficiency, depth-of-discharge limits, or self-discharge. It answers only the ideal constant-power drain of a stated watt-hour capacity.

Zero energy with a strictly positive load is valid and yields zero runtime.

Where a battery runtime calculator fits in study, product design, and software

Students meet watt-hours and runtime when a physics unit introduces energy versus power, when a lab asks how long a battery can run a known lamp or motor, or when a contest problem gives capacity and load without calculus. Product designers and hobbyists use the same first-order estimate to size portable power banks, camera rigs, IoT nodes, and UPS hold-up times before applying efficiency factors and safety margins.

Teachers can pre-generate answer keys for modest watt-hour and watt pairs without trusting opaque calculator apps that silently switch units or confuse milliamp-hours with watt-hours. Developers call the same contract from scripts to seed deterministic test vectors for battery UIs, to normalize user-entered capacity and load before a sizing wizard, or to satisfy programming-challenge statements that demand hours rather than a hand-waved sketch.

Pair it with the kilowatt-hour calculator when you first need energy from power and duty cycle, then convert stored watt-hours and a steady load into runtime here, and with other electronics helpers when you are building a small lab of free, deterministic energy tools.

Homework and lab runtime checks

Convert battery watt-hours and device watts into hours of operation before grading worksheets or lab reports.

Portable product and UPS sizing

Estimate first-order hold-up time for power banks, camera kits, IoT nodes, and UPS loads from nameplate Wh and W.

What does the battery runtime calculator cost?

It is free in your browser on this page.

What formula is used for runtime?

Operating time in hours is t = E / P, where E is usable battery energy in watt-hours and P is constant load power in watts. Minutes equal t·60 and seconds equal t·3600.

What happens if load power is zero?

Zero load would make operating time infinite (division by zero), which is not a usable answer.

Does this account for efficiency or Peukert’s law?

No. It uses the ideal constant-power model only. Apply efficiency, Peukert exponents, and temperature derating outside this tool if your application needs them.

Can battery energy be zero?

Yes. Zero energy with a positive load returns zero hours, zero minutes, and zero seconds. Negative energy is rejected.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/elec/battery-runtime-wh

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/elec/battery-runtime-wh \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"energy_wh":100,"power_w":10}'
{
  "energy_wh": 100,
  "power_w": 10
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "elec.battery_runtime_wh",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_abs_value1000000000000000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

What battery runtime means and what the response contains

The response returns the normalized energy in watt-hours, the load power in watts, the runtime in hours, minutes, and seconds, a method tag battery_runtime_wh, a short formula reminder, the precision used, and a unit hint for hours. There is no curve fitting, no Monte Carlo sampling of capacity fade, and no network lookup of cell chemistry: the engine either evaluates E over P inside the supported numeric range or rejects the input with invalid_input. Rejected cases include a missing energy or power field, non-finite values, magnitudes above the documented ceiling, any negative energy, any negative load, and any zero or numerically zero load, because infinite runtime is not a useful product answer.

How energy and load power are read and how runtime stays reproducible

Zero energy is allowed and returns zero hours when the load is positive. Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; embedded spaces and non-numeric tokens are rejected. The preferred field for battery energy is energy_wh, but aliases energy, wh, E, capacity_wh, and battery_wh are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. Energy must be finite and non-negative: a negative value fails with invalid_input and a message that names the field, so a bad cell does not become a silent nonsense result. The preferred field for load power is power_w, with aliases power, load, P, W, watts, and load_w. Power must be finite and strictly positive: zero load is rejected with invalid_input because operating time would be infinite, and any negative load is rejected because this tool models a consuming load rather than charging. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for the numeric outputs, defaulting to ten and capped at fifteen so JSON goldens stay stable. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the watt-hour over watt formula yourself.

Where a battery runtime calculator fits in study, product design, and software

Field and education tools use the endpoint when a learner types watt-hours and watts and the UI must show hours, minutes, and seconds next to a simple energy formula. On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result.

Deterministic test fixtures

Generate reproducible hours, minutes, and seconds for unit tests, battery UIs, and CI assertions on t = E/P.

Read the full KIT documentation →