ForHosting KIT · Engineering & construction

Battery capacity calculator

Divide a battery's amp-hour rating by the current your device draws to estimate how long it runs: a 100 Ah bank feeding a 5 A load lasts 20 hours. A first-pass figure for sizing packs and briefing customers. 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
Capacity ah
100
Current draw a
5
You get
Runtime hours
20
Runtime minutes
1,200
Runtime days
0.8333333333

A battery's nameplate capacity in amp-hours is only half of a runtime estimate: you still need the current the device actually draws. This battery capacity calculator combines those two quantities into a single transparent divide. Send a positive capacity in amp-hours and a positive device current in amperes; the result is estimated hours of operation, with minutes and days derived for planning. Field technicians, product designers, educators, and off-grid installers use that first-pass figure to size packs, check datasheets, and brief customers before applying chemistry-specific derating.

What amp-hour capacity means and how hours fall out of it

Battery capacity in amp-hours is a charge rating: one amp-hour means the pack can theoretically deliver one ampere for one hour, or any equivalent product of current and time that multiplies to the same charge. Device current draw is the average current the load takes while it is running. Dividing capacity by current therefore yields hours of operation under a constant-current idealization: a one-hundred amp-hour bank driving a five-ampere load lasts twenty hours; a twelve amp-hour motorcycle battery at half an ampere lasts twenty-four hours.

The identity is the same whether you think in hours equals amp-hours over amperes or in the rearranged form amp-hours equals amperes times hours. This page is the capacity-first form of that identity: you already know the nameplate amp-hour rating and the measured or specified draw, and you want the runtime in hours. The model assumes the full nameplate capacity is usable, the current is constant, and voltage cutoff, temperature, and rate effects are handled in a later planning step.

It does not apply a depth-of-discharge fraction, an inverter efficiency, or a Peukert exponent; those adjustments belong on capacity or current before you call if you need a more conservative field number.

Where an amp-hour capacity calculator earns its keep

Product teams use a battery capacity calculator when a datasheet lists amp-hours and a prototype log lists average current, and they need hours of operation for packaging claims, firmware sleep budgets, or support answers. Off-grid lighting and radio kits convert a known amp-hour bank and a lamp or transceiver current into an overnight runtime so installers can say how long the lights stay on after dusk without running a full discharge test on site.

Classroom laboratories assign the same divide so students connect nameplate capacity to measured amperage and see why mixing milliamp-hours with amperes produces nonsense. If you only have milliamp-hours and milliamps, convert first or use a milliamp-hour specific tool; if you only have watt-hours and watts, use an energy-based runtime tool. Keeping those search intents on separate pages avoids mixing units and keeps each calculator honest about exactly which two numbers it divides.

Datasheet amp-hours to product uptime

Turn a pack's nameplate amp-hour rating and a measured average device current into hours of operation for packaging, firmware budgets, and support answers.

Off-grid lighting and radio kits

Estimate overnight runtime from a known amp-hour bank and a lamp or transceiver current so installers can brief customers without a full discharge test.

How does the battery capacity calculator estimate hours of operation?

Both inputs must be finite and strictly greater than zero.

What units should I send for capacity and current?

Capacity is amp-hours (Ah) and current is amperes (A). Convert milliamp-hours and milliamps first by dividing each by one thousand: 3000 mAh is 3 Ah and 150 mA is 0.15 A.

Why are zero and negative values rejected?

A non-positive capacity cannot store usable charge, and a non-positive current makes hours of operation undefined or infinite.

Does this apply a depth-of-discharge or Peukert correction?

No. The model uses the full nameplate amp-hour value and a constant current. Apply chemistry or rate adjustments to capacity or current yourself before calling if you need a more conservative field estimate.

How do I use a capacity in milliamp-hours?

Divide it by 1000 first: 3000 mAh is 3 Ah, and a 150 mA draw is 0.15 A. Entering milliamp-hours as if they were amp-hours inflates the runtime a thousandfold.

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-capacity

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-capacity \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"capacity_ah":100,"current_draw_a":5}'
{
  "capacity_ah": 100,
  "current_draw_a": 5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "elec.battery_capacity",
  "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.

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.

Capacity and current must both be finite and strictly greater than zero; a zero or negative value is rejected with invalid_input because hours of operation would be undefined or physically meaningless.

What amp-hour capacity means and how hours fall out of it

Because the arithmetic is a single divide of finite positive numbers, identical inputs always produce identical JSON, with hours, minutes, and days rounded to twelve decimal places for stable comparison across JavaScript engines and for automated grading of student work.

Input contract, units, response shape, and errors

Both must be finite numbers strictly greater than zero. Zero and negative values fail with a message that the field must be a positive number, because a non-positive capacity cannot store usable charge and a non-positive current makes hours undefined or infinite. Convert milliamp-hours to amp-hours by dividing by one thousand before you call: a three-thousand milliamp-hour cell is three amp-hours, and a one-hundred-fifty milliamp draw is zero point one five amperes. Optional output fields are omitted rather than set to null. Failed validation is not billed. Send a JSON object with two required fields. capacity_ah is the battery capacity in amp-hours; current_draw_a is the device current draw in amperes. Numeric strings are accepted so forms and spreadsheets can paste values without an extra parse step; empty strings, missing keys, NaN, and Infinity fail with invalid_input naming the field. Do not mix units—feeding milliamp-hours as if they were amp-hours inflates runtime by a thousand and will mislead anyone who treats the JSON as a field estimate. On success the response echoes capacity_ah and current_draw_a, returns runtime_hours as capacity divided by current, runtime_minutes as hours times sixty, runtime_days as hours divided by twenty-four, and a formula string restating runtime_hours equals capacity_ah over current_draw_a. Keep requests small: this is a single analytic item priced at $0.002 per successful call, with no model tokens and no outbound network on the math path.

Where an amp-hour capacity calculator earns its keep

Field service scripts batch many pack sizes against one measured current, or one pack against many load modes, and store the JSON hours next to the work order for later audit. Because the implementation is pure parse with no model tokens and no outbound network, each successful API call costs the published $0.002 and completes in well under a millisecond on typical payloads. Prefer this endpoint when your inputs are already in amp-hours and amperes and you want a transparent hours figure—not a milliamp-hour consumer-cell landing, not a watt-hour energy landing, and not a chemistry simulator.

Classroom labs and homework checks

Grade the classic hours-equals-amp-hours-over-amperes drill with a deterministic JSON result that rejects zero and negative inputs the same way a teacher would.

What does the battery capacity calculator cost?

The browser tool is free. Successful API requests use prepaid KIT balance at $0.002 per call; invalid input is not billed.

Read the full KIT documentation →