Calcamaze

Grams to Moles Calculator

Convert grams to moles, moles to grams, or either to molecules for any chemical formula, using its molar mass.

In grams, moles or particles, matching your choice above. Large counts can be typed as 6.022e23.

Result

Moles
1.99833 mol
Mass
36 g
Molecules / formula units
1.2034 × 10^24
Number of particles = moles × 6.02214076 × 10²³
Atoms in total
3.6103 × 10^24
Molar mass
18.015 g/mol

Convert between the mass of a substance in grams, the amount in moles and the number of molecules or formula units. Type the chemical formula — brackets and hydrates such as Ca(OH)₂ and CuSO₄·5H₂O work — and the calculator finds the molar mass from IUPAC standard atomic weights.

What is a mole?

A mole is a counting unit, like a dozen, but for particles: one mole is exactly 6.02214076 × 10²³ of them. Since the SI was redefined in 2019 this number, the Avogadro constant, is fixed by definition. It was chosen so that one mole of a substance has a mass in grams equal to its relative formula mass — one mole of carbon-12 atoms weighs 12 g, and one mole of water about 18 g.

That makes the mole the bridge between the mass you weigh on a balance and the number of particles that react. Chemical equations are written in moles: 2H₂ + O₂ → 2H₂O means two moles of hydrogen react with one mole of oxygen. To use the equation in a lab, you convert grams to moles with the molar mass, apply the mole ratio, and convert back to grams.

How to use the grams to moles calculator

  1. Type the chemical formula, using capital letters for each element symbol.
  2. Choose whether your amount is in grams, moles or particles.
  3. Enter the amount to see it in the other units.

Formula

moles = grams ÷ molar mass · particles = moles × Nₐ

The molar mass (g/mol) is the sum of the atomic weights of every atom in the formula. Dividing a mass by it gives moles; multiplying moles by it gives grams.

The Avogadro constant, Nₐ = 6.02214076 × 10²³ per mole, is exact. Multiplying moles by Nₐ gives the number of molecules (or formula units, for ionic compounds such as NaCl).

Worked examples

Grams of table salt to moles

Chemical formula
NaCl
Convert from
Grams (mass)
Amount
100
Moles
1.71116 mol
Mass
100 g
Molecules / formula units
1.0305 × 10^24

NaCl has a molar mass of 22.990 + 35.45 = 58.44 g/mol, so 100 g is 100 ÷ 58.44 = 1.7112 mol — about 1.03 × 10^24 formula units.

Moles of glucose to grams

Chemical formula
C6H12O6
Convert from
Moles
Amount
0.25
Mass
45.039 g
Moles
0.25 mol
Molecules / formula units
1.5055 × 10^23

Glucose, C₆H₁₂O₆, is 180.156 g/mol. A quarter of a mole is 0.25 × 180.156 = 45.039 g.

Counting molecules in a drop of water

Chemical formula
H2O
Convert from
Grams (mass)
Amount
0.05
Moles
0.00277546 mol
Mass
0.05 g
Molecules / formula units
1.6714 × 10^21

A 0.05 g drop of water is 0.05 ÷ 18.015 = 0.002775 mol, which multiplied by the Avogadro constant is 1.671 × 10^21 molecules.

Molar masses of common substances

SubstanceFormulaMolar mass (g/mol)Grams in 1 molMoles in 100 g
WaterH2O18.01518.0155.5509
Carbon dioxideCO244.00944.0092.2723
Sodium chlorideNaCl58.4458.441.7112
GlucoseC6H12O6180.156180.1560.5551
EthanolC2H5OH46.06946.0692.1707
Calcium carbonateCaCO3100.086100.0860.9991
Sulfuric acidH2SO498.07298.0721.0197
AmmoniaNH317.03117.0315.8716

Where you need it: finding the limiting reactant

Reactions happen mole by mole, so masses have to be converted before you can compare them. Burning 10 g of hydrogen with 64 g of oxygen: 10 g of H₂ is 4.96 mol and 64 g of O₂ is 2.00 mol. The equation 2H₂ + O₂ → 2H₂O needs 2.48 mol of O₂ for that much hydrogen, so oxygen runs out first. It is the limiting reactant, and the 2.00 mol of O₂ makes 4.00 mol of water, about 72.1 g.

Common mistakes

  • Multiplying by the molar mass when converting grams to moles. Grams ÷ molar mass gives moles; moles × molar mass gives grams.
  • Writing element symbols in the wrong case. CO is carbon monoxide, Co is cobalt — the calculator follows the capital letters exactly.
  • Forgetting the water in a hydrate. Copper sulfate pentahydrate, CuSO₄·5H₂O, weighs 249.7 g/mol, not the 159.6 g/mol of anhydrous CuSO₄.
  • Using a diatomic element as a single atom. Oxygen gas is O₂ (32.00 g/mol), not O (16.00 g/mol).

Frequently asked questions

How do I convert grams to moles?

Divide the mass by the molar mass. For water (18.015 g/mol), 36 g ÷ 18.015 g/mol = 1.998 mol.

How do I convert moles to grams?

Multiply moles by the molar mass. 0.5 mol of NaCl (58.44 g/mol) is 29.22 g.

What is the difference between molecules and formula units?

Covalent substances such as water exist as molecules. Ionic compounds such as NaCl form a lattice with no separate molecules, so one “formula unit” — one Na⁺ and one Cl⁻ — is counted instead. Either way, one mole contains 6.02214076 × 10²³ of them.

How many molecules are in a gram of water?

About 3.34 × 10²². One gram is 1 ÷ 18.015 = 0.0555 mol, and multiplying by the Avogadro constant gives the number of molecules.

Why can’t I convert grams to moles without a formula?

A mole is a count of particles, and particles of different substances weigh different amounts. A gram of hydrogen gas is about half a mole; a gram of gold is about a two-hundredth of one.

Sources

  1. Chemistry 2e, 3.1: Formula Mass and the Mole Concept, OpenStax, Rice University
  2. Avogadro constant (CODATA fundamental physical constants), National Institute of Standards and Technology (NIST)
  3. Standard Atomic Weights, IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW)

Last updated · Calculations checked by automated tests· Editorial policy