Molar Mass Calculator
Type a chemical formula to get its molar mass in g/mol, with a table showing each element's atoms, mass and percentage of the total. Parentheses, square brackets and hydrates like CuSO4·5H2O are all supported.
Case matters: Co is cobalt, CO is carbon monoxide. Use ( ), [ ] or { } for groups and · or * for hydrates, e.g. CuSO4·5H2O.
Element breakdown
| Element | Atoms | Atomic mass | Total mass (g/mol) | Mass % |
|---|---|---|---|---|
Grams ⇄ moles
Examples
Periodic table (tap an element to insert it)
How to use the Molar Mass Calculator
- Type the formula with correct capitalisation, for example C6H12O6, Mg(OH)2 or K4[Fe(CN)6].
- For hydrates, separate the water with a dot or asterisk: CuSO4·5H2O or CuSO4*5H2O. The · button inserts the dot.
- Press Calculate (the result also updates as you type) to see the molar mass in g/mol.
- Read the breakdown: each element's number of atoms, atomic mass, total mass and mass percentage.
- Convert amounts: enter grams to get moles and particles, or moles to get grams.
How to calculate molar mass: worked example
Find the molar mass of copper(II) sulfate pentahydrate, CuSO₄·5H₂O:
- Count the atoms. The 5 in front of H₂O multiplies it: Cu 1, S 1, O 4 + 5 = 9, H 10.
- Multiply by the atomic masses: Cu 63.546, S 32.06, O 9 × 15.999 = 143.991, H 10 × 1.008 = 10.080.
- Add them: 63.546 + 32.06 + 143.991 + 10.080 = 249.677 g/mol.
- Water makes up 5 × 18.015 = 90.075 g/mol, so the crystals are 36.08% water by mass.
Brackets work the same way: in Ca₃(PO₄)₂ the 2 multiplies everything inside, giving Ca 3, P 2 and O 8, so M = 3 × 40.078 + 2 × 30.974 + 8 × 15.999 = 310.17 g/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 |
| Ammonia | NH₃ | 17.031 |
| Sulfuric acid | H₂SO₄ | 98.072 |
| Glucose | C₆H₁₂O₆ | 180.156 |
| Ethanol | C₂H₅OH | 46.069 |
| Calcium carbonate | CaCO₃ | 100.086 |
| Sodium hydroxide | NaOH | 39.997 |
| Caffeine | C₈H₁₀N₄O₂ | 194.194 |
Useful formulas
- Moles: n = m / M (grams divided by molar mass).
- Mass: m = n × M.
- Number of particles: N = n × NA, where Avogadro's number NA = 6.02214076 × 10²³ mol⁻¹.
- Mass percent of an element: (atoms × atomic mass / M) × 100%.
- Molarity: mol/L = grams per litre ÷ M. A 1 M NaCl solution has 58.44 g of salt per litre.
Frequently asked questions
How do you calculate molar mass?
Multiply the atomic mass of each element by the number of its atoms in the formula and add the results. For water, H2O = 2 × 1.008 + 15.999 = 18.015 g/mol.
What is the difference between molar mass and molecular weight?
They have the same number. Molar mass is the mass of one mole of a substance in g/mol, while molecular weight (relative molecular mass) is a dimensionless ratio to 1/12 of the mass of a carbon-12 atom. 18.015 g/mol for water means its molecular weight is 18.015.
How do I enter a hydrate?
Put a dot (·), a full stop or an asterisk between the salt and the water, with the number of water molecules in front: CuSO4·5H2O or CuSO4*5H2O. The calculator multiplies the 5 into the H2O, giving 249.677 g/mol.
Why does capitalisation matter?
Element symbols are a capital letter, optionally followed by one lowercase letter. Co is cobalt (58.933 g/mol) but CO is carbon monoxide (28.010 g/mol), and NO is nitric oxide while No is nobelium.
How do I convert grams to moles?
Divide the mass in grams by the molar mass: moles = grams ÷ g/mol. 10 g of water is 10 ÷ 18.015 = 0.5551 mol. To go back, multiply moles by the molar mass.
What is mass percent composition?
It is the share of the total mass contributed by each element: (atoms × atomic mass ÷ molar mass) × 100. In water, oxygen is 15.999 ÷ 18.015 = 88.81% of the mass.
Which atomic weights does the calculator use?
It uses the IUPAC standard atomic weights (conventional values such as 1.008 for H and 32.06 for S). For radioactive elements with no stable isotopes, such as technetium or plutonium, it uses the mass number of the longest-lived isotope, shown in brackets.