Chemists count atoms and molecules in moles, but balances measure grams. The bridge between the two is the molar mass M – the mass of one mole of a substance in grams per mole, numerically equal to the formula mass in daltons. Water has M = 18.015 g/mol, so 18.015 g of water is one mole, or 6.022 × 10²³ molecules.
Converting grams to moles is the first step of almost every stoichiometry problem: balanced equations give ratios of moles, not grams, so you convert the masses you weigh into moles, apply the mole ratio and convert back. The same relationship, n = m/M, is also used in reverse – to find how many grams to weigh out for a given number of moles – and to identify an unknown compound from a measured mass and amount.
Choose a common substance to fill in its molar mass, or type the molar mass of your own compound (add up the atomic masses in its formula, including any water of crystallisation).
How to use the Grams to Moles Calculator
- Find
- Substance
- Molar mass
- Mass
- Amount of substance
Results update as you type, every field has its own unit menu, and everything is calculated in your browser.
How it works
Choose what to find. For moles, divide the mass by the molar mass; for mass, multiply moles by the molar mass; for molar mass, divide the mass by the moles. The number of particles is the amount in moles multiplied by the Avogadro constant, and the mass of a single particle is M ÷ N_A.
Worked example
How many moles are in 25 g of table salt? NaCl has M = 22.990 + 35.45 = 58.44 g/mol, so n = 25 ÷ 58.44 = 0.4278 mol. That is 0.4278 × 6.022 × 10²³ = 2.576 × 10²³ formula units, and one NaCl unit weighs 58.44 ÷ 6.022 × 10²³ = 9.70 × 10⁻²³ g.
Going the other way, 0.5 mol of glucose (180.156 g/mol) weighs 0.5 × 180.156 = 90.08 g.
Molar masses of common substances
| Substance | Formula | Molar mass (g/mol) | 1 g equals |
|---|---|---|---|
| Water | H₂O | 18.015 | 0.05551 mol |
| Sodium chloride | NaCl | 58.44 | 0.01711 mol |
| Carbon dioxide | CO₂ | 44.009 | 0.02272 mol |
| Glucose | C₆H₁₂O₆ | 180.156 | 0.005551 mol |
| Sulfuric acid | H₂SO₄ | 98.072 | 0.01020 mol |
| Calcium carbonate | CaCO₃ | 100.086 | 0.009991 mol |
Tips
- Always start from a balanced equation – coefficients give the mole ratio.
- Convert everything to moles first, then use the ratio, then convert back.
- Every field has its own unit menu – g, mg, mol, mmol, L and mL all work.
- Everything is calculated in your browser.
Common mistakes to avoid
- Using mass ratios instead of mole ratios.
- Forgetting water of crystallisation in the molar mass of hydrates.
- Confusing molarity (per litre of solution) with molality (per kilogram of solvent).
Inputs explained
| Field | What to enter |
|---|---|
| Find | Choose one: Moles (from grams), Grams (from moles), Molar mass (from grams and moles) |
| Substance | Choose one: Water H₂O – 18.015, Sodium chloride NaCl – 58.44, Glucose C₆H₁₂O₆ – 180.156, Sucrose C₁₂H₂₂O₁₁ – 342.297 … |
| Molar mass | Units: g/mol, kg/mol, Da (u), kDa |
| Mass | Units: g, mg, µg, kg, oz, lb |
| Amount of substance | Units: mol, mmol, µmol, nmol, kmol |
What each result means
- Mass of one particle = [Molar mass used]÷6.02214076e+23
- Mass of one particle in daltons = [Molar mass used]
Formula
n = m ÷ M · m = n × M · M = m ÷ n · number of particles N = n × N_A (N_A = 6.02214076 × 10²³ mol⁻¹)Worked example
Inputs — Find: Moles (from grams); Substance: Sodium chloride NaCl – 58.44; Mass: 25 g.
Results — Molar mass used = 58.44 g/mol; Amount of substance (moles) = 0.427789 mol; Number of particles (molecules or formula units) = 2.5762e23; Mass of one particle = 9.7042e-23 g; Mass of one particle in daltons = 58.44 Da.
Key terms
- Mole
- Amount of substance containing exactly 6.02214076 × 10²³ specified particles.
- Molar mass
- Mass of one mole of a substance, in g/mol.
- Avogadro constant
- N_A = 6.02214076 × 10²³ mol⁻¹, the number of particles per mole (exact since 2019).
- Formula unit
- The smallest repeating unit of an ionic compound, such as one NaCl.
Frequently asked questions
How do I convert grams to moles?
Divide the mass by the molar mass: n = m ÷ M. For example, 100 g of water ÷ 18.015 g/mol = 5.551 mol.
How do I convert moles to grams?
Multiply by the molar mass: m = n × M. Half a mole of NaCl is 0.5 × 58.44 = 29.22 g.
Where do I find the molar mass?
Add up the standard atomic weights of every atom in the formula (e.g. H₂SO₄ = 2 × 1.008 + 32.06 + 4 × 15.999 = 98.07 g/mol) or read it from the reagent bottle.
How many molecules are in 1 gram of water?
1 ÷ 18.015 = 0.05551 mol, times 6.022 × 10²³ = 3.34 × 10²² molecules.
What about hydrates?
Include the water of crystallisation: CuSO₄·5H₂O has M = 249.68 g/mol, not 159.60 g/mol for anhydrous CuSO₄.
Is molar mass the same as molecular weight?
Numerically yes – the molar mass in g/mol equals the relative molecular mass (molecular weight) – but molar mass has units, molecular weight is dimensionless.
How do I convert grams of a gas to litres?
First convert to moles, then use the molar volume: about 22.71 L/mol at 0 °C and 1 bar, or 24.47 L/mol at 25 °C and 1 atm.
What formula does the Grams to Moles Calculator use?
n = m ÷ M · m = n × M · M = m ÷ n · number of particles N = n × N_A (N_A = 6.02214076 × 10²³ mol⁻¹).