This calculator works out the molar mass of a compound from its chemical formula and shows how much each element contributes. It reads parentheses, brackets and hydrates, so formulas like Ca(OH)2 and CuSO4·5H2O work as you would write them.
How it’s calculated
Molar mass is the mass of one mole of a substance. To find it, multiply the number of atoms of each element by that element’s atomic weight, then add the results:
Molar mass = Σ (atoms of element × atomic weight of element)Atomic weights come from the abridged table published by the IUPAC Commission on Isotopic Abundances and Atomic Weights. A number after a bracket multiplies everything inside it.
Worked example
Water, H2O, has two hydrogen atoms and one oxygen atom:
- Hydrogen: 2 × 1.008 = 2.016.
- Oxygen: 1 × 15.999 = 15.999.
- Add them: 2.016 + 15.999 = 18.015.
The molar mass of H2O is 18.015 g/mol.
Formulas with brackets and hydrates
In calcium hydroxide, Ca(OH)2, the 2 applies to both atoms in the bracket. That makes one calcium, two oxygen and two hydrogen atoms: 40.078 + (2 × 15.999) + (2 × 1.008) = 74.092 g/mol.
In copper(II) sulfate pentahydrate, CuSO4·5H2O, the 5 applies to the whole water molecule. That adds 10 hydrogen atoms and 5 oxygen atoms to the copper sulfate, for a total of 249.677 g/mol.
Molar mass of common compounds
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Ammonia | NH3 | 17.031 |
| Water | H2O | 18.015 |
| Carbon dioxide | CO2 | 44.009 |
| Sodium chloride | NaCl | 58.440 |
| Sulfuric acid | H2SO4 | 98.072 |
| Calcium carbonate | CaCO3 | 100.086 |
| Glucose | C6H12O6 | 180.156 |
Calculated from the IUPAC abridged atomic weights. Our tests check these values against the calculator.