This molar mass calculator finds the molecular weight of any chemical formula — type it exactly as written, like H2O, Ca(OH)2 or C6H12O6 — and see the total molar mass with a full element-by-element breakdown.



Molar Mass–
Element Atoms Atomic weight Mass contribution % of total

What Is Molar Mass?

Molar mass is the mass of one mole of a substance — 6.022 × 1023 molecules of it — expressed in grams per mole (g/mol). It is the bridge between the microscopic world of atoms and the grams you weigh out in the lab: with molar mass you can turn a formula into a mass, and a mass into a number of moles. This calculator is part of our Chemistry Calculators collection.

How Molar Mass Is Calculated

Add up the atomic weight of every atom in the formula, counting subscripts and parentheses:

  • H2O: 2 × 1.008 + 15.999 = 18.015 g/mol (verified)
  • CO2: 12.011 + 2 × 15.999 = 44.009 g/mol (verified)
  • NaCl: 22.990 + 35.45 = 58.440 g/mol (verified)
  • Ca(OH)2: 40.078 + 2 × (15.999 + 1.008) = 74.092 g/mol (verified) — parentheses multiply everything inside
  • Glucose C6H12O6: 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 g/mol (verified — try it above)

The results table also shows each element’s percentage of the total — the same data as percent composition, computed here automatically (or in depth in our Percent Composition Calculator).

From Molar Mass to Moles

The key relationship is moles = mass (g) ÷ molar mass (g/mol). Ten grams of glucose is 10 ÷ 180.156 = 0.0555 mol. The reverse, grams = moles × molar mass, tells you how much to weigh out for a reaction or solution. Use our Grams to Moles Calculator for those conversions, and the pH Calculator once your solution is made.

Typing Formulas Correctly

  • Element symbols are case-sensitive: Co is cobalt, CO is carbon monoxide.
  • Subscripts are written as plain numbers here: H2SO4, not H2SO4 formatting.
  • Parentheses work as in print formulas: Al2(SO4)3 for aluminum sulfate.
  • Hydrate dots (like CuSO4·5H2O) are not supported — calculate the parts separately and add.

Related Tools

Frequently Asked Questions

What is the molar mass of water?

18.015 g/mol: two hydrogen atoms (1.008 each) plus one oxygen (15.999).

Is molar mass the same as molecular weight?

Numerically, yes for molecules — molecular weight in g/mol equals molar mass. “Molar mass” is the preferred term because it also applies to ionic compounds like NaCl, which have no single molecule.

Which atomic weights does this calculator use?

Standard IUPAC atomic weights (e.g., C = 12.011, O = 15.999, Fe = 55.845). Textbook values may round slightly differently, so results can differ in the second decimal.

How many molecules are in a mole?

Avogadro’s number: 6.022 × 1023. One mole of water is 18.015 g and contains that many H2O molecules.

Can this calculator handle parentheses and complex formulas?

Yes — nested parentheses and multi-digit subscripts are supported, e.g. Ca3(PO4)2 or (NH4)2SO4.

Is this molar mass calculator free?

Yes — free, instant, no sign-up.