Grams to Moles Calculator

Grams to Moles Calculator

Enter the values below to calculate your chemistry result.

Result-

What Is a Mole in Chemistry?

A mole (mol) is the SI base unit for the amount of substance. One mole contains exactly 6.022 × 10²³ elementary entities, whether atoms, molecules, or ions. This fixed number is called Avogadro's constant (NA).

Think of it like a "dozen," but astronomically larger. A dozen always means 12 objects; a mole always means 6.022 × 10²³ objects. What changes between substances is the mass of that mole, and that's what molar mass tells you.

This concept bridges two worlds: the microscopic scale of atoms and the macroscopic world of grams you can measure on a laboratory balance. Without the mole, stoichiometry, solution preparation, and chemical equation balancing would be impossible to do practically.

Mole concept diagram showing particles around a mole symbol
Fig. 1. One mole of any substance always contains 6.022 × 10²³ particles: atoms, molecules, or ions depending on the substance.

Key fact: The mole was defined so that one mole of carbon-12 atoms weighs exactly 12 grams. This is why atomic mass units and molar mass are numerically equal.

The Grams to Moles Formula (n = m ÷ M)

The relationship between mass, moles, and molar mass is expressed in one equation, the foundation of every stoichiometry calculation in chemistry:

Primary Formula — Grams to Molesn = m ÷ Mn = moles (mol) | m = mass (g) | M = molar mass (g/mol)

Rearranging gives you the complete set of three formulas:

FindFormulaWhen to Use
Moles (n)n = m ÷ MYou have mass, want moles
Mass in grams (m)m = n × MYou have moles, want mass
Molar mass (M)M = m ÷ nYou have both mass and moles
Mole triangle showing mass, moles, and molar mass formulas
Fig. 2. The mole formula triangle: cover the quantity you want to find, and the remaining two show the operation to use.

How to Convert Grams to Moles — Step by Step

1
Write the chemical formula of your substance. For example: water = H₂O, sodium chloride = NaCl, glucose = C₆H₁₂O₆.
2
Calculate the molar mass (M) in g/mol. Look up each element's atomic mass on a periodic table, multiply by its subscript in the formula, then add all values together.
3
Confirm your mass is in grams. Convert kg to g by multiplying by 1,000. Convert mg to g by dividing by 1,000.
4
Apply the formula n = m ÷ M. Divide mass in grams by molar mass in g/mol. Your answer is in moles.
5
Apply correct significant figures. Round your final answer to match the precision of your least precise measurement.

Worked Examples: Grams to Moles (and Back)

Follow these complete solutions to understand the method, not just the answer.

Example 1 Grams → Moles | Water (H₂O)

How many moles are in 36 g of water?

→ Molar mass of H₂O = 2(1.008) + 15.999 = 18.015 g/mol

→ n = 36 ÷ 18.015

✓ Answer: 2.00 mol of water
Example 2 Moles → Grams | Sodium Chloride (NaCl)

What is the mass of 0.5 mol of NaCl?

→ Molar mass of NaCl = 22.99 + 35.45 = 58.44 g/mol

→ m = 0.5 × 58.44

✓ Answer: 29.22 g of sodium chloride
Example 3 Unit Conversion First | Glucose (C₆H₁₂O₆)

How many moles are in 1 kg of glucose?

→ Convert: 1 kg = 1,000 g

→ Molar mass = 6(12.01) + 12(1.008) + 6(16.00) = 180.16 g/mol

→ n = 1000 ÷ 180.16

✓ Answer: 5.55 mol of glucose
Example 4 Find Molar Mass | Unknown Compound

A 180.16 g sample contains 2.0 mol of a compound. What is its molar mass?

→ M = m ÷ n = 180.16 ÷ 2.0

✓ Answer: Molar mass = 90.08 g/mol

Particle count from moles: Multiply moles by Avogadro's number: N = n × 6.022 × 10²³. For example, 2 mol of water = 1.204 × 10²⁴ molecules.

Molar Mass Reference Table for Common Substances

Quickly look up the molar mass of compounds commonly used in homework, lab prep, and stoichiometry problems.

SubstanceFormulaMolar Mass (g/mol)Bond Type
WaterH₂O18.015Covalent
Sodium chloride (table salt)NaCl58.44Ionic
Carbon dioxideCO₂44.01Covalent
Glucose (blood sugar)C₆H₁₂O₆180.16Covalent
AmmoniaNH₃17.03Covalent
Sulfuric acidH₂SO₄98.08Covalent
Calcium carbonateCaCO₃100.09Ionic
EthanolC₂H₅OH46.07Covalent
Sodium hydroxideNaOH40.00Ionic
Hydrochloric acidHCl36.46Covalent
Oxygen gasO₂32.00Elemental
CarbonC12.01Elemental

Common Mistakes Students Make (And How to Avoid Them)

Chemistry lab diagram showing balances, beakers, and the mole conversion formula
Fig. 3. In the lab, every gram reading on a balance must be converted to moles before it can be used in a stoichiometric equation.
X
Using atomic mass instead of molar mass for compounds. For NaCl use 58.44 g/mol, the sum of both atoms, not 23 g/mol for sodium alone.
X
Forgetting to count subscripts. H₂O has 2 hydrogen atoms. Each atom's atomic mass must be multiplied by its subscript before summing.
X
Not converting units first. If your mass is in kg or mg, convert it before calculating.
X
Rounding molar mass too early. Carry at least 3-4 decimal places through the calculation.
X
Confusing molar mass with molecular weight. Numerically equal, but molar mass is in g/mol while molecular weight is technically dimensionless.
X
Using "molecules" for ionic compounds. NaCl forms formula units, not molecules.

Why the Grams-to-Moles Conversion Matters in Real Chemistry

Stoichiometry and Balanced Equations

Balanced chemical equations express reactions in mole ratios, not gram ratios. Before calculating yield or weighing out a reactant, every mass must be converted to moles.

Preparing Solutions (Molarity)

When a protocol calls for a 0.1 M solution, that means 0.1 mol of solute per litre. To weigh the right amount, you convert those 0.1 moles into grams using m = n × M.

Pharmaceutical and Industrial Applications

Every active pharmaceutical ingredient is measured with molecular precision. Manufacturers convert a target mole count into grams to determine the mass per batch. The same logic governs fertiliser production, polymer chemistry, and environmental analysis.

Lab note: An error in this conversion doesn't just hurt your grade. In a real lab it can ruin an entire experiment. Always verify by working backwards.

Frequently Asked Questions

Click any question to expand the answer.

How do you convert grams to moles?

Divide the mass in grams by the molar mass in g/mol: n = m ÷ M. For example, 36 g of water ÷ 18.015 g/mol = 2.00 mol.

What is molar mass and how do I calculate it?

Molar mass is the mass of one mole of a substance. Calculate it by adding the atomic masses of every atom in the formula.

What is Avogadro's number and why does it matter?

Avogadro's number is 6.022 × 10²³ particles per mole. It connects measurable grams to particle counts.

Can moles be a decimal or fraction?

Yes. Moles often appear as decimals, such as 0.25 mol or 2.50 mol.

What is the difference between molar mass and molecular weight?

They are numerically similar for many chemistry problems, but molar mass uses g/mol while molecular weight is usually dimensionless.

How do I handle hydrated compounds like CuSO₄·5H₂O?

Include the water molecules in the molar mass. Add the mass of CuSO₄ plus five water molecules.

My mass is in milligrams. How do I use this calculator?

Convert milligrams to grams first by dividing by 1,000.

How many moles are in 100 g of water?

100 g ÷ 18.015 g/mol = 5.55 mol of water.

Key Takeaways

  • 1 mole = 6.022 × 10²³ particles.
  • Grams to moles: n = m ÷ M.
  • Moles to grams: m = n × M.
  • Molar mass is the sum of all atomic masses in the formula.
  • Always confirm mass is in grams before calculating.
  • This conversion is the foundation of every stoichiometry problem.