Type any chemical formula and this molar mass calculator gives its molar mass in g/mol, the mass percent of each element, and every step of the math. It handles parentheses, brackets and hydrates.
Loading the molar mass calculator…
How to use the molar mass calculator
- Type the formula with capital letters exactly as they’re written:
NaCl,Ca(OH)2,C6H12O6. Case matters:Cois cobalt andCOis carbon monoxide. - Type subscripts as plain numbers after the element or the closing parenthesis.
- For a hydrate, put a dot between the salt and the water:
CuSO4·5H2O. A period or an asterisk works too. - Read the molar mass at the top, then the table for each element’s share of the mass.
Worked example: calcium hydroxide, Ca(OH)2
- Count the atoms. The 2 after the parentheses applies to everything inside, so there is 1 Ca, 2 O and 2 H.
- Multiply each count by the atomic mass: Ca 1 × 40.078 = 40.078; O 2 × 15.999 = 31.998; H 2 × 1.008 = 2.016.
- Add them: 40.078 + 31.998 + 2.016 = 74.092 g/mol.
The same numbers give the percent composition. Calcium is 40.078 ÷ 74.092 = 54.09% of the mass, oxygen 43.19% and hydrogen 2.72%.
What molar mass means
A mole is a counting unit, like a dozen, only much bigger: 6.022 × 1023 particles. Molar mass is the mass of one mole of a substance, in grams per mole. For an element, it’s the atomic mass from the periodic table, read in grams instead of atomic mass units: one mole of carbon atoms has a mass of 12.011 g.
For a compound, you add up the molar masses of every atom in the formula. One mole of water has two moles of hydrogen atoms and one mole of oxygen atoms, so its mass is 2 × 1.008 + 15.999 = 18.015 g. For a deeper look, see The Mole and Avogadro’s Number.
Using molar mass: grams to moles and back
Molar mass is the conversion factor between the mass you can weigh and the number of moles a chemical equation talks about.
| To get | Do this | Example |
|---|---|---|
| Moles from grams | grams ÷ molar mass | 10.0 g of water ÷ 18.015 g/mol = 0.555 mol |
| Grams from moles | moles × molar mass | 0.250 mol NaCl × 58.44 g/mol = 14.6 g |
| Mass percent of an element | (atoms × atomic mass) ÷ molar mass × 100 | H in water: 2.016 ÷ 18.015 = 11.19% |
These are the first steps of nearly every stoichiometry problem: convert grams to moles, use the mole ratio from the balanced equation, then convert back to grams. Practice the whole chain with the Balancing Equations and Stoichiometry Worksheets.
Formulas that trip people up
- Parentheses. In Al2(SO4)3, the 3 multiplies both S and O: 3 sulfur and 12 oxygen atoms. The molar mass is 342.132 g/mol.
- Hydrates. The water is part of the formula’s mass. CuSO4·5H2O is 249.677 g/mol, about 90 g/mol more than CuSO4 alone.
- Repeated elements. Ammonium nitrate, NH4NO3, has nitrogen in two places, so it has 2 N atoms. Acetic acid written CH3COOH has 2 C, 4 H and 2 O.
- Coefficients. The 2 in “2H2O” in a balanced equation counts molecules, not atoms in one molecule. Leave it off when you want the molar mass.
- Diatomic elements. Oxygen gas is O2, so its molar mass is 31.998 g/mol, not 15.999.
Why your answer may differ in the last digit
This calculator uses the current standard atomic weights from IUPAC’s Commission on Isotopic Abundances and Atomic Weights (CIAAW), rounded to five significant figures. Many textbooks and the periodic table on the AP® Chemistry exam round some values to two decimal places (O as 16.00, C as 12.01). That can move your answer by a few hundredths of a gram per mole. On a test, use the table you’re given.
A few elements, like technetium and radon, have no stable isotopes and so no standard atomic weight. The calculator won’t guess a value for them.
Keep practicing
- Percent Composition and Empirical Formulas
- Molarity and Dilution
- AP® Chemistry Unit 1 Cheat Sheet: Atomic Structure and Properties
- Significant Figures Calculator, to round your answers correctly
Molar mass FAQ
How do you calculate molar mass?
Multiply each element’s atomic mass by the number of atoms of that element in the formula, then add the results. For water: 2 × 1.008 + 15.999 = 18.015 g/mol.
What is the molar mass of water?
18.015 g/mol, using hydrogen at 1.008 and oxygen at 15.999.
How do you find the molar mass of a hydrate?
Add the water molecules to the formula. CuSO4·5H2O includes five H2O, so you add 5 × 18.015 g/mol to the mass of CuSO4: 249.677 g/mol in all.
Why is my answer slightly different from my textbook?
Periodic tables round atomic masses differently. This calculator uses the current IUPAC (CIAAW) values; a table that rounds to two decimals can change the last digit or two.