# Battery Runtime Calculator

> Battery Runtime Calculator is a paid API for AI agents from electronics-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-21).

Estimates how long a battery will last given its capacity (mAh/V or Wh), load (mA or W), converter efficiency, and usable depth of discharge.

## Facts

- Endpoint: GET https://electronics-calc.x402tookit.com/battery-runtime?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/battery-runtime-calculator-1f4976c6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cO5F_OWFlm6VAO4msBK4O

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability battery-runtime-calculator-1f4976c6
```

Example prompt: How long will a 10000 mAh battery at 3.7V last powering a device that draws 250 mA, assuming 85% converter efficiency and 80% usable capacity?

## When to prefer this

Use this endpoint when you need a quick, parametric battery runtime estimate during circuit design, product planning, or field deployment — especially when you need to account for converter efficiency losses and depth-of-discharge constraints. Prefer this over manual spreadsheet calculations or generic formulas when you want a structured JSON result with summary text and multiple time-unit outputs.

## Known failure modes

- Missing both capacity inputs (neither mAh+voltage nor Wh provided) returns an error
- Missing both load inputs (neither mA nor W) returns an error
- Zero or negative values for capacity or load produce invalid/error responses
- Efficiency or usable percentage outside 0-100 range may produce unexpected results
- Conflicting inputs (e.g. both mAh and Wh with inconsistent values) may yield unexpected results

## How this service works

Battery runtime estimate from capacity (mAh and volts, or Wh) and load (mA or W), with efficiency and usable depth of discharge.

## Output

Returns estimated battery runtime as hours, minutes, and days alongside supporting values: load in watts, effective capacity in watt-hours, usable fraction applied, efficiency factor, a plain-English summary, and a disclaimer about real-world variation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "loadW": {
       "type": "number",
       "description": "Load in watts (instead of mA)"
      },
      "loadMa": {
       "type": "number",
       "description": "Load in mA at the battery voltage"
      },
      "voltage": {
       "type": "number",
       "description": "Battery nominal volts (with mAh)"
      },
      "usablePct": {
       "type": "number",
       "description": "Usable capacity, default 80 (protects battery life)"
      },
      "capacityWh": {
       "type": "number",
       "description": "Capacity in watt-hours (instead of mAh)"
      },
      "capacityMah": {
       "type": "number",
       "description": "Capacity in mAh (with voltage)"
      },
      "efficiencyPct": {
       "type": "number",
       "description": "Converter efficiency, default 90"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "loadW": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "capacityWh": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "efficiency": {
       "type": [
        "null",
        "number"
       ]
      },
      "idealHours": {
       "type": [
        "null",
       
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/battery-runtime-calculator-1f4976c6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from electronics-calc.x402tookit.com](https://www.zero.xyz/host/electronics-calc.x402tookit.com/llms.txt)
