Grams to Moles Calculator
Convert grams to moles and moles to grams in one click. Enter a mass, pick a compound (or type any chemical formula like H2SO4 — the built-in formula parser computes its molar mass from 118 elements), and get the answer with full step-by-step working, significant-figure control, and molecule counts via Avogadro's number.
Supports element symbols, subscripts as plain numbers, parentheses — Ca(OH)2, Al2(SO4)3 — and hydrates with a dot — CuSO4.5H2O.
Step-by-step working
| Element | Atoms | Atomic weight | Contribution |
|---|---|---|---|
| Molar mass M | |||
How to convert grams to moles
The mole is the chemist's counting unit: one mole contains exactly 6.02214076×10²³ entities (Avogadro's number). To convert grams to moles, divide the mass by the substance's molar mass:
n (mol) = m (g) ÷ M (g/mol)
- Find the molar mass M — pick a compound above or type its formula.
- Divide your mass m in grams by M.
- The result n is the amount in moles.
Example: 100 g of table salt (NaCl, M = 58.44 g/mol) → n = 100 ÷ 58.44 = 1.711 mol.
How to convert moles to grams
To convert moles to grams, run the same relationship backwards — multiply the amount in moles by the molar mass:
m (g) = n (mol) × M (g/mol)
Example: 2.5 mol of NaCl → m = 2.5 × 58.44 = 146.1 g.
Molar mass from any chemical formula (built-in parser)
Instead of looking up tables, type a formula and this mole calculator derives its molar mass from the atomic weights of 118 elements. It understands:
- Plain formulas — H2SO4 → 2(1.008) + 32.06 + 4(15.999) = 98.072 g/mol
- Parentheses / polyatomic groups — Ca(OH)2, Al2(SO4)3
- Hydrates — CuSO4.5H2O (copper(II) sulfate pentahydrate, 249.677 g/mol)
View all 118 atomic weights used
| Symbol | Element | Atomic weight |
|---|
Common molar masses (g/mol)
A quick-reference molar mass table for the 48 compounds built into the converter above:
| Formula | Name | Molar mass (g/mol) |
|---|
Worked examples
Example 1 — grams to moles
Question: How many moles are in 18.015 g of water (H₂O)?
Working: M(H₂O) = 2(1.008) + 15.999 = 18.015 g/mol.
n = 18.015 ÷ 18.015 = 1.000 mol.
Example 2 — moles to grams
Question: What is the mass of 2.5 mol of sodium chloride (NaCl)?
Working: M(NaCl) = 22.990 + 35.45 = 58.44 g/mol.
m = 2.5 × 58.44 = 146.1 g.
Example 3 — formula parser
Question: How many moles are in 50 g of copper(II) sulfate pentahydrate?
Working: M(CuSO₄·5H₂O) = 249.677 g/mol.
n = 50 ÷ 249.677 = 0.2003 mol.
Example 4 — molecules via Avogadro
Question: How many water molecules are in 1 mol of H₂O?
Working: N = n × NA = 1 × 6.02214076×10²³ = 6.022×10²³ molecules.
Significant figures & scientific notation
Chemistry answers are only as precise as their inputs. The converter lets you round the result to 2–10 significant figures — match the least precise measurement you started with (e.g. "2.5 mol" has 2 s.f., so quote 146 g, not 146.1 g, if you want to be strict). Toggle scientific notation for very large or small values such as molecule counts (1.204×10²⁴) or trace amounts.
Moles to molecules — Avogadro's number
Every grams-to-moles result also shows the particle count: N = n × 6.02214076×10²³. Two moles of anything always contain 1.204×10²⁴ formula units — whether water molecules, NaCl ion pairs, or glucose molecules. This makes the tool handy for stoichiometry practice as well as lab prep.
Grams ↔ moles — frequently asked questions
How do I convert grams to moles?
Divide the mass in grams by the molar mass of the substance in g/mol: n = m ÷ M. For example, 100 g of sodium chloride (NaCl, molar mass 58.44 g/mol) is 100 ÷ 58.44 = 1.711 mol. This calculator does the division for you and shows each step.
How do I convert moles to grams?
Multiply the amount in moles by the molar mass: m = n × M. For example, 2.5 mol of NaCl (58.44 g/mol) weighs 2.5 × 58.44 = 146.1 g.
How many moles are in 18.015 g of water?
Exactly 1.0 mol. Water (H₂O) has a molar mass of 18.015 g/mol, so 18.015 ÷ 18.015 = 1.0 mol.
How many grams are in 0.25 moles of glucose?
45.04 g. Glucose (C₆H₁₂O₆) has a molar mass of 180.156 g/mol, so 0.25 × 180.156 = 45.04 g.
What is the molar mass of carbon dioxide (CO₂)?
44.01 g/mol — one carbon (12.011) plus two oxygens (2 × 15.999): 12.011 + 31.998 = 44.01 g/mol.
How do I calculate molar mass from a chemical formula?
Add up the atomic weights of every atom, multiplying by subscripts and brackets. For sulfuric acid (H₂SO₄): 2(1.008) + 32.06 + 4(15.999) = 98.07 g/mol. This page's formula parser does exactly that for any formula you type, including parentheses like Ca(OH)₂ and hydrates like CuSO₄·₅H₂O.
How many moles are in 1 kg of water?
About 55.51 mol: 1000 g ÷ 18.015 g/mol = 55.51 mol.
How many molecules are in 2 moles of a substance?
1.204×10^24. Multiply the moles by Avogadro's number (6.02214076×10²³): 2 × 6.02214076×10²³ = 1.204×10^24 molecules or formula units.
What is the mass of 0.5 mol of calcium carbonate?
50.04 g. CaCO₃ has a molar mass of 100.09 g/mol, so 0.5 × 100.09 = 50.04 g.
Can I convert grams of one substance directly into moles of another?
No — molar mass is specific to each substance, so there is no universal grams-to-moles shortcut across substances. Convert grams of substance A to moles of A first (÷ Mᴀ), use the balanced chemical equation's mole ratio to get moles of B, then convert to grams of B (× Mʙ).
What is the difference between molar mass and molecular mass?
They are numerically identical for a given substance. Molecular mass is the mass of one molecule in atomic mass units (u); molar mass is the mass of one mole in g/mol. Water: 18.015 u per molecule = 18.015 g per mole.
How many significant figures should my answer have?
Match the least precise measurement you started with. If you weighed 2.5 mol (2 s.f.) of NaCl, report 1.5×10² g rather than 146.1 g. The converter above lets you round results to 2–10 significant figures and switch to scientific notation.
Free tool by NRTechStudio