Molar mass
molar_massParse a chemical formula to calculate molar mass in g/mol and the mass each element contributes, including brackets and hydrates.
Instructions
Parse a chemical formula and return the molar mass in g/mol with the mass each element adds. Handles brackets and hydrates like CuSO4.5H2O.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formula | Yes | Chemical formula like H2O, Ca(OH)2 or CuSO4.5H2O. Write each element with a capital first letter. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mass | Yes | ||
| breakdown | Yes |