Molar mass calculator
Type a formula such as H2SO4, Ca(OH)2 or CuSO4.5H2O. The calculator adds up the atomic masses, shows the percent by mass of each element and can convert a weighed mass into moles.
How this calculator works
The molar mass of a compound is the mass in grams of one mole of it, a mole being 6.022 × 10²³ particles. To find it, count how many atoms of each element the formula contains, multiply by the atomic masses and add the lot.
Brackets multiply everything inside them: in Ca(OH)₂ there is one calcium but two oxygens and two hydrogens. A dot in a hydrate, as in CuSO₄·5H₂O, multiplies everything after it, so five waters are added to the copper sulfate. The parser handles both, and tells you if it meets a symbol it does not recognise.
The formula behind it
- molar mass = Σ (atoms of element × atomic mass)
- moles = mass ÷ molar mass
- mass % of an element = (its subtotal ÷ molar mass) × 100
A worked example
Calcium hydroxide, Ca(OH)₂: Ca = 40.078, O = 2 × 15.999 = 31.998, H = 2 × 1.008 = 2.016. Total 74.092 g/mol. An 18 g sample is 18 ÷ 74.092 = 0.243 mol.
Questions people ask
Why do capital letters matter?
Because they mark where each element symbol starts. CO is carbon and oxygen, while Co is the single element cobalt.
What is the difference between molar mass and molecular weight?
Numerically almost the same. Molecular weight is a relative figure with no unit, molar mass carries g/mol. At school level they are used interchangeably.
Why might my textbook answer differ slightly?
Textbooks round atomic masses differently, for instance using 1.0 for hydrogen or 35.5 for chlorine. Small differences in the last decimal place are normal.
How do I convert moles back to grams?
Multiply moles by molar mass. 0.5 mol of NaCl is 0.5 × 58.44 = 29.22 g.