Molar mass calculator with percentage composition
The molar mass of a compound is the mass of one mole of it, in grams per mole: add up the atomic mass of every atom in its formula. Water, H₂O, is 2 × 1.008 + 15.999 = 18.015 g/mol. The same number without units is the relative formula mass (Mr), and in the US it is often called molecular weight. This molar mass calculator works it out for any formula, including brackets, hydrates and ions, and shows each element's count, atomic mass and percentage of the total mass.
It opens on copper sulfate pentahydrate, CuSO₄·5H₂O. Open the full molar mass calculator over this page to type your own.
Molar Mass Calculator
Find the relative formula mass of any compound
How to use the molar mass calculator
- Type the formula in the Formula box. Numbers after a symbol are counts (H2O), brackets multiply everything inside (Ca(OH)2), a dot or full stop joins a hydrate (CuSO4.5H2O), and charges go at the end (SO4^2-).
- Or build the formula from element tiles in Build it with tiles.
- Read the molar mass in g/mol and the number of atoms per formula unit.
- Look at the table of elements, with each one's count, relative atomic mass and percentage by mass, and the bar showing the composition to scale.
- To practise, press Random problem in the Practice section.
How to calculate molar mass
- Count the atoms of each element, multiplying through any brackets.
- Multiply each count by that element's relative atomic mass from the periodic table.
- Add them up. The total in g/mol is the molar mass.
The calculator uses precise atomic masses such as H = 1.008, C = 12.011 and O = 15.999. If your course rounds them (H = 1, O = 16), your answer will differ a little in the decimals.
Worked examples you can check in the calculator
Example 1: brackets, Ca(OH)₂
The 2 after the bracket doubles both O and H, so there are 1 Ca, 2 O and 2 H: 40.078 + 2 × 15.999 + 2 × 1.008 = 74.092 g/mol.
Example 2: Al₂(SO₄)₃
Aluminium sulfate has 2 Al, 3 S and 12 O: 2 × 26.982 + 3 × 32.06 + 12 × 15.999 = 342.132 g/mol. Multiplying the 4 oxygens in each sulfate by the 3 outside the bracket is the step most often missed.
Example 3: a hydrate
CuSO₄·5H₂O, the calculator's opening formula, is copper sulfate with five water molecules built into its crystals. CuSO₄ is 63.546 + 32.06 + 4 × 15.999 = 159.602, and 5H₂O is 5 × 18.015 = 90.075, so the total is 249.677 g/mol. Water makes up more than a third of the mass.
Example 4: percentage composition
Ammonium nitrate, NH₄NO₃, has molar mass 80.043 g/mol and contains 2 nitrogen atoms. The nitrogen share is 2 × 14.007 ÷ 80.043 × 100 = 35.0%, which is why it is used as a fertiliser. Glucose, C₆H₁₂O₆ (180.156 g/mol), is 6 × 12.011 ÷ 180.156 × 100 = 40.0% carbon.
Example 5: an ion
The sulfate ion, SO₄²⁻, is 32.06 + 4 × 15.999 = 96.056 g/mol. The two extra electrons add almost nothing, so an ion's molar mass is worked out from its atoms alone.
Try one
Using molar mass
Molar mass is the link between grams and moles: n = m ÷ M. The grams to moles calculator guide uses it to convert, and the concentration calculator guide uses it to make up solutions.
Common mistakes
- Not multiplying through brackets. In Ca(OH)₂ there are 2 H, not 1.
- Forgetting the water in a hydrate. CuSO₄·5H₂O includes 5 × 18.015.
- Using atomic numbers instead of atomic masses. Oxygen is number 8 but has mass about 16.
- Diatomic elements. Oxygen gas is O₂, about 32 g/mol.
- Case mistakes. Co is cobalt; CO is carbon monoxide. Type symbols with a capital first letter.
Common questions
How do you calculate molar mass?
What is the molar mass of water?
Is molar mass the same as molecular weight?
How do you find percentage composition?
Can the calculator handle hydrates and brackets?
Revision cards
Read the front, say your answer, then flip to check.
Where to go next
- Solve it
Molar Mass Calculator
Find the relative formula mass of any compound
Open the tool - Test it
High School Chemistry
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper - Test it
Honors Chemistry
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper