Molar Mass Calculator
Type a chemical formula to get its molar mass in g/mol, the mass percentage of each element, and an instant grams ↔ moles conversion — brackets and hydrates included.
Molar Mass Calculator
Case matters (Co is cobalt, CO is carbon monoxide). Use ( ) or [ ] for groups and · or * for hydrates, e.g. Fe2(SO4)3 or Na2CO3·10H2O.
Runs in your browser — nothing you enter is uploaded or stored.
Scratchpad auto-saved
How it works — in four simple steps
No signup and nothing to install — it all runs in your browser.
Type the formula
Use correct capitals; subscripts are just numbers (H2SO4).
Read the molar mass
The total in g/mol updates instantly.
Check the composition
See each element's atoms, mass contribution and percentage.
Convert
Enter grams to get moles and molecules, or moles to get grams.
Case matters: Co is cobalt, CO is carbon monoxide.
Features
Brackets and hydrates
Nested ( ), [ ] and { } groups and ·/* hydrates like Na₂CO₃·10H₂O.
Mass percent composition
A breakdown table and donut chart of each element's share of the mass.
Grams ↔ moles
Convert a mass to moles and number of molecules, or moles to grams.
CIAAW 2024 atomic weights
The same standard atomic weights as IUPAC's current periodic table.
Clear errors
Unknown symbols and unmatched brackets are pointed out — including the classic Co vs CO mix-up.
About the Molar Mass Calculator
The molar mass of a compound is the sum of the atomic weights of the atoms in its formula, expressed in grams per mole. For water, H₂O: 2 × 1.0080 + 15.999 = 18.015 g/mol. One mole contains the Avogadro number of formula units, exactly 6.02214076 × 10²³ since the 2019 SI redefinition.
The calculator parses the formula as you type: element symbols (case matters), numbers, nested brackets such as Fe₂(SO₄)₃ or K₄[Fe(CN)₆], and hydrates written with a dot or asterisk, like CuSO₄·5H₂O. It uses the standard atomic weights published by CIAAW in 2024 (abridged values — the precision periodic tables and textbooks use); radioactive elements without a standard weight use the mass number of their most stable isotope and are marked.
Below the result, the mass composition shows how much of the compound's mass each element contributes — useful for empirical-formula problems and fertiliser or alloy calculations — and the converter turns a mass in grams into moles and number of molecules, or back.