---
title: "Converts battery capacity from milliamp-hours (mAh) to watt-hours (Wh), kilowatt-hours (kWh), and joules (J) given the nominal cell voltage. This is the most common battery unit conversion needed when comparing cells rated in mAh (e.g. 18650, AA) against energy budgets specified in Wh. Essential for airline lithium battery compliance (100 Wh limit for carry-on), solar battery bank sizing, and UPS capacity planning. Echoes back input values for easy chaining into battery_life, solar_sizing, and ups_runtime tools."
method: POST
path: "/api/mah_to_wh"
tags: ["power"]
---

# Converts battery capacity from milliamp-hours (mAh) to watt-hours (Wh), kilowatt-hours (kWh), and joules (J) given the nominal cell voltage. This is the most common battery unit conversion needed when comparing cells rated in mAh (e.g. 18650, AA) against energy budgets specified in Wh. Essential for airline lithium battery compliance (100 Wh limit for carry-on), solar battery bank sizing, and UPS capacity planning. Echoes back input values for easy chaining into battery_life, solar_sizing, and ups_runtime tools.

`POST /api/mah_to_wh`

## Request

- Base URL: `https://calc.engineer`
- URL: `https://calc.engineer/api/mah_to_wh`
- Auth: none declared

## Request body

- object
  - `capacity_mah` number, required: Battery capacity in milliamp-hours (mAh)
  - `voltage_v` number, required: Nominal battery voltage (V)

## Response `200`

Computed result for mah_to_wh

- object
  - `result` object, required
    - `wh` number, required: Energy in watt-hours
    - `kwh` number, required: Energy in kilowatt-hours
    - `joules` number, required: Energy in joules
    - `mah` number, required: Input capacity echoed back (mAh)
    - `voltage_v` number, required: Input voltage echoed back (V)
  - `tool` string, required
  - `version` string, required
  - `computed_at` string, date-time, required
  - `chain` object, required
    - `feeds` unknown[]
      - unknown
    - `accepts_from` unknown[]
      - unknown

## Other responses

- `400`: Validation error or invalid JSON
- `404`: Tool not found

---

[API](https://skmtc.dev/calc/apis/calc-engineer-api.md) · [All operations](https://skmtc.dev/calc/apis/calc-engineer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calc/apis/calc-engineer-api/revisions/8830480ec488?raw)
