Mole Calculator Guide: How to Convert Grams to Moles & Count Particles
Written and verified by Muhammad Haroon, founder of Numblox · Moles = grams ÷ molar mass · Avogadro's number · Worked examples · Updated 24 November 2026
The mole is chemistry's counting unit — a way to talk about atoms and molecules in amounts you can weigh on a balance. Nobody counts molecules one by one; instead you weigh a sample, divide by its molar mass, and you have the count in moles. This guide explains the idea, the formula, and Avogadro's number, with examples verified against the calculator.
Try it yourself: use the free Mole Calculator on Numblox — enter grams and molar mass, and see the moles plus the actual particle count. Nothing you enter is stored or sent anywhere.
The mole formula
Moles = mass (g) ÷ molar mass (g/mol)
Molar mass is the mass of one mole of a substance: for an element it is the atomic mass from the periodic table (carbon 12, oxygen 16); for a compound, add the atoms up — water H₂O is 1 + 1 + 16 = 18 g/mol, carbon dioxide CO₂ is 12 + 16 + 16 = 44 g/mol, glucose C₆H₁₂O₆ is 180.16 g/mol, and table salt NaCl is 58.44 g/mol.
One mole of anything contains the same number of particles — Avogadro's number, 6.022 × 10²³. So the full chain is:
Particles = moles × 6.022 × 10²³
How to use the calculator
Step 1: Enter the mass of your substance, in grams.
Step 2: Enter its molar mass in g/mol — add up the atomic masses from the periodic table (water, H₂O, is 2 × 1 + 16 = 18 g/mol).
Step 3: Read the amount in moles, together with the number of particles (atoms, molecules or ions) it contains.
Worked example 1 — water: 18 g
Step 1: moles = 18 ÷ 18 = 1 mol.
Step 2: particles = 1 × 6.022 × 10²³ = 6.022 × 10²³ molecules.
Eighteen grams of water — about a tablespoon — really does contain over six hundred billion trillion molecules. The calculator shows both numbers.
Worked example 2 — carbon dioxide: 44 g
CO₂'s molar mass is 44 g/mol, so 44 g is again exactly 1 mol and the same 6.022 × 10²³ molecules. Different substance, different mass per mole, identical particle count — that equality is the entire point of the mole.
Worked example 3 — glucose: 100 g
Step 1: moles = 100 ÷ 180.16 = 0.555 mol.
Step 2: particles = 0.555 × 6.022 × 10²³ = 3.34 × 10²³ molecules.
The calculator reports 0.555 mol and 3.34 × 10²³ particles.
Worked example 4 — table salt: 5 g
Moles = 5 ÷ 58.44 = 0.0856 mol of NaCl — about 5.15 × 10²² formula units. A level teaspoon of salt sounds trivial; in particle terms it is anything but.
Getting molar mass right
Most mole errors are molar-mass errors. Count every atom in the formula, including the ones hiding in subscripts and brackets: Ca(OH)₂ is 40 + 2 × (16 + 1) = 74 g/mol, not 57. Hydrates add their water molecules too — CuSO₄·5H₂O includes five full waters. When in doubt, write the atom inventory out in a row before adding.
Common questions
How do I convert grams to moles? Divide the mass in grams by the substance's molar mass in g/mol. For example, 18 g of water ÷ 18 g/mol = 1 mol.
What is Avogadro's number? 6.022 × 10²³ — the number of particles in one mole of any substance, whether atoms, molecules or ions. It links the microscopic world to the grams on a balance.
How do I find the molar mass of a compound? Add the atomic masses of every atom in its formula: glucose C₆H₁₂O₆ = 6 × 12.01 + 12 × 1.008 + 6 × 16.00 ≈ 180.16 g/mol.
How many molecules are in 5 g of salt? 5 ÷ 58.44 = 0.0856 mol, times Avogadro's number gives about 5.15 × 10²² formula units.
Check your own numbers
Enter your grams and molar mass in the Numblox Mole Calculator and compare with the formula above. Turning moles into a solution strength is the next step — see the Molarity Calculator Guide.
Disclaimer: This article and the calculator provide general educational information and estimates only. Always double-check figures that matter for coursework grades, lab work, wiring, or safety.
Related: Mole Calculator · Molarity Calculator Guide · Density Calculator Guide · All free calculators
Real-world examples and common mistakes
A glass of water holds more molecules than there are glasses of water in all the oceans. 36 g of water is 36 / 18.015 ≈ 2 moles, which is 2 × 6.022 × 10²³ ≈ 1.2 × 10²⁴ molecules. The mole is just a counting unit — a chemist's dozen — and the bridge is always the molar mass. The common mistakes: using the atomic mass of one element for a whole compound (water is 2 × 1.008 + 16.00, not 1.008), rounding the molar mass too early and drifting the final count, and confusing moles with mass when a recipe or equation is written in moles — equations balance in moles, scales measure grams, and this conversion is how you move between them.