Type a chemical formula to get its molar mass in grams per mole and the percentage of the mass contributed by each element. Brackets such as Ca(OH)₂ and Fe₂(SO₄)₃, and hydrates such as CuSO₄·5H₂O, are all supported. Add a sample mass to convert grams to moles.
What is molar mass?
The molar mass of a substance is the mass of one mole of it, in grams per mole (g/mol). One mole is exactly 6.02214076 × 10²³ particles, the Avogadro number, chosen so that the molar mass in grams is numerically equal to the substance’s relative molecular mass. It is the bridge between the mass you weigh out on a balance and the number of particles that take part in a reaction.
To find it, add up the standard atomic weights of every atom in the formula. Standard atomic weights are published by IUPAC’s Commission on Isotopic Abundances and Atomic Weights and reflect the natural mix of isotopes of each element; for elements with no stable isotopes, the mass number of the longest-lived isotope is used.
Formula
M = Σ (number of atoms × standard atomic weight)
Multiply each element’s atomic weight by how many times it appears in the formula and add the results. Atomic weights are the IUPAC standard values.
Write symbols with a capital first letter (Co is cobalt, CO is carbon monoxide). For hydrates, separate the parts with a dot or an asterisk: CuSO4*5H2O.
Worked examples
Glucose, C₆H₁₂O₆
- Chemical formula
- C6H12O6
- Mass of sample
- 90 g
- Molar mass
- 180.156 g/mol
- Moles in 90 g
- 0.499567 mol
- Atoms per formula unit
- 24
6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 72.066 + 12.096 + 95.994 = 180.156 g/mol.
Calcium hydroxide, Ca(OH)₂
- Chemical formula
- Ca(OH)2
- Mass of sample
- 100 g
- Molar mass
- 74.092 g/mol
- Moles in 100 g
- 1.349673 mol
- Atoms per formula unit
- 5
The subscript 2 applies to everything in the brackets: 40.078 + 2 × (15.999 + 1.008) = 74.092 g/mol.
Copper(II) sulfate pentahydrate, and moles in 10 g
- Chemical formula
- CuSO4·5H2O
- Mass of sample
- 10 g
- Molar mass
- 249.677 g/mol
- Moles in 10 g
- 0.040052 mol
- Atoms per formula unit
- 21
CuSO₄ is 159.602 g/mol and five waters add 5 × 18.015, giving 249.677 g/mol. 10 g is 10 ÷ 249.677 = 0.04005 mol.
Molar masses of common compounds
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Water | H₂O | 18.015 |
| Carbon dioxide | CO₂ | 44.009 |
| Sodium chloride | NaCl | 58.44 |
| Sulfuric acid | H₂SO₄ | 98.072 |
| Ammonia | NH₃ | 17.031 |
| Ethanol | C₂H₅OH | 46.069 |
| Calcium carbonate | CaCO₃ | 100.086 |
| Iron(III) sulfate | Fe₂(SO₄)₃ | 399.858 |
From mass percent back to a formula
The mass percentages work in reverse too. A compound that is 40.0% carbon, 6.7% hydrogen and 53.3% oxygen contains, per 100 g, 40.0 ÷ 12.011 = 3.33 mol C, 6.7 ÷ 1.008 = 6.65 mol H and 53.3 ÷ 15.999 = 3.33 mol O. Dividing by the smallest gives 1 : 2 : 1, the empirical formula CH₂O. A measured molar mass then tells you the molecular formula: at 180 g/mol it is six times CH₂O, or C₆H₁₂O₆.
Common mistakes
- Applying a bracket’s subscript to only the last atom — in Ca(OH)₂ both O and H are doubled.
- Leaving out the water of crystallization in a hydrate, which can change the molar mass a lot (CuSO₄·5H₂O is over 50% heavier than CuSO₄).
- Writing element symbols in the wrong case: CO is carbon monoxide, Co is cobalt.
Frequently asked questions
What is the molar mass of water?
H₂O = 2 × 1.008 + 15.999 = 18.015 g/mol.
Is molar mass the same as molecular weight?
They have the same number. Molar mass is in grams per mole; molecular weight (relative molecular mass) is a ratio with no unit.
How do I convert grams to moles?
Divide the mass in grams by the molar mass. 36 g of water is 36 ÷ 18.015 ≈ 2.0 mol. Enter the mass above to do it automatically.
Why do different tables give slightly different molar masses?
Atomic weights depend on the natural mix of isotopes, which varies a little between sources, so IUPAC gives ranges for some elements and rounded conventional values such as 1.008 for hydrogen. Differences in the second decimal place come from this and from rounding.
Sources
- Standard Atomic Weights, IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW)
- Chemistry 2e, 3.1: Formula Mass and the Mole Concept, OpenStax, Rice University
- Avogadro constant (CODATA fundamental physical constants), National Institute of Standards and Technology (NIST)
Last updated · Calculations checked by automated tests· Editorial policy