Skip to content
Brainlag

Molar mass calculator

Type a formula such as H2SO4 or Ca(OH)2 to get its molar mass in g/mol and each element's share of it. For GCSE and A-level chemistry mole calculations.

Examples:

Formulas

Molar massM = the sum of (number of atoms × relative atomic mass) over every element
Molesn = m / M

Worked example

Find the molar mass of calcium hydroxide, Ca(OH)₂, and the number of moles in 37 g.

  1. Ca(OH)₂ contains 1 Ca, 2 O and 2 H.
  2. M = 40.078 + 2 × 15.999 + 2 × 1.008 = 74.092 g/mol.
  3. n = m / M = 37 / 74.092 = 0.499 mol.

Answer: M ≈ 74.09 g/mol, and 37 g is about 0.50 mol.

Common mistakes

  • Multiplying only the first atom after a bracket: in Ca(OH)₂ both the O and the H are doubled.
  • Leaving out the water in a hydrate: CuSO₄·5H₂O includes five H₂O.
  • Using the mass number instead of the relative atomic mass: chlorine is 35.45, not 35.
  • Turning n = m / M upside down: grams divided by g/mol gives moles.

How it works

This molar mass calculator reads a chemical formula and adds up the atomic masses for you. It handles brackets, square brackets and hydrates, so H2SO4, Ca(OH)2, K4[Fe(CN)6] and CuSO4·5H2O all work. You get the molar mass in g/mol, a table showing each element's share, and the working, plus a converter between grams and moles for mole calculations.

  1. Type a formula such as H2SO4 or Mg3(PO4)2. Numbers go straight after the symbol or bracket they belong to.
  2. For a hydrate, use the dot: CuSO4·5H2O. You can also type CuSO4.5H2O or CuSO4*5H2O if your keyboard has no ·.
  3. Read the molar mass in g/mol, then the table: number of atoms, atomic mass, subtotal and percentage by mass for each element.
  4. Use the converter below to go from grams to moles or back, using n = m / M with the molar mass just found.

Tips

  • Capital letters matter: Co is cobalt, but CO is carbon monoxide (one carbon, one oxygen). Each symbol starts with a capital, and a second letter is lowercase.
  • A number after a bracket multiplies everything inside it. Ca(OH)2 contains 1 calcium, 2 oxygen and 2 hydrogen atoms, and Mg3(PO4)2 contains 2 phosphorus and 8 oxygen atoms.
  • To find moles from a mass, divide by the molar mass: 36.04 g of water (H2O, 18.02 g/mol) is 2 mol.
  • Percentage by mass is the element's subtotal divided by the molar mass, times 100. It is the number you need for percentage composition questions.

FAQ

What is the difference between molar mass and relative formula mass (Mr)?
They have the same number. Relative formula mass (Mr) has no units: it compares the mass of a formula unit with one twelfth of the mass of a carbon-12 atom. Molar mass is the mass of one mole of the substance, in g/mol. For water, Mr is about 18 and the molar mass is about 18 g/mol.
How do you work out the number of moles from a mass?
Divide the mass in grams by the molar mass: n = m / M. For example, 88 g of carbon dioxide (M = 44 g/mol) is 88 ÷ 44 = 2 mol.
Which atomic masses does it use?
Standard atomic weights from IUPAC, rounded. Your textbook or data sheet may round some values differently (for example Cl as 35.5), so the last decimal place can differ.
How do hydrates work?
The part after the dot is added on, multiplied by its number. CuSO4·5H2O is CuSO4 (159.61 g/mol) plus 5 H2O (90.08 g/mol), which gives 249.69 g/mol.
Why do I get an error?
Usually a symbol in the wrong case or an unmatched bracket. The error appears under the box and names the problem, for example an unknown symbol such as Xy or a ( without its ).