Molar Mass & Elemental Composition Calculator
Enter a chemical formula to get its molar mass (g/mol) and the mass-percent contribution of each element, with support for nested brackets and hydrates — parsed entirely in your browser.
Chemical formula
Case-sensitive: Co (cobalt) ≠ CO (carbon monoxide). Supports nested brackets and hydrates (·). Atomic weights: IUPAC-2021-conventional.
Molar mass & composition
Runs entirely in your browser. Your inputs are not uploaded or stored by Zerdly.
Before you rely on this: First-pass guide only. Verify safety-critical or regulated work against the relevant standards, your project requirements and a qualified professional.
How to use this calculator
- Type a formula, e.g. CaCO3, Ca3(PO4)2 or CuSO4·5H2O.
- Read the molar mass and the per-element atom count, mass and mass %.
- Watch for parser errors — a clear message points to the character position.
How it works
The molar mass is the sum of each element's atom count times its atomic weight: M = Σ (nᵢ · Aᵢ). The mass fraction of an element is nᵢ · Aᵢ ÷ M × 100. The parser handles parentheses and brackets with multipliers (so Ca₃(PO₄)₂ expands to Ca₃P₂O₈) and hydrate notation (CuSO₄·5H₂O adds 5 × H₂O).
Chemical notation is case-sensitive: Co is cobalt but CO is carbon-plus-oxygen, so the parser respects capitalisation and never guesses a malformed formula — it reports the problem instead. Atomic weights come from a versioned table shown in the method note, so results are reproducible.
Worked example
Calcium phosphate, Ca₃(PO₄)₂. Ca₃(PO₄)₂ expands to Ca₃P₂O₈. Molar mass = 3×40.078 + 2×30.974 + 8×15.999 = 120.234 + 61.948 + 127.992 = 310.174 g/mol, of which calcium is 120.234 ÷ 310.174 = 38.76%.
Common mistakes
- Case errors — writing 'co' or 'CO' when you mean cobalt (Co).
- Omitting a hydrate's water of crystallisation.
- Unbalanced brackets, which the parser rejects rather than guessing.
Frequently asked questions
Does it handle hydrates?
Yes — use the middle dot, e.g. CuSO4·5H2O, and the water of crystallisation is added to the molar mass.
Why is it case-sensitive?
Element symbols encode meaning in their capitalisation: Co (cobalt) is not the same as CO (carbon monoxide). Respecting case is the only way to parse formulas correctly.
Related tools
- Elements to Oxide Calculator
- Oxide Moles & Cations Calculator
- Shand Index (A/CNK & A/NK) Calculator
- Loss on Ignition (LOI) Calculator
- Assay Unit Converter
- Mg Number (Mg#) Calculator
Explore more in Geology, Geotechnical & Ground Engineering.
Cite this tool
Zerdly. (2026). Molar Mass & Elemental Composition Calculator. Retrieved from https://www.zerdly.com/tools/molar-mass-calculator/
Tip: Enter any known values to calculate the remaining results.
All calculations run in your browser. Your inputs are never saved or transmitted.



