How to Convert Grams to Moles: Formula & Examples

To convert grams to moles, divide the mass of your substance (in grams) by its molar mass (in grams per mole). The formula is straightforward: moles = mass ÷ molar mass. The only thing you need to look up is the molar mass, which comes from the periodic table.

The Core Formula

Every grams-to-moles conversion uses the same relationship:

Moles = Mass (g) ÷ Molar mass (g/mol)

The molar mass tells you how many grams one mole of a substance weighs. For a single element like aluminum, one mole weighs 26.98 g. So if you have 100.0 g of aluminum, the calculation is: 100.0 ÷ 26.98 = 3.706 mol. That’s it. The concept works for any substance as long as you know its molar mass.

How to Find Molar Mass

For a single element, the molar mass is just the atomic weight listed on the periodic table, expressed in grams per mole. Iron is 55.85 g/mol. Gold is 196.97 g/mol. Sodium is 22.99 g/mol. You can read these numbers directly off any periodic table.

For a compound, you add up the atomic weights of every atom in the chemical formula. Water (H₂O) has two hydrogen atoms and one oxygen atom: 2(1.008) + 15.999 = 18.015 g/mol. That means one mole of water weighs about 18.02 grams.

Larger compounds work the same way, just with more addition. Take aluminum sulfate, Al₂(SO₄)₃. Count up the atoms: 2 aluminum, 3 sulfur, and 12 oxygen. Then multiply each by its atomic weight and add: 2(26.98) + 3(32.07) + 12(16.00) = 342.17 g/mol.

Step-by-Step Example: Caffeine

Say you have 34.5 grams of caffeine (C₈H₁₀N₄O₂) and need to know how many moles that is. Here’s the full process.

Step 1: Find the molar mass. Break the formula into its elements and multiply each by the atomic weight from the periodic table:

  • Carbon (C): 8 × 12.01 = 96.08 g/mol
  • Hydrogen (H): 10 × 1.008 = 10.08 g/mol
  • Nitrogen (N): 4 × 14.01 = 56.04 g/mol
  • Oxygen (O): 2 × 16.00 = 32.00 g/mol

Total molar mass: 96.08 + 10.08 + 56.04 + 32.00 = 194.20 g/mol

Step 2: Divide mass by molar mass. 34.5 g ÷ 194.20 g/mol = 0.178 mol of caffeine.

What a Mole Actually Represents

A mole is just a counting unit for incredibly small things. One mole of any substance contains exactly 6.022 × 10²³ particles (atoms, molecules, or formula units). This number, called Avogadro’s constant, is the bridge between the atomic scale and the gram scale you can measure on a balance. The periodic table’s atomic weights are calibrated so that one mole of any element weighs exactly its atomic weight in grams. Carbon atoms have an atomic weight of about 12, so one mole of carbon weighs 12.01 grams.

Converting the Other Direction: Moles to Grams

The reverse conversion just flips the operation. Instead of dividing, you multiply: grams = moles × molar mass. If you have 1.5 moles of lead and lead’s molar mass is 207.2 g/mol, then 1.5 × 207.2 = 310.8 grams. The two conversions are mirror images of each other, and knowing one means you already know the other.

Getting Significant Figures Right

Your final answer can only be as precise as your least precise input. For multiplication and division, count the significant figures in each number and round your answer to match the lowest count. If you divide 34.5 g (three significant figures) by 194.20 g/mol (five significant figures), your answer gets three significant figures: 0.178 mol, not 0.17772 mol.

One practical tip: don’t round intermediate steps. If your problem involves multiple calculations, keep at least one extra digit through each step and only round at the very end. Rounding too early can introduce small errors that compound as you go, which is especially easy to do in multi-step stoichiometry problems.

Quick Reference for Common Substances

These molar masses come up frequently in chemistry courses and lab work:

  • Water (H₂O): 18.02 g/mol
  • Carbon dioxide (CO₂): 44.01 g/mol
  • Sodium chloride, table salt (NaCl): 58.44 g/mol
  • Glucose (C₆H₁₂O₆): 180.16 g/mol
  • Oxygen gas (O₂): 32.00 g/mol

To convert any mass of these substances, just divide by the molar mass listed. For example, 90.0 g of water: 90.0 ÷ 18.02 = 4.99 mol.