How to Calculate Moles from Grams: Formula and Worked Examples
Learning how to calculate moles from grams is one of the first real skills a chemistry student needs, because almost every stoichiometry problem starts by converting a measured mass into a mole count. The process only requires one formula and one number you look up on the periodic table — the molar mass of the substance — but small errors in that lookup or in significant figures cause a surprising number of wrong answers. This guide walks through the grams-to-moles formula from scratch, works full examples with water, table salt, calcium carbonate, and a hydrated compound, and shows how this single conversion becomes the entry point into every stoichiometry calculation you'll do afterward.
Conteúdo
- 01What Does It Mean to Calculate Moles from Grams?
- 02How Do You Find Molar Mass Before Converting?
- 03How Do You Calculate Moles from Grams for Water (H2O)?
- 04How Do You Calculate Moles from Grams for an Ionic Compound Like NaCl?
- 05How Do You Calculate Moles from Grams for a Compound with Multiple Elements, Like CaCO3?
- 06How Do You Calculate Moles from Grams for a Hydrated Compound?
- 07How Does Grams-to-Moles Fit into Stoichiometry?
- 08What Are the Most Common Mistakes When Converting Grams to Moles?
- 09Grams-to-Moles Practice Problems with Solutions
- 10Getting More Help With Grams-to-Moles Conversions
What Does It Mean to Calculate Moles from Grams?
A mole is a counting unit, just like 'dozen' means 12 of something — except one mole means exactly 6.022 × 10²³ particles (Avogadro's number), whether those particles are atoms, molecules, or ions. Chemists rarely count particles directly because they're far too small and numerous to weigh individually, so instead they weigh a sample on a balance and convert that mass into a mole count using the substance's molar mass. Learning how to calculate moles from grams matters because chemical equations are balanced in terms of moles, not grams — a reaction that consumes '2 molecules of hydrogen for every 1 molecule of oxygen' really means 2 moles for every 1 mole, and the only way to connect that ratio to a real, weighable sample is through the grams-to-moles conversion.
Moles-from-grams formula: n = m / M, where n is moles, m is the given mass in grams, and M is the molar mass in grams per mole.
How Do You Find Molar Mass Before Converting?
Molar mass (M) is the mass in grams of one mole of a substance, and it's the number you divide by to turn grams into moles — so finding it correctly is the most important step in the entire process. Molar mass is built directly from the atomic masses listed on the periodic table, added together according to the substance's chemical formula.
1. Look up atomic masses for each element
Every element's periodic table entry lists its average atomic mass in atomic mass units (amu), which is numerically equal to grams per mole for that element. Hydrogen (H) ≈ 1.008 g/mol, oxygen (O) ≈ 16.00 g/mol, sodium (Na) ≈ 22.99 g/mol, chlorine (Cl) ≈ 35.45 g/mol, carbon (C) ≈ 12.01 g/mol, calcium (Ca) ≈ 40.08 g/mol.
2. Multiply by the subscript for each element in the formula
The subscript after each element symbol tells you how many atoms of that element are in one formula unit. For H2O, hydrogen has a subscript of 2 and oxygen has an implied subscript of 1, so you use 2 hydrogen atoms and 1 oxygen atom in the sum.
3. Add every element's contribution together
Sum (atomic mass × subscript) for every element in the formula to get the molar mass of the whole compound, expressed in grams per mole (g/mol).
Molar mass formula: M = Σ (atomic mass of each element × number of atoms of that element in the formula), reported in g/mol.
How Do You Calculate Moles from Grams for Water (H2O)?
Water is the standard first example because its molar mass is small and its formula has only two elements. Here's the full worked calculation for a real mass of water.
1. State the problem
How many moles are in 36.0 grams of water (H2O)?
2. Calculate the molar mass of H2O
Hydrogen: 2 × 1.008 g/mol = 2.016 g/mol. Oxygen: 1 × 16.00 g/mol = 16.00 g/mol. Molar mass of H2O = 2.016 + 16.00 = 18.02 g/mol.
3. Apply the formula n = m / M
n = 36.0 g ÷ 18.02 g/mol = 1.998 mol, which rounds to 2.00 mol.
4. Sanity-check the answer
36.0 g is almost exactly double the molar mass of water (18.02 g/mol), so the answer should be close to 2 moles — and it is. This kind of quick estimate before trusting a final number catches most calculation errors immediately.
How Do You Calculate Moles from Grams for an Ionic Compound Like NaCl?
Ionic compounds like table salt (NaCl) use the exact same n = m / M formula as molecular compounds — the only extra care needed is building the molar mass correctly from all elements in the formula unit.
1. State the problem
How many moles are in 58.5 grams of sodium chloride (NaCl)?
2. Calculate the molar mass of NaCl
Sodium: 1 × 22.99 g/mol = 22.99 g/mol. Chlorine: 1 × 35.45 g/mol = 35.45 g/mol. Molar mass of NaCl = 22.99 + 35.45 = 58.44 g/mol.
3. Apply the formula n = m / M
n = 58.5 g ÷ 58.44 g/mol = 1.001 mol, which rounds to 1.00 mol.
4. Note the significant figures
Both the given mass (58.5 g, 3 sig figs) and the molar mass (58.44 g/mol, 4 sig figs) limit the final answer to 3 significant figures, so 1.00 mol is the correctly rounded result — not 1.001 mol.
For ionic compounds, add the molar mass of every ion in the formula unit exactly as written — NaCl contributes one sodium and one chlorine, not two of either.
How Do You Calculate Moles from Grams for a Compound with Multiple Elements, Like CaCO3?
Compounds with three or more elements, like calcium carbonate (CaCO3), simply add one more term to the molar mass sum — the conversion formula itself never changes.
1. State the problem
How many moles are in 25.0 grams of calcium carbonate (CaCO3)?
2. Calculate the molar mass of CaCO3
Calcium: 1 × 40.08 g/mol = 40.08 g/mol. Carbon: 1 × 12.01 g/mol = 12.01 g/mol. Oxygen: 3 × 16.00 g/mol = 48.00 g/mol. Molar mass of CaCO3 = 40.08 + 12.01 + 48.00 = 100.09 g/mol.
3. Apply the formula n = m / M
n = 25.0 g ÷ 100.09 g/mol = 0.2498 mol, which rounds to 0.250 mol.
How Do You Calculate Moles from Grams for a Hydrated Compound?
A hydrate is an ionic compound with water molecules trapped in its crystal structure, written with a dot, like CuSO4·5H2O (copper(II) sulfate pentahydrate). The water of hydration is part of the formula mass and must be included when finding molar mass, or the mole calculation will be wrong.
1. State the problem
How many moles are in 24.95 grams of copper(II) sulfate pentahydrate (CuSO4·5H2O)?
2. Calculate the molar mass of the anhydrous part (CuSO4)
Copper: 1 × 63.55 g/mol = 63.55 g/mol. Sulfur: 1 × 32.07 g/mol = 32.07 g/mol. Oxygen: 4 × 16.00 g/mol = 64.00 g/mol. Subtotal for CuSO4 = 63.55 + 32.07 + 64.00 = 159.62 g/mol.
3. Add the molar mass of the water of hydration
5 H2O = 5 × 18.02 g/mol = 90.10 g/mol. The dot in the formula means 'plus,' so it does not change how the addition works — you simply add this term to the anhydrous subtotal.
4. Add both parts for the full hydrate molar mass
Molar mass of CuSO4·5H2O = 159.62 + 90.10 = 249.72 g/mol.
5. Apply the formula n = m / M
n = 24.95 g ÷ 249.72 g/mol = 0.09991 mol, which rounds to 0.0999 mol.
For hydrates, molar mass = molar mass of the anhydrous compound + (number of water molecules × molar mass of water) — never drop the water term.
How Does Grams-to-Moles Fit into Stoichiometry?
Converting grams to moles is rarely the final goal of a chemistry problem — it's usually the first of several steps in a stoichiometry calculation that ends by predicting the mass or volume of a different substance in a reaction.
1. Step 1: Convert given mass to moles
Use n = m / M on the substance you're given, exactly as shown in the examples above.
2. Step 2: Use the mole ratio from the balanced equation
Balanced chemical equations give mole ratios between reactants and products, such as 2 H2 + O2 → 2 H2O, meaning 2 moles of H2 react with every 1 mole of O2. Multiply the moles from Step 1 by the appropriate ratio to find moles of the substance you want.
3. Step 3: Convert the resulting moles back to grams if needed
If the question asks for a mass rather than a mole count, multiply the moles found in Step 2 by that substance's own molar mass (m = n × M) — the same formula from Step 1, solved in reverse.
The grams → moles → moles → grams pathway is the backbone of nearly every stoichiometry problem: convert to moles first, apply the mole ratio, then convert back to the units the question asks for.
What Are the Most Common Mistakes When Converting Grams to Moles?
These errors account for most of the wrong answers on grams-to-moles homework, even among students who understand the formula conceptually.
1. Dividing instead of multiplying, or vice versa
n = m / M always divides mass by molar mass to get moles. To go the other direction — moles back to grams — multiply instead: m = n × M. Mixing these up produces answers that are off by a factor of the molar mass squared.
2. Forgetting a subscript when computing molar mass
Missing the '2' in H2O, or the '3' in CaCO3, understates the molar mass and throws off every subsequent calculation. Always rewrite the formula and count each element's subscript explicitly before adding atomic masses.
3. Dropping the water of hydration in a hydrate formula
Treating CuSO4·5H2O as if it were just CuSO4 removes about 90 g/mol from the true molar mass, which is a large enough error to fail a lab report. Always add the water term separately.
4. Using the wrong number of significant figures
A final mole answer should never have more significant figures than the least precise measurement used to find it. If a mass is given to 3 sig figs, the mole answer should also be reported to 3 sig figs, even if the molar mass lookup has more digits available.
5. Confusing molecular mass with molar mass units
Molecular mass (in amu) and molar mass (in g/mol) share the same numeric value, but only molar mass carries units that let it cancel correctly against grams in the n = m / M formula. Always attach g/mol, not just a bare number, when writing molar mass in a calculation.
Grams-to-Moles Practice Problems with Solutions
Try each problem before checking the solution, then compare your molar mass calculation and final answer step by step.
1. Problem 1 (Beginner): Moles in 9.00 g of H2O
Molar mass of H2O = 2(1.008) + 16.00 = 18.02 g/mol. n = 9.00 g ÷ 18.02 g/mol = 0.4994 mol, which rounds to 0.499 mol.
2. Problem 2 (Intermediate): Moles in 117 g of NaCl
Molar mass of NaCl = 22.99 + 35.45 = 58.44 g/mol. n = 117 g ÷ 58.44 g/mol = 2.002 mol, which rounds to 2.00 mol.
3. Problem 3 (Intermediate): Moles in 50.0 g of CaCO3
Molar mass of CaCO3 = 40.08 + 12.01 + 3(16.00) = 100.09 g/mol. n = 50.0 g ÷ 100.09 g/mol = 0.4996 mol, which rounds to 0.500 mol.
4. Problem 4 (Advanced): Moles in 12.50 g of MgSO4·7H2O
Anhydrous MgSO4: Mg (24.31) + S (32.07) + 4×O (64.00) = 120.38 g/mol. Water: 7 × 18.02 = 126.14 g/mol. Total molar mass = 120.38 + 126.14 = 246.52 g/mol. n = 12.50 g ÷ 246.52 g/mol = 0.05071 mol, which rounds to 0.0507 mol.
Getting More Help With Grams-to-Moles Conversions
Once you're comfortable building a molar mass from atomic masses and subscripts, the n = m / M formula turns every grams-to-moles problem into the same short routine: find molar mass, then divide. That routine is also the first step you'll reuse in nearly every stoichiometry problem for the rest of a chemistry course, so it's worth practicing until it's automatic. If a specific compound's molar mass or a multi-step stoichiometry problem is giving you trouble, Solvify's step-by-step solver can show the same formula and rounding shown in this guide applied to your exact numbers, so you can see precisely where your own setup and the correct one diverge.
Before converting grams to moles, write out the full chemical formula with every subscript, then build the molar mass term by term — most errors happen at this step, not at the final division.
Artigos relacionados
Molarity Calculator: How to Calculate Molar Concentration Step by Step
Learn how moles connect to solution concentration, using the same molar mass skills from grams-to-moles conversions.
How to Calculate Average Atomic Mass: Formula and Worked Examples
See where the atomic mass values used in every molar mass calculation actually come from.
How to Calculate Percent Yield in Chemistry: A Step-by-Step Guide
A natural next step after grams-to-moles conversions, using mole ratios from stoichiometry to compare theoretical and actual yields.
Solucionadores matemáticos
Step-by-Step Solutions
Get every step of a grams-to-moles conversion shown explicitly — molar mass buildup, the formula applied, and correct rounding.
Smart Scan Solver
Snap a photo of a chemistry conversion problem and get an instant, fully worked solution.
Multi-Subject Support
Solve problems across chemistry, algebra, and other subjects with the same step-by-step approach.
