Grams to Moles Calculator
Convert grams to moles using a chemical formula or molar mass, with the grams-to-moles formula and step-by-step calculations. Enter a mass to get moles, or switch to moles to get grams — no balanced equation required.
How to Convert Grams to Moles
Grams measure mass on a balance; moles measure amount of substance in a chemical equation. Molar mass is the bridge between them. The whole conversion is five steps, whether the sample is 18 g of water or 25 g of salt.
Step 1Identify the substance
Write the chemical formula of the sample on the balance — H₂O, CO₂, NaCl, CaCO₃ — not the name alone and not a whole reaction. Subscripts matter: H₂O₂ is not H₂O, and their molar masses differ by 16 g/mol. If you already know the molar mass and have no formula, choose Molar Mass as the input. Skip a leading coefficient such as 2H₂O; the mass you enter is already the mass of however many formula units you weighed.
Step 2Find its molar mass
Molar mass M is the mass of one mole, in g/mol. Water is 18.015 g/mol; NaCl is 58.44 g/mol. Enter a formula and this calculator finds M from IUPAC standard atomic weights, so you can skip adding the periodic table by hand. Common mistakes: using one element's atomic mass (16 for oxygen) when the sample is a compound, or using a product's molar mass when the sample on the balance was a reactant.
Step 3Measure the mass in grams
Read the balance in grams, or convert first: 500 mg = 0.500 g, and 0.025 kg = 25 g. You can enter mg, g, or kg; the calculator converts the mass to grams before dividing. Mixing units without converting — treating 500 mg as 500 g next to 18.015 g/mol — is the usual off-by-thousand error in this step.
Step 4Divide grams by molar mass
Use the grams-to-moles formula n = m / M. For 36.03 g of water: 36.03 g ÷ 18.015 g/mol = 2.000 mol. The units cancel to mol; if they do not, the mass is still in the wrong unit. The result is that one division with the numbers filled in — no mole ratio from a chemical equation belongs in this step.
Step 5Report the answer in moles
Write the amount with the unit mol, and name the substance when it helps: 2.000 mol H₂O. Match significant figures to the mass and molar mass you used; answers here are shown to three decimal places by default. To go the other way, multiply by the same M: m = n × M. Counts of molecules or formula units come last — multiply moles by Avogadro's number only after n is known.
No reaction needed
Converting one substance from grams to moles does not use a balanced equation. Mole ratios appear only when you convert one species into another in a reaction — that step belongs to stoichiometry.
Grams to Moles Formula
The grams-to-moles formula is a single division. The worked examples, the steps above, and the moles-to-grams direction all use the same relationship with the symbols filled in.
Formula
n = m / M
moles = mass ÷ molar mass
| Symbol | Meaning | Unit |
|---|---|---|
| n | amount of substance | mol |
| m | mass | g |
| M | molar mass | g/mol |
Worked substitution
Take 36.03 g of water. The molar mass of H₂O is 18.015 g/mol, so:
n = m / M n = 36.03 g ───────────── 18.015 g/mol = 2.000 mol H₂O
Units cancel cleanly: grams in the numerator divide by grams per mole in the denominator and leave moles. If the leftover unit is not mol, the mass was still in mg or kg — convert to grams first, then divide.
Moles to grams (same M)
For the other direction, reverse the arithmetic: m = n × M. Two moles of water give 2.000 × 18.015 = 36.030 g. Choose Moles → Grams above and the same molar mass is used — you only invert the operation, not the formula for M.
Why Is Molar Mass Needed?
Grams and moles describe different things. A balance reads mass; a chemical formula and a balanced equation are written in moles. Without molar mass there is no conversion factor — only two numbers that cannot be compared directly.
Grams → moles
grams │ │ ÷ molar mass ▼ moles
Moles → grams
moles │ │ × molar mass ▼ grams
Molar mass answers a practical question: how many grams is one mole of this substance? Once that number is known, every other mass is a multiple or a fraction of it. 9.0075 g of water is half a mole because half of 18.015 is 9.0075; 180.15 g is ten moles for the same reason.
Enter a chemical formula above and the molar mass is found for you; after that, the conversion is one multiplication or division. For atom counts, mass percentages, and the full addition by element, open the molar mass calculator or a compound page such as H₂O.
Grams to Moles Examples
Five homework-style masses, including full-mole samples and smaller lab amounts. The molar masses match what the calculator uses above.
Water — 1 mol
18.015 g H₂O
÷
18.015 g/mol
= 1 mol H₂On = 18.015 g ÷ 18.015 g/mol = 1 mol
When the mass equals the molar mass, the quotient is exactly 1.000 mol. Textbooks that use 18.02 g/mol still treat 18.02 g of water as 1 mol to three significant figures.
Water — 2 mol
36.03 g H₂O
÷
18.015 g/mol
= 2 mol H₂On = 36.03 g ÷ 18.015 g/mol = 2 mol
Same molar mass, double the mass: 36.03 ÷ 18.015 = 2.000 mol. Once M is fixed, doubling the grams doubles the moles — you do not need a new equation.
Carbon Dioxide
44.01 g CO₂
÷
44.009 g/mol
= 1 mol CO₂n = 44.01 g ÷ 44.009 g/mol = 1 mol
Many textbooks list 44.01 g/mol; adding the atomic weights gives 44.009 g/mol. Dividing 44.01 g by either value still gives 1.00 mol to three significant figures.
Sodium Chloride — 25 g
25 g NaCl
÷
58.44 g/mol
= 0.428 mol NaCln = 25 g ÷ 58.44 g/mol = 0.428 mol
A typical lab-sized sample: 25 ÷ 58.44 ≈ 0.428 mol NaCl. Ionic solids use the same n = m / M; the answer is moles of formula units, not molecules.
Calcium Carbonate — ½ mol
50.045 g CaCO₃
÷
100.086 g/mol
= 0.5 mol CaCO₃n = 50.045 g ÷ 100.086 g/mol = 0.5 mol
Half a mole of limestone: 50.045 ÷ 100.086 ≈ 0.500 mol — useful when the sample on the balance is well below one full mole.
Common Grams-to-Moles Conversions
Everyday masses from homework and lab — full moles and smaller samples side by side. Open a formula for its full molar-mass page.
| Substance | Example mass | Molar mass | Moles |
|---|---|---|---|
| H₂OWater | 18.015 g | 18.015 g/mol | 1 mol |
| H₂OWater | 100 g | 18.015 g/mol | 5.551 mol |
| CO₂Carbon Dioxide | 44.01 g | 44.009 g/mol | 1 mol |
| NaClSodium Chloride | 58.44 g | 58.44 g/mol | 1 mol |
| NaClSodium Chloride | 25 g | 58.44 g/mol | 0.428 mol |
| CaCO₃Calcium Carbonate | 100.086 g | 100.086 g/mol | 1 mol |
| CaCO₃Calcium Carbonate | 50.045 g | 100.086 g/mol | 0.5 mol |
Molar masses use IUPAC standard atomic weights. Textbooks sometimes round CO₂ to 44.01 g/mol or CaCO₃ to 100.09 g/mol; the mole values still agree to three significant figures.
Related Chemistry Calculators
Use molar mass when you need M itself; use stoichiometry when a balanced equation connects one substance to another.
- Molar Mass CalculatorAtomic weights, mass percentages, and the full sum behind M.
- Stoichiometry CalculatorConvert between reactants and products using mole ratios.
- Limiting Reactant CalculatorFind the limiting reagent once every amount is in moles.
- Chemical Equation BalancerBalance the equation before any stoichiometric conversion.
- Molar Mass of H₂O18.015 g/mol — the standard textbook grams-to-moles example.
- Molar Mass of CO₂About 44.01 g/mol in textbooks; 44.009 g/mol from atomic weights.
Frequently Asked Questions
How do you convert grams to moles?
Divide the mass in grams by the substance's molar mass in g/mol: moles = grams ÷ molar mass (n = m / M). For 36.03 g of water, 36.03 ÷ 18.015 = 2.000 mol H₂O. Use the mass and molar mass of the same substance — do not borrow a coefficient from a reaction. If you enter a chemical formula, the calculator finds the molar mass and shows each step.
What is the grams-to-moles formula?
n = m / M, where n is the amount of substance in moles, m is the mass in grams, and M is the molar mass in g/mol. The units cancel as g ÷ (g/mol) = mol. Going the other way, m = n × M. Both directions use the same molar mass; only the arithmetic flips.
What is molar mass?
Molar mass is the mass of one mole of a substance, in grams per mole (g/mol). It is the conversion factor between grams and moles. Water is 18.015 g/mol; CO₂ is about 44.01 g/mol in many textbooks, or 44.009 g/mol from the atomic-weight sum. Enter a formula above and the calculator finds M from IUPAC standard atomic weights.
Can I convert grams to moles without molar mass?
Not from mass alone. Grams and moles measure different things, so you need the molar mass — or a chemical formula the calculator can turn into a molar mass. Density, volume, or a balanced equation cannot replace M for a single-substance grams-to-moles step.
How many moles are in 18 grams of water?
Using 18.015 g/mol for H₂O, 18 ÷ 18.015 ≈ 0.999 mol — treated as 1 mol in most introductory answers. With exactly 18.015 g the result is 1.000 mol. Tables that use 18.02 g/mol give 18 ÷ 18.02 ≈ 0.999 mol the same way.
How do I convert moles back to grams?
Multiply: mass = moles × molar mass (m = n × M). 2.000 mol H₂O × 18.015 g/mol = 36.030 g. Choose Moles → Grams above, or reverse the same formula — the molar mass stays the same either way.
Do I need a balanced chemical equation to convert grams to moles?
No. Converting one substance from grams to moles needs only that substance's mass and molar mass. A balanced equation and mole ratios are needed only when you convert between different species in a reaction — use the stoichiometry calculator for that step.