Molar Mass Calculator

Calculate the molar mass of a compound from its chemical formula.

Enter a formula such as H2O, C6H12O6, NaCl, or Ca(OH)2. Element symbols are case-sensitive.

What Is Molar Mass?

The molar mass of a substance is the mass of one mole of that substance, expressed in grams per mole (g/mol). It is numerically equal to the molecular weight (or formula weight) in atomic mass units. To find it, you add up the atomic masses of every atom in the chemical formula.

M = Σ (atomic mass × number of atoms)

How to Read a Chemical Formula

Each element is written with its symbol (one uppercase letter, optionally followed by a lowercase letter), and the subscript number after it gives how many atoms of that element are present. A missing subscript means one atom. Parentheses group atoms together, and the number after a closing parenthesis multiplies everything inside the group.

  • • H2O — 2 hydrogen atoms and 1 oxygen atom
  • • NaCl — 1 sodium atom and 1 chlorine atom
  • • C6H12O6 — 6 carbon, 12 hydrogen, and 6 oxygen atoms
  • • Ca(OH)2 — 1 calcium plus 2 of each O and H inside the group

Worked Examples

Compound Formula Molar Mass (g/mol)
Water H2O 18.015
Table salt NaCl 58.44
Glucose C6H12O6 180.156
Calcium hydroxide Ca(OH)2 74.092

Note: This calculator uses standard atomic weights for a curated set of common elements. Results are based on average isotopic abundances and may differ slightly from values that use full-precision IUPAC atomic weights or specific isotopes. For analytical work, verify the atomic masses against the latest IUPAC recommendations.