How to Calculate Molar Mass Step by Step
A bottle of copper sulfate on a school shelf says CuSO4·5H2O on the label, and the worksheet asks you to make up a solution containing 0.050 mol. Use the molar mass of plain CuSO4, 159.60 g/mol, and you weigh 7.98 g. Use the right one, 249.68 g/mol, and you weigh 12.48 g. The first answer is 36% short, and the only difference is five water molecules that most students forget are there.
Molar mass is the bridge between the grams on a balance and the number of particles chemistry actually cares about. This post shows the method by hand, step by step, with four worked examples, then the traps that cost marks. Every number here also comes out of the molar mass calculator, which shows the same working for any formula you type.
What is molar mass?
One mole is 6.02214076 × 1023 particles, a number fixed exactly by the SI since 2019. The molar mass of a substance is the mass of one mole of it, in grams per mole. Because of the way the mole was originally defined, the molar mass in g/mol is numerically the same as the relative mass of one formula unit on the atomic scale, where carbon-12 is exactly 12.
That is why the atomic weights printed on a periodic table can be used directly. Oxygen's standard atomic weight is 15.999, so a mole of oxygen atoms has a mass of 15.999 g. A molecule's molar mass is just the sum over its atoms:
Here is the number of atoms of element in the formula and is its standard atomic weight.
How to calculate molar mass in four steps
The method never changes, however long the formula is:
- Read the formula into element counts. A capital letter starts a symbol, a small letter can finish it, and the number after it is the count. No number means one.
- Expand brackets and dots. A number after a closing bracket multiplies everything inside. A leading number after a hydrate dot multiplies that whole part.
- Multiply each count by its atomic weight. Use one table consistently. This post uses the IUPAC abridged standard atomic weights.
- Add the products and round once, at the end.
The atomic weights used below are H 1.0080, C 12.011, N 14.007, O 15.999, Na 22.990, S 32.06, Cl 35.45, Ca 40.078 and Cu 63.546, all from the IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW) abridged table.
Worked example 1: water, H2O
Two hydrogens and one oxygen
Hydrogen contributes 2.016 of the 18.015, which is 11.19% of the mass. Oxygen is the other 88.81%, even though it is only one atom in three.

Worked example 2: brackets in calcium hydroxide, Ca(OH)2
The 2 after the bracket doubles both the oxygen and the hydrogen. Writing out the counts first stops you from doubling only the hydrogen, which is the most common slip with this formula.
Counts: Ca 1, O 2, H 2
Most textbooks give 74.09 g/mol. If you had doubled only the H, you would get 58.09, an error of 16 g/mol that no rounding can hide.
Brackets can nest. In potassium ferrocyanide, K4[Fe(CN)6], the 6 applies to both C and N, giving K 4, Fe 1, C 6, N 6 and a molar mass of 368.35 g/mol. Work from the inside out and write the counts down before you multiply.
Worked example 3: glucose, C6H12O6
Counts: C 6, H 12, O 6
Glucose is 40.0% carbon, 6.7% hydrogen and 53.3% oxygen by mass. Hydrogen has the most atoms, 12 of 24, and the smallest share.

Worked example 4: a hydrate, CuSO4·5H2O
The raised dot is not multiplication in the usual sense. It says that each formula unit of the crystal carries five water molecules, called water of crystallisation. They are inside the crystal you weigh, so they belong in the molar mass.
CuSO4 plus five waters
The water is 36.1% of the crystal's mass. That is also how much mass the blue crystals lose when you heat them to the white anhydrous powder, which makes a good practical check.

How do you convert grams to moles?
Once you have the molar mass, the conversion is one division:
How many moles in 25 g of calcium carbonate?
To go the other way, multiply: 0.5 mol of CaCO3 is 0.5 × 100.086 = 50.04 g. Calcium carbonate is a favourite in exams because 100 g is almost exactly one mole.

Molar masses of common compounds
| Compound | Formula | Molar mass (g/mol) | Largest share by mass |
|---|---|---|---|
| Water | H2O | 18.015 | O 88.8% |
| Carbon dioxide | CO2 | 44.009 | O 72.7% |
| Methane | CH4 | 16.043 | C 74.9% |
| Ammonia | NH3 | 17.031 | N 82.2% |
| Ethanol | C2H5OH | 46.069 | C 52.1% |
| Sodium chloride | NaCl | 58.44 | Cl 60.7% |
| Sodium hydroxide | NaOH | 39.997 | Na 57.5% |
| Sulfuric acid | H2SO4 | 98.07 | O 65.3% |
| Calcium carbonate | CaCO3 | 100.086 | O 48.0% |
| Glucose | C6H12O6 | 180.16 | O 53.3% |
| Sucrose | C12H22O11 | 342.30 | O 51.4% |
The number of decimals follows the uncertainty of the atomic weights involved. Anything containing chlorine or sulfur gets two decimals, because IUPAC quotes those elements to two decimals: their isotope mix varies a little between natural samples.
Common mistakes that cost marks
Doubling only the last atom in a bracket. In Mg(NO3)2 the 2 doubles the whole nitrate, so there are 2 nitrogens and 6 oxygens, not 1 and 6 or 2 and 3. The molar mass is 148.31 g/mol.
Dropping the water from a hydrate. The worked example above shows the size of that error: 36% for copper sulfate pentahydrate, and even more for Epsom salt, MgSO4·7H2O, where water is 51.2% of the mass.
Getting the capital letters wrong. CO is carbon monoxide at 28.010 g/mol. Co is cobalt at 58.933 g/mol. NO is nitric oxide; No is nobelium. A calculator that silently accepts "co" is guessing. The molar mass calculator refuses it and tells you which formula you probably meant.
Rounding atomic weights before multiplying. Using H = 1 and O = 16 gives water 18 g/mol, which is fine for a quick estimate. Using H = 1 in sucrose, with 22 hydrogens, shifts the answer by 0.18 g/mol. Keep the table's digits and round once at the end.
Thinking the atom with the most atoms has the most mass. It is the most common misconception about percent composition. Mass share is count times atomic weight, so heavy atoms dominate: hydrogen is two thirds of the atoms in water and one ninth of the mass. If you want a feel for how little mass a large number of particles can carry, the post on how much energy is in one gram puts a single gram in perspective, and heating water in a kettle shows moles and joules meeting in the kitchen.
Which atomic weights should you use?
IUPAC publishes standard atomic weights through CIAAW and revises them every two years as measurements improve. The abridged table rounds them to five significant figures where natural variation allows, and that is what modern periodic tables print. The 2024 table changed gadolinium, lutetium and zirconium from the 2021 values; none of the common elements in a school course moved.
Elements with no stable isotope, such as technetium and plutonium, have no standard atomic weight. Periodic tables print the mass number of the most stable isotope in square brackets instead, for example [97] for technetium. The calculator does the same and flags the result.
Try a formula from your own homework in the molar mass calculator with copper sulfate pentahydrate loaded, then change it to MgSO4*7H2O and watch the water's share of the bar grow.
Sources
- IUPAC Commission on Isotopic Abundances and Atomic Weights, Abridged Standard Atomic Weights 2024: ciaaw.org/abridged-atomic-weights.htm
- IUPAC CIAAW, Radioactive elements, most stable isotopes from the NUBASE2020 evaluation: ciaaw.org/radioactive-elements.htm
- NIST, CODATA value of the Avogadro constant, 6.02214076 × 1023 mol−1 (exact): physics.nist.gov/cgi-bin/cuu/Value?na
Frequently asked questions
What is the formula for molar mass?
Molar mass is the sum of each element’s atom count times its standard atomic weight: M equals the sum of n times Ar, in grams per mole. For water that is 2 × 1.0080 + 15.999 = 18.015 g/mol.
How do brackets change a molar mass calculation?
A number after a closing bracket multiplies every atom inside the bracket. In Ca(OH)2 there are 2 oxygens and 2 hydrogens, so the molar mass is 40.078 + 2 × 15.999 + 2 × 1.0080 = 74.092 g/mol.
Do you include the water in a hydrate’s molar mass?
Yes. The water molecules are part of the crystal you weigh. CuSO4·5H2O is 159.60 + 5 × 18.015 = 249.68 g/mol. Leaving the water out makes you weigh 36% too little copper sulfate.
How many decimal places should a molar mass have?
Use the atomic weights to the precision your course or periodic table gives, and round only the final answer. Two decimals is the common school convention. The IUPAC abridged values support three decimals for water (18.015) but only two for salt (58.44), because chlorine’s atomic weight is known to two decimals.
Is molar mass the same as molecular weight?
They are the same number with different units. Relative molecular mass, often called molecular weight, has no unit. Molar mass is that number in grams per mole, so water’s molecular weight is 18.015 and its molar mass is 18.015 g/mol.