Science

How to Calculate Molar Mass: Steps and Examples

4 min read · Updated November 27, 2026

To calculate molar mass, add up the atomic masses of every atom in the chemical formula. Water (H2O) has a molar mass of 18.015 g/mol, because 2 × 1.008 (hydrogen) + 15.999 (oxygen) = 18.015. Take the atomic masses from the periodic table.

What is the difference between molar mass and molecular weight?

Molar mass is the mass of one mole of a substance, measured in grams per mole (g/mol). Molecular mass or molecular weight is the mass of one molecule, measured in atomic mass units (u). The numbers are the same, so water is 18.015 u for one molecule and 18.015 g/mol for one mole. For ionic compounds such as NaCl, the term formula mass is often used. You can check any formula with the molecular weight calculator.

How do you calculate molar mass step by step?

  1. Write the chemical formula. For example, glucose is C6H12O6.
  2. Count the atoms of each element. Glucose has 6 carbon, 12 hydrogen and 6 oxygen atoms.
  3. Find each atomic mass. Carbon is 12.011, hydrogen is 1.008 and oxygen is 15.999.
  4. Multiply each atomic mass by its atom count. Carbon: 6 × 12.011 = 72.066. Hydrogen: 12 × 1.008 = 12.096. Oxygen: 6 × 15.999 = 95.994.
  5. Add the results. 72.066 + 12.096 + 95.994 = 180.156 g/mol.
Molar mass = Σ (number of atoms × atomic mass of that element)

What are common atomic masses?

ElementSymbolAtomic mass (g/mol)
HydrogenH1.008
CarbonC12.011
NitrogenN14.007
OxygenO15.999
SodiumNa22.990
SulfurS32.06
ChlorineCl35.45
CalciumCa40.078

Textbooks round these differently, so your answer may differ in the last decimal place. Use the values your course asks for.

What is the molar mass of common compounds?

CompoundFormulaMolar mass (g/mol)
WaterH2O18.015
Carbon dioxideCO244.009
MethaneCH416.043
AmmoniaNH317.031
Sodium chloride (table salt)NaCl58.44
Calcium hydroxideCa(OH)274.092
Sulfuric acidH2SO498.072
GlucoseC6H12O6180.156

How do you handle brackets in a formula?

A subscript outside brackets multiplies every atom inside them. In Ca(OH)2, the 2 applies to both O and H, so there are 1 Ca, 2 O and 2 H atoms. The molar mass is 40.078 + 2 × 15.999 + 2 × 1.008 = 74.092 g/mol.

How do you convert grams to moles?

Once you have the molar mass, use these two formulas:

Moles = mass (g) ÷ molar mass (g/mol)    Mass (g) = moles × molar mass
  • 36 g of water is 36 ÷ 18.015 = about 2.00 mol.
  • 10 g of NaCl is 10 ÷ 58.44 = about 0.171 mol.
  • 2 mol of glucose has a mass of 2 × 180.156 = 360.31 g.

Frequently asked questions

The molar mass of water (H2O) is 18.015 g/mol. It comes from 2 × 1.008 for hydrogen plus 15.999 for oxygen.

Carbon dioxide (CO2) has a molar mass of 44.009 g/mol: 12.011 for carbon plus 2 × 15.999 for oxygen.

Sodium chloride (NaCl) has a molar mass of 58.44 g/mol: 22.990 for sodium plus 35.45 for chlorine.

Glucose (C6H12O6) has a molar mass of 180.156 g/mol.

Molar mass is the sum of number of atoms times atomic mass for each element in the formula. It is given in grams per mole.

They have the same numerical value. Molar mass is in g/mol and molecular weight is in atomic mass units, but most courses use the terms together.

Atomic masses are averages that are rounded differently. For example, chlorine may be written as 35.45 or 35.453. Use the precision your teacher or textbook asks for.

Divide the mass in grams by the molar mass. For 36 g of water, 36 ÷ 18.015 is about 2.00 mol.

Related calculators

Source for further reading: PubChem periodic table. Values are rounded and for general study use. Last updated November 2026.


Written by Muhammad Faiq Jaffar

Muhammad Faiq Jaffar is a WordPress developer, technical SEO specialist and digital marketer with 4+ years of experience building, optimizing and marketing websites through SEO, Meta Ads and social media marketing. He created Calculator Zone and checks each calculator against worked examples. Connect on LinkedIn. General information only, see our disclaimer.

Try the Molecular weight calculator

Molar mass from a formula

Go to calculator