Skip to main content

DigitalCalculators.net

Grams to Moles Calculator

Last updated By the DigitalCalculators.net team Free, no sign-up

Convert grams to moles, moles to grams, or either one to the number of molecules or atoms. Type the chemical formula and the molar mass is worked out for you, with every step shown.

Results

ItemValue

Atoms of each element

ElementPer formulaMoles of atomsNumber of atoms

Steps

StepWorking
Moles = mass ÷ molar mass, and particles = moles × 6.02214076 × 10²³. Molar masses use IUPAC standard atomic weights. Brackets and hydrates work, such as Ca(OH)2 or CuSO4·5H2O. Large numbers can be typed as 1.5e24 or 1.5 × 10^24.

Quick Answer

To convert grams to moles, divide the mass by the molar mass. Water, H₂O, has a molar mass of 18.015 g/mol, so 100 g of water is 100 ÷ 18.015 = 5.5509 mol. To go back, multiply moles by the molar mass. To count molecules, multiply moles by Avogadro’s number, 6.02214076 × 10²³.

Last updated: 4 December 2026 ·How we calculate this: n = m ÷ M

How This Grams to Moles Calculator Works

Type a chemical formula, choose what you know (a mass, a number of moles or a number of particles) and enter the amount. The calculator works out the molar mass from the formula using standard atomic weights, then converts your amount to the other two. It also shows how many atoms of each element the sample holds, with every step written out.

Quick explanation: the molar mass is the bridge between grams and moles.

  • Grams to moles: divide by the molar mass.
  • Moles to grams: multiply by the molar mass.
  • Moles to particles: multiply by 6.02214076 × 10²³.
  • Particles to moles: divide by 6.02214076 × 10²³.

How to Use the Grams to Moles Calculator

  1. Type the chemical formula, such as NaCl or C6H12O6.
  2. Choose whether you know the mass, the moles or the number of particles.
  3. Enter the amount, and pick the mass unit if needed.
  4. Press Calculate or Enter.
  5. Read the moles, mass and particles, check the steps, then save, share or print.

Core Formulas

  • Moles: n = m ÷ M
  • Mass: m = n × M
  • Particles: N = n × Nₐ
  • Moles from particles: n = N ÷ Nₐ
  • Molar mass: M = Σ (atoms of each element × its atomic weight)
  • Here m is mass in grams, M is molar mass in g/mol, n is moles and Nₐ = 6.02214076 × 10²³ per mole, an exact value.

Key Terms

  • Mole: an amount of substance equal to 6.02214076 × 10²³ particles.
  • Molar mass: the mass of one mole, in g/mol.
  • Avogadro’s number: 6.02214076 × 10²³, the number of particles in a mole.
  • Formula unit: the smallest repeating unit of an ionic compound, such as NaCl.
  • Millimole: one thousandth of a mole.

Worked Example

How many moles are in 28.35 g of glycine, C₂H₅O₂N? (This example is from OpenStax Chemistry 2e.)

  • Molar mass: 2 × 12.011 + 5 × 1.008 + 2 × 15.999 + 1 × 14.007 = 75.067 g/mol.
  • Moles: 28.35 g ÷ 75.067 g/mol = 0.3777 mol.
  • Molecules: 0.3777 mol × 6.02214076 × 10²³ = 2.274 × 10²³ molecules.
  • Carbon atoms: each molecule has 2, so there are 4.549 × 10²³ carbon atoms.

OpenStax rounds the answer to 0.3776 mol, the same as this calculator to four significant figures.

Real-Life Examples

  • Homework: check mole conversions and see the working.
  • Lab prep: find the grams to weigh for a set number of moles.
  • Stoichiometry: turn masses into moles before using a balanced equation.
  • Counting atoms: see how many atoms of each element a sample holds.
  • Comparing samples: keep one result as A, then compare another.

Moles vs Molecules

  • Moles: a counting unit for chemists, like a dozen but much larger.
  • Molecules: the actual number of particles.
  • Link: 1 mol = 6.02214076 × 10²³ particles, so a small number of moles is a huge number of molecules.

Grams in One Mole of Common Substances

SubstanceFormulaMolar mass (g/mol)Moles in 100 g
WaterH₂O18.0155.5509
Table saltNaCl58.4401.7112
Carbon dioxideCO₂44.0092.2723
GlucoseC₆H₁₂O₆180.1560.5551
Sodium hydroxideNaOH39.9972.5002
Calcium carbonateCaCO₃100.0860.9991
Sulfuric acidH₂SO₄98.0721.0197
Oxygen gasO₂31.9983.1252

More Examples to Check Your Work

  • Element: 4.7 g of potassium ÷ 39.098 g/mol = 0.12 mol K.
  • Atoms in a mass: 5.00 g of copper is 0.07868 mol, or 4.74 × 10²² atoms.
  • A small mass: 40.0 mg (0.0400 g) of saccharin, C₇H₅NO₃S, is 2.184 × 10⁻⁴ mol, or 1.32 × 10²⁰ molecules.
  • Moles to grams: 2.5 mol of water × 18.015 g/mol = 45.04 g.

All four match the answers in OpenStax’s worked examples once rounded to the same significant figures.

Common Mistakes to Avoid

  • Multiplying instead of dividing. Grams ÷ molar mass gives moles.
  • Wrong capitals. CO is carbon monoxide, Co is cobalt.
  • Forgetting brackets. Ca(OH)₂ has two oxygen and two hydrogen atoms.
  • Mixing up molecules and atoms. One mole of H₂O has three moles of atoms.
  • Using milligrams as grams. Pick the right mass unit.

Frequently Asked Questions

Divide the mass in grams by the molar mass in g/mol.

Multiply the number of moles by the molar mass.

About 5.551 mol, because water’s molar mass is 18.015 g/mol.

Multiply the moles by Avogadro’s number, 6.02214076 × 10²³.

6.02214076 × 10²³ per mole. Since 2019 it’s an exact, defined value.

It’s the sum of the atomic weights of all the atoms in the formula. This calculator works it out for you.

Yes. Type CuSO4·5H2O or CuSO4*5H2O.

Use e-notation or a power of ten, such as 3.2e22 or 3.2 × 10^22.

No. A mole of O₂ molecules contains two moles of oxygen atoms.

Books often round atomic weights or use fewer significant figures. Round this answer the same way.

Yes. Save each set by name in this browser.

Yes. Use Compare: keep as A.

Yes. Use Share link or Print.

References & Sources

SourceUsed ForLink
OpenStax Chemistry 2e, 3.1 Formula Mass and the Mole Concept The mole, Avogadro’s number and converting between mass, moles and particles, with worked examples. https://openstax.org/books/chemistry-2e/pages/3-1-formula-mass-and-the-mole-concept
NIST CODATA 2022, Avogadro constant Nₐ = 6.022 140 76 × 10²³ per mole, exact. https://physics.nist.gov/cgi-bin/cuu/Value?na
Wikipedia, List of chemical elements Standard atomic weights used here, from IUPAC. https://en.wikipedia.org/wiki/List_of_chemical_elements

Cite or share this calculator

DigitalCalculators.net. (2026, December 4). Grams to Moles Calculator. https://digitalcalculators.net/grams-to-moles-calculator/