ChargeTimeCalculator

Charge Time API

The same deterministic formula that powers every calculator on ChargeTimeCalculator is available as a JSON API. It takes a battery capacity, a charger wattage and a chemistry, and returns an estimated charge time in minutes — useful for product pages, comparison tools, or internal dashboards.

Authentication

Send your key as an x-api-key header, or as an Authorization: Bearer <key> header. To try it out immediately outside of production, use demo-key.

Request

POST https://chargetimecalculator.com/api/v1/charge-time
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "wh": 100,
  "chargerWatts": 20,
  "fromPercent": 0,
  "toPercent": 100,
  "chemistry": "li-ion"
}

You can also pass deviceSlug instead of wh / chemistry to reuse one of our catalogued devices, for example "deviceSlug": "cordless-drill-18v".

Response

{
  "input": { "wh": 100, "chargerWatts": 20, "fromPercent": 0, "toPercent": 100, "chemistry": "li-ion" },
  "result": {
    "minutes": 353,
    "hours": 5.88,
    "effectiveWatts": 17,
    "whToCharge": 100,
    "taperApplied": true,
    "formatted": "5 h 53 min"
  }
}

Try it with curl

curl -X POST https://chargetimecalculator.com/api/v1/charge-time \
  -H "Content-Type: application/json" \
  -H "x-api-key: demo-key" \
  -d '{"wh": 60, "chargerWatts": 30, "chemistry": "li-ion"}'

Pricing

Contact us at hello@chargetimecalculator.com for an API key and current pricing. The demo-key is available for testing outside production and is not valid on the live API.