Molar Mass Calculator

Molar mass and mass percent from a chemical formula, with grams ↔ moles.

About this tool

Type a formula such as H2O, Ca(OH)2, K4[Fe(CN)6] or CuSO4·5H2O, or pick an example. The tool gives the molar mass in g/mol, a table of each element's atoms, atomic weight, mass and mass percent, and converts between grams, moles and formula units.

How molar mass is calculated

Molar mass is the mass of one mole — 6.02214076 × 10²³ formula units — of a substance, in grams per mole. It is the sum, over every element in the formula, of the number of atoms times the element's standard atomic weight. Water is 2 × 1.008 + 15.999 = 18.015 g/mol; glucose, C6H12O6, is 180.156 g/mol. Brackets multiply everything inside them, so Ca(OH)2 has two oxygens and two hydrogens, and a hydrate's water of crystallisation is added after the dot: CuSO4·5H2O is 249.68 g/mol, of which about 36% is water. Symbols are case-sensitive — Co is cobalt, CO is carbon monoxide — which is the commonest mistake. Mass percent, the share of the molar mass each element contributes, is what empirical-formula and percentage-composition questions ask for. Atomic weights are IUPAC's abridged values, so results match most textbooks to two decimal places; your course may round atomic weights differently. The periodic table looks up elements, the scientific notation tool formats very large numbers, the significant figures calculator rounds answers, and the ratio calculator helps with mole ratios.

Frequently asked questions

What is the molar mass of water?

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

How do I enter a hydrate?

Use a dot, middle dot or asterisk before the water: CuSO4·5H2O, CuSO4.5H2O or CuSO4*5H2O all work.

How do I convert grams to moles?

Divide the mass in grams by the molar mass. 10 g of water ÷ 18.015 g/mol = 0.555 mol. The converter does this both ways.

Why does my formula give an error?

Check capital letters — every element symbol starts with a capital (Na, not na or NA) — and that brackets are closed.