Science & Engineering

Molar Mass (Molecular Weight from Formula)

Type a chemical formula and you get its molecular weight in g/mol. You can also convert between mass, moles, and particle count using Avogadro's number.

Reviewed and updated

How to use
  1. Type the chemical formula, like H2O or C6H12O6.
  2. Optionally enter a mass to get moles and particle count.
  3. Switch the conversion mode to start from moles instead.
For study and estimation. Verify against authoritative data before relying on a result.
Was this helpful?

Add up each atom's mass times how many there are

M = Σ ( atomic mass × subscript )

Molar mass is just the total mass of one mole of the molecule. Read the formula, multiply every element by its subscript, and sum. Glucose C₆H₁₂O₆ is 6×12.011 + 12×1.008 + 6×15.999 = 180.16 g/mol.

Common molecules, worked out

CompoundFormulaMolar mass (g/mol)
WaterH₂O18.02
Carbon dioxideCO₂44.01
Table saltNaCl58.44
EthanolC₂H₆O46.07
GlucoseC₆H₁₂O₆180.16
Sulfuric acidH₂SO₄98.08

Once you have the molar mass M, grams convert to moles with n = mass ÷ M, and moles to molecules by × 6.022×10²³.

Where the sum goes wrong

  • Dropped subscripts. H₂O has two hydrogens, not one. Missing a subscript is the most common error.
  • Parentheses multiply everything inside. In Ca(OH)₂ the 2 applies to both O and H, giving one Ca, two O and two H.
  • Water of crystallization. A dot in a formula like CuSO₄·5H₂O means five whole water molecules are added to the total.
  • Round only at the end. Keep full precision on each atomic mass and round the final answer, or errors compound.

Common questions

How do you calculate molar mass from a chemical formula?

Multiply each element's atomic mass by how many of that atom appear in the formula, then add the parts. For water, H2O: 2 x 1.008 for hydrogen plus 1 x 16.00 for oxygen gives 18.02 g/mol.

Is molar mass the same as molecular weight?

In everyday use, yes. Molecular weight is the sum of atomic masses expressed in atomic mass units; molar mass is the same number in grams per mole. They share the exact numeric value, so people use the terms interchangeably.

What atomic masses should I use?

Standard atomic weights from IUPAC: hydrogen 1.008, carbon 12.011, nitrogen 14.007, oxygen 15.999, sodium 22.99, chlorine 35.45. For quick mental math, round to 1, 12, 14, 16, 23 and 35.5.

From the blog

Guides & how-tos

All articles →