The basic formula: divide grams by molar mass
To convert grams to moles, you divide the mass of a substance (in grams) by its molar mass (in grams per mole). The formula is: moles = grams ÷ molar mass. This works because molar mass tells you how many grams one mole of a substance weighs.
The molar mass of an element or compound comes from the periodic table and is expressed in grams per mole (g/mol). For example, carbon has a molar mass of 12 g/mol, oxygen has 16 g/mol, and water (H₂O) has a molar mass of 18 g/mol. Once you know the molar mass, the conversion is straightforward division.
Key Takeaways
- Moles measure the number of particles (atoms or molecules) in a substance, while grams measure mass; molar mass is the bridge between them.
- Find the molar mass by adding the atomic masses of all atoms in the compound using the periodic table.
- Divide the number of grams by the molar mass to get moles: moles = grams ÷ molar mass.
- Check your work by multiplying moles back by molar mass; you should get your original gram amount.
Finding the molar mass of an element
For single elements, the molar mass is listed on the periodic table and is numerically equal to the atomic mass. Hydrogen is 1 g/mol, helium is 4 g/mol, carbon is 12 g/mol, nitrogen is 14 g/mol, and oxygen is 16 g/mol. These numbers are rounded for simplicity in most chemistry courses, though more precise values exist.
When you see a periodic table in a chemistry textbook or online, the atomic mass (usually shown as a decimal) is the molar mass you use for conversion. Write down the value for the element you are working with before you divide.
Finding the molar mass of a compound
For compounds made of multiple elements, add the molar masses of all atoms in the molecule. Water (H₂O) contains two hydrogen atoms and one oxygen atom, so: (2 × 1) + (1 × 16) = 18 g/mol. Carbon dioxide (CO₂) is (1 × 12) + (2 × 16) = 44 g/mol. Sodium chloride (NaCl) is (1 × 23) + (1 × 35.5) = 58.5 g/mol.
The subscript numbers in the chemical formula tell you how many of each atom to count. If there is no subscript, there is one atom of that element. Multiply each atomic mass by its subscript, then add all the products together to get the total molar mass.
Working through a step-by-step example
Suppose you have 25 grams of water and need to find how many moles that is. First, find the molar mass of water (H₂O): (2 × 1) + (1 × 16) = 18 g/mol. Then divide: 25 grams ÷ 18 g/mol = 1.39 moles. That is your answer.
Another example: you have 50 grams of carbon dioxide (CO₂). The molar mass is (1 × 12) + (2 × 16) = 44 g/mol. Divide: 50 grams ÷ 44 g/mol = 1.14 moles. The units work out because grams cancel and you are left with moles.
Checking your answer by converting back
To verify your conversion is correct, multiply your mole answer by the molar mass. You should get back to your original gram amount (or very close, allowing for rounding). If you calculated 1.39 moles of water, multiply: 1.39 moles × 18 g/mol = 25 grams. This reverse calculation catches arithmetic errors and builds confidence in your work.
Small differences due to rounding are normal, especially if you rounded intermediate steps. If your check is far off, recalculate the molar mass and the division.
Why moles matter in chemistry
A mole is a unit that counts particles—specifically, 6.022 × 10²³ particles (atoms, molecules, or ions). This huge number is called Avogadro's number. Because atoms and molecules are too small to count individually, chemists use moles to work with measurable amounts of substance. When you convert grams to moles, you are translating from a mass you can measure on a scale into a particle count that matters for chemical reactions.
Moles are essential for stoichiometry (calculating how much product a reaction will make) and for understanding concentration in solutions. Every chemistry calculation that involves "how much" of a substance reacts with "how much" of another relies on converting to moles first.
Common mistakes to avoid
The most frequent error is using the wrong molar mass. Double-check the periodic table and make sure you have added all atoms in a compound correctly. Another mistake is forgetting to multiply by subscripts in the chemical formula—if the formula is Ca(OH)₂, you have one calcium, two oxygens, and two hydrogens, not one of each.
Some students also confuse molar mass with molecular weight or forget to include units in their calculation. Always write "g/mol" for molar mass and "moles" for your final answer. This keeps track of what you are measuring and makes it easier to spot errors.
Frequently Asked Questions
What is the difference between grams and moles?
Grams measure mass (how heavy something is), while moles measure the number of particles in a substance. One mole of any substance always contains 6.022 × 10²³ particles, but the mass of one mole varies depending on what the substance is.
Do I need to memorize the periodic table to convert grams to moles?
No. You need access to a periodic table, which is provided in nearly all chemistry courses and exams. You do not need to memorize atomic masses, but you should know how to read the periodic table and locate the atomic mass for each element.
What if the molar mass has a decimal, like 35.5 for chlorine?
Use the decimal value as given on the periodic table. For chlorine, use 35.5 g/mol, not 35 or 36. The decimal reflects the natural mix of isotopes and gives a more accurate result when you divide.
Can I convert moles back to grams the same way?
Yes, but in reverse. To go from moles to grams, multiply moles by molar mass: grams = moles × molar mass. This is the opposite operation and is just as straightforward.
What if I have a very large or very small number of grams?
The process is identical. Whether you have 0.5 grams or 5,000 grams, divide by the molar mass. The calculator handles large and small numbers the same way. Just make sure your molar mass is correct.