ScienForge

Molar mass calculator

Find the molar mass of a chemical compound from its formula, with the percentage composition of every element shown.

Case matters — CO is carbon monoxide, Co is cobalt

Molar mass
74.092 g/mol
Ca × 140.078 g/mol (54.09%)
O × 231.998 g/mol (43.19%)
H × 22.016 g/mol (2.721%)

Atomic masses are IUPAC standard values, averaged over natural isotopic abundance.

Molar mass is the mass of one mole — 6.022 × 10²³ particles — of a substance, expressed in grams per mole. It is found by adding up the atomic mass of every atom in the formula, each multiplied by how many times it appears.

M = Σ (atomic mass × count of each element)

Working through an example

Calcium hydroxide, Ca(OH)₂, contains one calcium, two oxygens and two hydrogens — the subscript outside the parentheses multiplies everything inside them.

Ca: 1 × 40.078 = 40.078 O:  2 × 15.999 = 31.998 H:  2 × 1.008  = 2.016 Total = 74.09 g/mol

Reading formula notation

Element symbols are always one capital letter, optionally followed by one lowercase letter — this is why case matters enormously in chemistry. CO is carbon monoxide, one carbon and one oxygen. Co is a single cobalt atom. Typing the wrong case silently changes the entire compound.

A number directly after an element applies only to that element: H2O is two hydrogens and one oxygen. Parentheses group atoms so a following number multiplies the whole group: Mg(NO3)2 means one magnesium and two full nitrate groups, giving two nitrogens and six oxygens in total, not two nitrogens and three oxygens.

Why the values are averages, not exact numbers

Chlorine’s atomic mass of 35.45 is not the mass of any single chlorine atom. Chlorine occurs naturally as a mixture of two isotopes, ³⁵Cl and ³⁷Cl, in a fixed ratio, and the tabulated atomic mass is the weighted average across that natural mixture. This is why atomic masses are decimals rather than whole numbers for most elements — an individual atom’s mass is very close to a whole number of proton-and-neutron masses, but the tabulated figure reflects the isotopic blend found in nature.

Percentage composition

Dividing each element’s contribution by the total gives the mass percentage — useful for checking a compound’s purity, for working backward from a combustion analysis to an empirical formula, or simply for sanity-checking that a formula is what you think it is. Water is famously about 11% hydrogen and 89% oxygen by mass, despite having twice as many hydrogen atoms as oxygen atoms — mass percentage and atom count are very different things.

Molar mass versus molecular mass

The two numbers are identical, but molecular mass is technically a per-molecule figure in atomic mass units (u or Da), while molar mass is the same number scaled up to a per-mole quantity in grams. In practice chemists use the terms interchangeably, since the numerical value is the same either way — a consequence of how the mole and the atomic mass unit were originally defined relative to each other.

Related calculators