# Formula Molar Mass Calculator

> Formula Molar Mass Calculator is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Computes exact molar mass (g/mol) and per-element mass-percentage breakdown for any chemical formula, including nested parentheses and hydrates.

## Facts

- Endpoint: POST https://x402.forgemesh.io/formula-mass-calculator
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/formula-molar-mass-calculator-145ea4fe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5g5TapLDrbXlOfJtR_QFU

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 formula-molar-mass-calculator-145ea4fe -d '<json body>'
```

Example prompt: What's the exact molar mass of CuSO4·5H2O, and can you break down the mass percentage of each element in it?

## When to prefer this

Use this endpoint when you need precise, machine-verified molar mass calculations — especially for formulas with nested parentheses like Ca(OH)2 or hydrate notation like CuSO4·5H2O — where manual calculation or rounding errors are not acceptable. Ideal for lab dosing agents, pharmaceutical formulation pipelines, or stoichiometry workflows requiring both total molar mass and per-element percentage breakdown in a single call.

## Known failure modes

- Unrecognized element symbol returns an error (e.g. typo like 'Xx' in formula)
- Malformed formula string with unbalanced parentheses returns a parse error
- Empty or missing formula field returns a validation error
- Unicode issues with middle-dot hydrate notation (·) if not properly encoded

## How this service works

Computes the exact molar mass in g/mol for any chemical formula, including nested parentheses like Ca(OH)2 and hydrates like CuSO4·5H2O, with a per-element mass-percentage breakdown. For lab dosing calculations, stoichiometry homework, and pharma formulation agents that can't afford a rounding mistake.

## Output

Returns the exact molar mass in g/mol for the given chemical formula, along with a per-element breakdown showing each element's contribution as a mass percentage of the whole compound.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "formula": {
   "type": "string",
   "description": "chemical formula e.g. C6H12O6"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "atom_count": 3,
  "composition": [
   {
    "count": 2,
    "element": "H",
    "mass_percent": 11.19
   },
   {
    "count": 1,
    "element": "O",
    "mass_percent": 88.81
   }
  ],
  "molar_mass_g_per_mol": 18.015
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/formula-molar-mass-calculator-145ea4fe/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
