← All tool references

Engineering · not_available

Battery Life Calculator

Estimate device runtime from battery capacity, current draw, and usable efficiency.

Open public tool

Overview

Category
Engineering
API mode
not_available
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/battery-life-calculator

View this descriptor as JSON

Execute availability

This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.

POST /api/v1/tools/battery-life-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

battery_capacity · number · required
Enter the battery capacity used by this tool.
average_load · number · required
Enter the average device load used by this tool.
usable_efficiency · number · required
Enter the usable capacity efficiency used by this tool.
reserve_percent · number · required
Enter the reserve capacity used by this tool.
{
    "type": "object",
    "properties": {
        "battery_capacity": {
            "type": "number",
            "description": "Enter the battery capacity used by this tool.",
            "minimum": 0
        },
        "average_load": {
            "type": "number",
            "description": "Enter the average device load used by this tool.",
            "minimum": 9.99999999999999954748111825886258685613938723690807819366455078125e-7
        },
        "usable_efficiency": {
            "type": "number",
            "description": "Enter the usable capacity efficiency used by this tool.",
            "minimum": 1,
            "maximum": 100
        },
        "reserve_percent": {
            "type": "number",
            "description": "Enter the reserve capacity used by this tool.",
            "minimum": 0,
            "maximum": 99
        }
    },
    "required": [
        "battery_capacity",
        "average_load",
        "usable_efficiency",
        "reserve_percent"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

runtime_hours · number
Estimated runtime produced by the tool.
runtime_days · number
Runtime in days produced by the tool.
usable_capacity · number
Usable capacity produced by the tool.
energy_used_per_day · number
Capacity used per day produced by the tool.
{
    "type": "object",
    "properties": {
        "runtime_hours": {
            "type": "number",
            "description": "Estimated runtime produced by the tool."
        },
        "runtime_days": {
            "type": "number",
            "description": "Runtime in days produced by the tool."
        },
        "usable_capacity": {
            "type": "number",
            "description": "Usable capacity produced by the tool."
        },
        "energy_used_per_day": {
            "type": "number",
            "description": "Capacity used per day produced by the tool."
        }
    },
    "additionalProperties": false
}

Battery Life Calculator example

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/battery-life-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "battery_capacity": 5000,
    "average_load": 350,
    "usable_efficiency": 85,
    "reserve_percent": 10
}'
{
    "ok": true,
    "data": {
        "slug": "battery-life-calculator",
        "result": {
            "values": {
                "runtime_hours": 10.9285709999999998132125256233848631381988525390625,
                "runtime_days": 0.4553570000000000117523768494720570743083953857421875,
                "usable_capacity": 3825,
                "energy_used_per_day": 8400
            },
            "display": {
                "display": "10.928571"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.