A water molecule (H2O) labelled with its molar mass of 18.02 g/mol, illustrating how to calculate molar mass
Science · 7 min read

How to calculate molar mass

Molar mass is just the sum of the atomic masses in a formula, read straight off the periodic table. Here is the step-by-step method, worked examples for water, carbon dioxide and glucose, how to handle brackets, and how molar mass turns grams into moles.

Do the mathsMolar Mass Calculator

Type a chemical formula, like H2SO4 or Ca(OH)2, to get its molar mass in grams per mole.

Molar mass is the mass of one mole of a substance, and it is the bridge between the grams you can weigh on a scale and the moles that chemical equations are written in. It sounds technical, but calculating it is simple arithmetic: you look up the mass of each atom in the formula on the periodic table and add them up. This guide shows the method step by step, works through water, carbon dioxide and glucose, deals with the brackets that trip people up, and shows how molar mass lets you convert between grams and moles.

What molar mass actually is

A mole is just a counting unit, like a dozen, but much bigger: one mole is 6.022 × 10²³ particles (Avogadro's number). The molar mass is how many grams one mole of a substance weighs, measured in grams per mole (g/mol). The useful shortcut is that the molar mass of any element in g/mol is the same number as its atomic mass on the periodic table. Carbon has an atomic mass of about 12, so one mole of carbon weighs about 12 grams, and its molar mass is 12 g/mol. In the same way, 18.02 grams of water is one mole, which is 6.022 × 10²³ molecules.

The method: add up the atomic masses

To find the molar mass of a compound, add the atomic mass of every atom in its formula.

  1. Write out the formula and count how many of each atom there are (the small subscript numbers).
  2. Look up each element's atomic mass on the periodic table.
  3. Multiply each atomic mass by how many of that atom there are.
  4. Add the results. The total is the molar mass in g/mol.

The atomic masses you will use most: hydrogen (H) 1.008, carbon (C) 12.011, nitrogen (N) 14.007, oxygen (O) 15.999, sodium (Na) 22.990, sulfur (S) 32.06, chlorine (Cl) 35.45, calcium (Ca) 40.078. Values come from the periodic table (see the NIST periodic table); textbooks often round them (for example H to 1.01 and O to 16.00), which is fine for most work. Keep the full decimals as you go and round only the final total to two decimal places, so an exact sum such as 18.015 is written as 18.02 g/mol.

Worked example: water (H2O)

Water is H₂O: two hydrogen atoms and one oxygen atom.

So one mole of water weighs about 18 grams. Using the rounded textbook values (H = 1.01, O = 16.00) gives 2.02 + 16.00 = 18.02, the same answer.

More examples: CO2 and glucose

Carbon dioxide (CO₂) is one carbon and two oxygens: (1 × 12.011) + (2 × 15.999) = 12.011 + 31.998 = 44.01 g/mol.

Glucose (C₆H₁₂O₆) has six carbons, twelve hydrogens and six oxygens:

The method never changes, no matter how big the formula: count each atom, multiply by its atomic mass, add it all up.

Compounds with brackets

When a formula has brackets, the subscript outside multiplies everything inside. Take calcium hydroxide, Ca(OH)₂: the 2 applies to both the O and the H. So it is one calcium, two oxygens and two hydrogens: 40.078 + (2 × 15.999) + (2 × 1.008) = 40.078 + 31.998 + 2.016 = 74.09 g/mol. For ammonium sulfate, (NH₄)₂SO₄, the 2 multiplies the whole NH₄ group, giving two nitrogens and eight hydrogens, plus one sulfur and four oxygens: (2 × 14.007) + (8 × 1.008) + 32.06 + (4 × 15.999) = 28.014 + 8.064 + 32.06 + 63.996 = 132.13 g/mol.

Molar mass, molecular mass and formula mass

You will meet three similar-sounding terms, and they are essentially the same number with different labels. Molecular mass (or molecular weight) is the mass of one molecule in atomic mass units (u); formula mass is the same idea for ionic compounds like NaCl that do not form true molecules; and molar mass is the mass of one mole in g/mol. Water's molecular mass is 18.02 u and its molar mass is 18.02 g/mol, the same figure, just per molecule versus per mole. They are numerically equal; only the units differ (u per molecule, g/mol per mole).

Why it matters: converting grams and moles

The whole point of molar mass is that it converts between grams (what you weigh) and moles (what reactions use).

Moles = mass in grams ÷ molar mass

So 36 grams of water is 36 ÷ 18.02 = about 2 moles. Going the other way, mass = moles × molar mass, so 0.5 moles of glucose is 0.5 × 180.16 = 90.08 grams. This is the step behind almost every quantitative chemistry problem, and it is also what you need before working out a solution's concentration, which our guide on how to calculate molarity covers.

Common mistakes to avoid

A few traps catch people out. The first is ignoring subscripts, for example counting one hydrogen in H₂O instead of two. The second is using the atomic number instead of the atomic mass: oxygen's atomic number is 8, but its atomic mass is about 16, and it is the mass you add. The third is mishandling brackets, forgetting that the outside subscript multiplies everything inside. A fourth, for elements on their own: many are diatomic, so oxygen gas is O₂ = 31.998 g/mol, not 16, and the same goes for H₂, N₂ and the halogens. The last is rounding too early; keep the decimals until the end, then round the final answer. Avoid those and molar mass is just careful addition.

The short version

Molar mass is the mass of one mole of a substance in grams per mole, and you find it by adding up the atomic masses of every atom in the formula, taken from the periodic table. Count each atom (watch the subscripts and brackets), multiply by its atomic mass, and add. Water is 18.02 g/mol, carbon dioxide 44.01, glucose 180.16. Then molar mass converts grams to moles (moles = grams divided by molar mass) and back, which is the step behind most chemistry calculations. To do it instantly for any formula, the free molar mass calculator adds the atomic masses for you, the molarity calculator takes it on to concentration, and the scientific notation calculator helps with the powers of ten that moles involve.

Frequently asked questions

What is molar mass?

Molar mass is the mass of one mole of a substance, measured in grams per mole (g/mol). One mole is 6.022 times 10 to the 23rd particles. The molar mass of an element in g/mol is the same number as its atomic mass on the periodic table, so carbon, with an atomic mass of about 12, has a molar mass of about 12 g/mol.

How do you calculate molar mass?

Add up the atomic mass of every atom in the formula. Count how many of each atom there are using the subscripts, look up each element's atomic mass on the periodic table, multiply each by its count, and add the results. For water (H2O) that is (2 times 1.008) plus 15.999 = 18.02 g/mol. Keep the decimals until the end, then round.

What is the molar mass of water?

Water (H2O) has two hydrogen atoms and one oxygen atom. Using atomic masses of 1.008 for hydrogen and 15.999 for oxygen, that is (2 times 1.008) plus 15.999 = 18.02 g/mol. So one mole of water weighs about 18 grams. Rounded textbook values (H = 1.01, O = 16.00) give the same 18.02.

What is the difference between molar mass and molecular mass?

They are the same number with different labels. Molecular mass is the mass of one molecule in atomic mass units (u), while molar mass is the mass of one mole in grams per mole (g/mol). Water is 18.02 u per molecule and 18.02 g/mol per mole. Formula mass is the same idea for ionic compounds like NaCl that do not form molecules. For everyday work they are interchangeable.

What is the molar mass of glucose?

Glucose (C6H12O6) has six carbons, twelve hydrogens and six oxygens. That is (6 times 12.011) plus (12 times 1.008) plus (6 times 15.999) = 72.066 plus 12.096 plus 95.994 = 180.16 g/mol. So one mole of glucose weighs about 180 grams.

How do you convert grams to moles?

Divide the mass in grams by the molar mass: moles = grams divided by molar mass. For example, 36 grams of water divided by its molar mass of 18.02 g/mol is about 2 moles. To go the other way, multiply moles by molar mass to get grams. This conversion is the reason molar mass matters in chemistry calculations.

Calculators in this article

Molar Mass Calculator

Type a chemical formula, like H2SO4 or Ca(OH)2, to get its molar mass in grams per mole.

Open

Molarity Calculator

Find the molarity (concentration) of a solution from moles of solute and volume.

Open

Scientific Notation Calculator

Convert any number to scientific notation, showing the coefficient and the power of ten.

Open