The conversion formula: divide grams by molar mass
To convert grams to moles, you divide the mass of a substance in grams by its molar mass — the weight of one mole of that substance, measured in grams per mole (g/mol). The formula is:
Moles = Grams ÷ Molar Mass
The molar mass is a fixed number for each chemical element or compound. For example, carbon has a molar mass of 12.01 g/mol, and water (H₂O) has a molar mass of 18.02 g/mol. Once you know the molar mass, the math is straightforward division.
Key Takeaways
- Molar mass is the sum of the atomic masses of all atoms in a molecule, found on the periodic table or in chemistry reference materials.
- The conversion formula is moles = grams divided by molar mass, and the answer is always in moles.
- You must identify the correct chemical formula of the substance before you can calculate its molar mass.
- Common mistakes include using the wrong molar mass, forgetting to add up all atoms in a compound, or mixing up grams with other units of mass.
Finding the molar mass of an element
The molar mass of a single element is its atomic mass, which appears on the periodic table. Hydrogen is 1.01 g/mol, oxygen is 16.00 g/mol, nitrogen is 14.01 g/mol, and so on. You can round these to whole numbers for most calculations, though using the exact value from the periodic table gives a more accurate result.
If you are working with an element that exists as a molecule — like oxygen gas (O₂) or nitrogen gas (N₂) — you must multiply the atomic mass by the number of atoms. Oxygen gas has a molar mass of 32.00 g/mol (16.00 × 2), not 16.00 g/mol.
Finding the molar mass of a compound
For a compound, add up the molar masses of all the atoms in the chemical formula. Water (H₂O) contains two hydrogen atoms and one oxygen atom, so the molar mass is (1.01 × 2) + 16.00 = 18.02 g/mol. Sodium chloride (NaCl) is 22.99 + 35.45 = 58.44 g/mol.
Write out the formula clearly and count every atom. A common error is forgetting atoms in parentheses. Calcium hydroxide is Ca(OH)₂, which means one calcium, two oxygen atoms, and two hydrogen atoms — not one of each. The molar mass is 40.08 + (16.00 × 2) + (1.01 × 2) = 74.10 g/mol.
Working through a step-by-step example
Suppose you have 25 grams of sodium (Na) and need to find how many moles that is. Sodium has an atomic mass of 22.99 g/mol. Using the formula:
Moles = 25 g ÷ 22.99 g/mol = 1.09 moles
Now try a compound: you have 50 grams of carbon dioxide (CO₂). Carbon is 12.01 g/mol and oxygen is 16.00 g/mol, so CO₂ has a molar mass of 12.01 + (16.00 × 2) = 44.01 g/mol. Then:
Moles = 50 g ÷ 44.01 g/mol = 1.14 moles
Common mistakes to avoid
The most frequent error is using the wrong molar mass — either reading the periodic table incorrectly or forgetting to account for multiple atoms in a molecule. Always double-check that your molar mass includes every atom in the formula and that you have added them correctly.
Another mistake is confusing grams with other units. The formula only works if the mass is in grams and the molar mass is in g/mol. If you are given mass in milligrams or kilograms, convert to grams first. One kilogram equals 1,000 grams; one milligram equals 0.001 grams.
A third pitfall is rounding too early. Keep at least two decimal places through your calculation, then round your final answer. Rounding the molar mass before dividing can introduce small errors that add up in later steps.
Why this conversion matters
Chemists work with moles because atoms and molecules are too small to count individually. A mole is a standard unit that represents a fixed number of particles — about 6.022 × 10²³. When you convert grams to moles, you are translating from a mass you can measure on a scale into the number of particles actually involved in a chemical reaction.
This conversion is the foundation for stoichiometry, the branch of chemistry that predicts how much product a reaction will make or how much of a reactant you need. Without converting to moles first, you cannot balance equations or predict reaction outcomes.
Frequently Asked Questions
What if I don't have a periodic table?
You can find molar masses online through chemistry databases, textbook references, or educational websites. Most chemistry courses provide a periodic table during exams, so check your course materials or ask your instructor what resources are allowed.
Do I need to round my answer?
Round to the same number of significant figures as the measurement with the fewest significant figures. If you measured 25 grams (two significant figures), round your answer to two significant figures as well. This reflects the precision of your original measurement.
Can I convert moles back to grams?
Yes — use the reverse formula: Grams = Moles × Molar Mass. If you have 2 moles of water, multiply 2 by 18.02 g/mol to get 36.04 grams.
What if the substance is a mixture, not a pure compound?
You cannot use this formula for a mixture. The conversion only works for a single element or a pure compound with a known chemical formula. For a mixture, you need to know the percentage or mass of each component separately.