The molar mass of a compound is the mass of one mole of it, in grams: the atomic weights of all its atoms added together. Sulfuric acid, H2SO4, is 2 × 1.008 + 32.06 + 4 × 15.999 = 98.07 g/mol. Type any formula – brackets, square brackets and hydrates included – and the calculator counts the atoms, writes out the sum, gives the share of each element by mass and, if you enter a mass, the moles and the number of molecules.
Molar masses of common compounds
| Formula | Name | Molar mass (IUPAC weights) | Rounded weights |
|---|---|---|---|
| H2O | water | 18.015 g/mol | 18 |
| CO2 | carbon dioxide | 44.009 g/mol | 44 |
| NH3 | ammonia | 17.031 g/mol | 17 |
| CH4 | methane | 16.043 g/mol | 16 |
| NaCl | sodium chloride (table salt) | 58.44 g/mol | 58.5 |
| NaOH | sodium hydroxide | 39.997 g/mol | 40 |
| C2H5OH | ethanol | 46.069 g/mol | 46 |
| CaCO3 | calcium carbonate | 100.086 g/mol | 100 |
| H2SO4 | sulfuric acid | 98.07 g/mol | 98 |
| C6H12O6 | glucose | 180.156 g/mol | 180 |
| C12H22O11 | sucrose (table sugar) | 342.297 g/mol | 342 |
| CuSO4·5H2O | copper(II) sulfate pentahydrate | 249.68 g/mol | 250 |
The rounded column uses whole-number atomic weights with chlorine at 35.5, the values many classroom tables give.
Reading a formula
- Capitals matter. Co is cobalt; CO is carbon monoxide. Every element symbol starts with a capital letter, and a second letter, if any, is lowercase.
- Subscripts follow the atom or the bracket. In Al2(SO4)3 there are 2 Al, 3 S and 12 O.
- A hydrate’s water is counted separately. The results show how much of CuSO4·5H2O is water of crystallization: 36.08% by mass.
Why the number of decimals changes
The calculator keeps as many decimals as the least precise atomic weight in the formula. Water has 3 (hydrogen 1.0080, oxygen 15.999), table salt only 2 (chlorine is 35.45). Elements with no stable isotope, such as technetium, have no standard atomic weight at all, and the calculator says so.
All 118 elements are built in, so it works offline in a lab or a classroom without a signal.
Frequently asked questions
How do I calculate molar mass?
Multiply the atomic weight of each element by the number of its atoms in the formula and add everything up. H2SO4 = 2 × 1.008 + 32.06 + 4 × 15.999 = 98.072, written 98.07 g/mol.
Why 98.07 and not 98.072?
A sum is only as precise as its least precise term. Sulfur's standard atomic weight is given to two decimals (32.06), so the molar mass keeps two decimals.
How do I handle brackets and hydrates?
A number after a bracket multiplies everything inside: Ca(OH)2 has 2 O and 2 H. For a hydrate, the number before H2O multiplies the water: CuSO4·5H2O = 159.60 + 5 × 18.015 = 249.68 g/mol. Type the dot as · or as a period.
How do I find the number of moles in a sample?
Divide the mass by the molar mass: 49 g of H2SO4 is 49 ÷ 98.07 = 0.4996 mol. Multiply by the Avogadro constant, 6.02214076 × 10²³, for the number of molecules.
Which atomic weights does the calculator use?
The standard atomic weights of CIAAW, IUPAC's commission, in the abridged 2024 table. For school work you can switch to rounded weights (whole numbers, chlorine 35.5), but in a test use the values printed on your paper.
Sources
- CIAAW (IUPAC), Abridged Standard Atomic Weights
- BIPM, The International System of Units (SI Brochure), 9th edition
Last checked: