How this calculator works
- Step 1Count atomsC12H22O11Read each element and how many there are.
- Step 2Weigh each× atomic weightMultiply by the IUPAC standard atomic weight.
- Step 3Add upg/molThe total is the mass of one mole.
The molar mass is the mass of one mole of a compound. Add up the atomic weights of every atom in its formula.
Worked example: table sugar
- Molar mass
Σ count × atomic weight
- C × 12144.132 g/mol
- H × 2222.176 g/mol
- O × 11175.989 g/mol
- Total342.297 g/mol
Oxygen and carbon make up most of the mass; the 22 hydrogen atoms add only about 6%.
Brackets and hydrates
- Water, H2O18.015 g/mol2 × 1.008 + 15.999.
- CuSO4·5H2O249.677 g/molBlue copper sulfate: five water molecules are counted too.
The OpenStax textbook uses 60.052 g/mol for acetic acid, the same as this table gives.
Assumptions and limits
- IUPAC 2024Abridged standard atomic weights.
- BracketsNested () and [] groups are read.
- Unstable elementsNo standard weight, so they are refused.
- Natural isotopesEnriched samples weigh differently.
Related chemistry tools
Molar mass converts grams to moles, the first step in most solution and gas sums.
To make up a solution of known strength, use the molarity calculator. For gas volumes and pressures, try the ideal gas law calculator.
Common mistakes
Mistake: Typing co for cobalt.
Instead: Write Co; CO is carbon monoxide.
Mistake: Leaving out water of crystallisation.
Instead: Add ·5H2O for hydrates.
Mistake: Multiplying only the first atom in a group.
Instead: Ca(OH)2 has two O and two H.
Checking the method
A separate script re-parses every formula with its own parser and sums exact decimals.
Read how we test our calculators, or browse more maths calculators.