⚖️ Molar Mass Calculator

No ratings yet — be the first

Enter details

Use capital letters for elements (Co = cobalt, CO = carbon monoxide). Brackets and hydrates like CuSO4.5H2O work.
Fill in to also get the number of moles and molecules.

Fill in the details and click Calculate to see your results.

Rate this calculator

Was it useful? A quick star rating helps others — and you can leave a comment too.
Rate it: ★ ★ ★ ★ ★

📘 About the Molar Mass

This molar mass calculator reads a chemical formula and adds up the atomic masses of every atom in it. Type the formula the way it is written in a textbook — H2O, NaCl, Al2(SO4)3, K4[Fe(CN)6] — and it gives the molar mass in grams per mole.

It also shows a breakdown by element with each element's mass percent, which is the percent composition of the compound. Add the mass of a sample to convert grams to moles and to the number of molecules (formula units).

Atomic masses are the IUPAC standard atomic weights used in textbooks, such as H = 1.008, C = 12.011, O = 15.999 and Cl = 35.45.

🧮 Formula

Molar mass
M = Σ (number of atoms × atomic mass)
Mass percent of an element
% = (n × A ÷ M) × 100
Moles in a sample
n = m ÷ M

Where

  • M = molar mass (g/mol)
  • nᵢ = number of atoms of element i in the formula
  • Aᵢ = atomic mass of element i (u, numerically equal to g/mol)
  • m = mass of the sample (g); n = amount (mol)
Molar mass in g/mol is numerically the same as the molecular (or formula) mass in atomic mass units (u).

✏️ Worked examples

Water, H2O

You enter
Chemical formulaH2O
You get
Molar mass18.015 g/mol
Hydrogen11.19%
Oxygen88.81%

2 × 1.008 + 15.999 = 18.015 g/mol.

Sulfuric acid, H2SO4

You enter
Chemical formulaH2SO4
You get
Molar mass98.072 g/mol
Hydrogen2.06%
Sulfur32.69%
Oxygen65.25%

2 × 1.008 + 32.06 + 4 × 15.999 = 98.072 g/mol.

Copper sulfate pentahydrate, CuSO4·5H2O

You enter
Chemical formulaCuSO4.5H2O
You get
Molar mass249.677 g/mol

The five waters of crystallisation add 5 × 18.015 = 90.08 g/mol to CuSO4 (159.6 g/mol).

🧭 How to use this calculator

What you enter

  • Chemical formulaUse capital letters for elements (Co = cobalt, CO = carbon monoxide). Brackets and hydrates like CuSO4.5H2O work.
  • Mass of your sample (optional) (g)Fill in to also get the number of moles and molecules.

What you get

  • Molar mass
  • Formula as read
  • Atoms per formula unit

💡 How to calculate molar mass by hand

  • Write down each element and count its atoms. Multiply anything inside brackets by the number after the bracket: Ca(OH)2 has 1 Ca, 2 O and 2 H.
  • Look up each atomic mass on the periodic table.
  • Multiply each atomic mass by its number of atoms.
  • Add them up. Ca(OH)2 = 40.078 + 2 × 15.999 + 2 × 1.008 = 74.09 g/mol.

💡 Molar masses of common compounds

  • H2O (water): 18.015 g/mol
  • CO2 (carbon dioxide): 44.009 g/mol
  • NaCl (sodium chloride): 58.44 g/mol
  • NaOH (sodium hydroxide): 39.997 g/mol
  • HCl (hydrochloric acid): 36.458 g/mol
  • H2SO4 (sulfuric acid): 98.072 g/mol
  • CaCO3 (calcium carbonate): 100.086 g/mol
  • C6H12O6 (glucose): 180.156 g/mol
  • C12H22O11 (sucrose): 342.297 g/mol

❓ Frequently asked questions

What is molar mass?

The mass of one mole of a substance, in grams per mole (g/mol). One mole contains 6.022 × 10²³ particles.

How do you calculate molar mass?

Add up the atomic masses of all the atoms in the formula. For H2O: 2 × 1.008 + 15.999 = 18.015 g/mol.

What is the difference between molar mass and molecular mass?

Molecular mass is the mass of one molecule in atomic mass units (u). Molar mass is the mass of a mole in g/mol. The numbers are the same.

How do I enter a hydrate?

Use a dot or a full stop: CuSO4.5H2O or CuSO4·5H2O. Both count the five water molecules.

How do I find percent composition?

Divide the mass of each element in the formula by the molar mass and multiply by 100. The calculator shows this in the table.

Why does it say my symbol isn't an element?

Element symbols start with a capital letter and the second letter is lower case. CO means carbon and oxygen; Co means cobalt.