The sum of the atomic masses, nothing more
Works out molar mass from a chemical formula, handles brackets and hydrates, and gives the mass fraction of every element.
Molar mass is the sum of the atomic masses of every atom in a formula, expressed in grams per mole. It matches the relative molecular mass numerically, so water is 18.015 both in atomic mass units and in grams per mole.
The only difficulty is parsing. Brackets multiply everything inside them, and the dot before a hydrate multiplies the part that follows. CuSO4·5H2O is not one molecule but copper sulfate with five water molecules in its crystal lattice.
What this calculator shows
- Molar mass to four decimal places
- The mass fraction of each element as a percentage
- The amount of substance, if a sample mass is given
What to keep in mind
- Standard IUPAC atomic weights are used — averages over the natural isotopic composition.
- Round and square brackets are parsed, as are hydrates written with a dot or an asterisk.
FAQs
How do I calculate molar mass?
Add up the atomic masses of every atom in the formula. For H2SO4 that is 2 × 1.008 + 32.06 + 4 × 15.999 = 98.07 g/mol.
How does molar mass differ from molecular mass?
They match numerically; the units differ. Molecular mass is dimensionless and quoted in atomic mass units, molar mass is in grams per mole.
How do I write a hydrate?
With a dot or an asterisk: CuSO4*5H2O. The number before the water formula multiplies everything that follows it.
Why are atomic masses fractional?
Because they are weighted averages over natural isotopes. Chlorine is 35.45 because isotopes 35 and 37 occur in roughly a three to one mix.
Worked example
Copper sulfate pentahydrate
Input: CuSO4*5H2O
Output: 249.677 g/mol across 21 atoms
Note: There are nine oxygen atoms in the formula: four in the sulfate and five in the water of crystallisation. They account for 57.67 percent of the mass — more than copper and sulfur combined.