# Chemical Formula Molecular Weight Calculator

> Chemical Formula Molecular Weight 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).

Parses a chemical formula (including parentheses and hydrate notation) and returns total molar mass, per-element atom counts, and mass contributions for each element.

## Facts

- Endpoint: POST https://x402.forgemesh.io/chemical-formula-weight
- 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/chemical-formula-molecular-weight-calculator-13a87d27
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_q8y5EfxjHb8td3dgdtQUI

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 chemical-formula-molecular-weight-calculator-13a87d27 -d '<json body>'
```

Example prompt: What's the exact molar mass of copper sulfate pentahydrate (CuSO4·5H2O)? I need the total molecular weight, atom counts, and the mass contribution of each element.

## When to prefer this

Use this endpoint when you need an exact, computed molar mass with full element breakdown rather than a lookup or estimate — especially when the formula contains parentheses, nested groups, or hydrate notation (e.g. CuSO4·5H2O, Ca3(PO4)2). Ideal for chemistry coursework, reagent preparation calculations, and formulation workflows where precision matters.

## Known failure modes

- Invalid or unparseable chemical formula string returns an error
- Unknown element symbols in the formula cause a parse failure
- Malformed parentheses or unbalanced notation may result in error
- Empty formula field returns a validation error

## How this service works

Molecular weight calculator for chemical formulas: parses parentheses and hydrate notation to return total molar mass, atom counts, and the mass contribution of each element. For chemistry coursework, reagent prep, and formulation agents needing an exact figure instead of an estimated one.

## Output

Returns total molar mass in g/mol, atom counts per element, and the mass fraction/contribution of each element present in the formula. Handles nested parentheses and hydrate notation precisely.

## 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/chemical-formula-molecular-weight-calculator-13a87d27/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)
