Molar Mass Calculator
Enter a chemical formula to get its molar mass, percent composition by element and a grams-to-moles conversion.
โ
Percent composition
| Element | Atoms | Atomic mass | Mass in compound | Mass % |
|---|
Grams โ moles
How it works
Type a chemical formula and the molar mass (molecular weight) appears instantly. The
formula is parsed left to right: every element symbol is looked up in the built-in table
of IUPAC standard atomic weights, multiplied by the subscript that follows it, and the
products are added up. Brackets multiply everything inside them โ Ca(OH)2
counts two oxygens and two hydrogens โ and a centre dot separates hydrates, so
CuSO4ยท5H2O adds five whole waters to the copper sulfate. Case matters,
because Co (cobalt) and CO (carbon monoxide) are different
substances.
Underneath you get the percent composition by mass for each element, plus a grams โ moles converter that divides your sample mass by the molar mass (n = m / M) and shows the matching number of molecules using Avogadro's constant, 6.02214076 ร 10ยฒยณ molโปยน. All 118 elements are embedded in the page, so every calculation runs in your browser with plain JavaScript โ nothing is uploaded, there is no sign-up and there are no ads. Copy the summary or download the full composition table as a CSV for your lab notebook.
Frequently asked questions
How do you calculate molar mass from a chemical formula?
Multiply each element's standard atomic weight by the number of its atoms in the formula, then add the products together. For H2SO4 that is 2 x 1.008 + 32.06 + 4 x 15.999 = 98.072 g/mol. This tool does the lookup and the arithmetic as you type, using IUPAC standard atomic weights for all 118 elements.
Can it handle brackets and hydrates like CuSO4.5H2O?
Yes. Brackets multiply everything inside them, so Ca(OH)2 counts two oxygens and two hydrogens. A dot - typed as a centre dot or a plain full stop - separates a hydrate, so CuSO4.5H2O adds five whole water molecules and comes out at 249.677 g/mol. Leading coefficients such as 5H2O work too.
Is molar mass the same as molecular weight?
In everyday chemistry the two are used interchangeably. Molecular weight is a relative, unitless number based on the atomic mass unit, while molar mass is the mass of one mole in grams per mole - the numbers are identical, so 18.015 works as both the molecular weight and the molar mass of water.