---
title: "Calculate part mass from material density and part volume."
method: POST
path: "/tools/calculate_part_mass"
---

# Calculate part mass from material density and part volume.

`POST /tools/calculate_part_mass`

## Request

- Base URL: `https://api.mechanofab.com/v1`
- URL: `https://api.mechanofab.com/v1/tools/calculate_part_mass`
- Auth: HTTP bearer

Use when the user provides a part volume and material to calculate mass or weight. Returns mass in grams and kilograms. Example: 'How heavy is a 100cm³ aluminum 6061 part?'

## Request body

- object
  - `material_id` string, required: Material_ID from the materials dictionary
  - `volume_cm3` number, required: Part volume in cubic centimeters

## Response `200`

Tool result

- object
  - `material_name` string, required
  - `density_g_cm3` number, required
  - `volume_cm3` number, required: Input volume echoed back (pass-through). Use this value for downstream tools like quote_3dp.
  - `mass_g` number, required
  - `mass_kg` number, required
  - `source_tag` string, required

## Other responses

- `400`: Invalid request/input.
- `401`: Missing/invalid credentials.
- `402`: Insufficient credits.
- `403`: Scope/tool forbidden.
- `404`: Unknown resource.
- `409`: Idempotency conflict.
- `429`: Rate limited.
- `503`: Control plane / runtime unavailable.

---

[API](https://skmtc.dev/mechanofab/apis/mechanofab-api.md) · [All operations](https://skmtc.dev/mechanofab/apis/mechanofab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mechanofab/apis/mechanofab-api/revisions/5945a6fad621?raw)
