Mole Calculator (Grams ↔ Moles ↔ Particles)

Enter a mass, a number of moles or a number of particles, plus the substance's formula or molar mass. Get the other two amounts with the steps shown.

For example NaCl, C6H12O6, Ca(OH)2 or CuSO4·5H2O.

Your results

Moles—
Mass—
Moles—
Particles (molecules or formula units)—
Total atoms—
Molar mass used—

How grams, moles and particles connect

Chemists count atoms and molecules in moles because real samples contain unimaginably many of them. One mole is 6.02214076 × 10²³ particles, a number called Avogadro's number (NA). Molar mass tells you how many grams one mole weighs, so it converts between the mass you weigh out and the number of moles. Avogadro's number converts between moles and individual particles.

A handy way to picture it is a line with moles in the middle: grams on one side, particles on the other. You always pass through moles to go from grams to particles.

The formula

moles = mass (g) ÷ molar mass (g/mol)
mass (g) = moles × molar mass
particles = moles × 6.02214076 × 10²³
atoms = particles × atoms per formula

Example: 25 g of water

Water, H2O, has a molar mass of 2 × 1.008 + 15.999 = 18.015 g/mol and 3 atoms per molecule.

StepResult
Moles: 25 g ÷ 18.015 g/mol1.388 mol
Molecules: 1.388 mol × 6.022 × 10²³8.357 × 10²³
Atoms: 8.357 × 10²³ × 32.507 × 10²⁴

The calculator keeps full precision between steps and rounds only the displayed answers to four significant figures, so your hand calculation may differ in the last digit if you round along the way.

Quick reference

SubstanceMolar mass1 mole weighs1 gram is
Water, H2O18.015 g/mol18.015 g0.05551 mol
Sodium chloride, NaCl58.44 g/mol58.44 g0.01711 mol
Carbon dioxide, CO244.009 g/mol44.009 g0.02272 mol
Glucose, C6H12O6180.156 g/mol180.156 g0.005551 mol

Tips and common mistakes

  • Check your units cancel. g ÷ (g/mol) = mol. If the units don't cancel, you multiplied when you should have divided.
  • Convert mg and kg first. Molar mass is in grams per mole, so 250 mg must become 0.250 g before dividing.
  • Molecules are not atoms. One mole of O2 has 6.022 × 10²³ molecules but twice as many oxygen atoms.
  • Typing big numbers. Enter 6.022 × 10²³ as 6.022e23 in the particles box.
  • Significant figures. Round your final answer to match the least precise measurement, usually the mass you weighed.

Frequently asked questions

How do I convert grams to moles?

Divide the mass in grams by the molar mass in g/mol. For 25 g of water (18.015 g/mol): 25 ÷ 18.015 = 1.388 mol. The grams cancel, leaving moles.

How do I convert moles to grams?

Multiply the number of moles by the molar mass. For 0.5 mol of NaCl (58.44 g/mol): 0.5 × 58.44 = 29.22 g.

What is Avogadro's number?

Avogadro's number is exactly 6.02214076 × 10²³ particles per mole. Since 2019 this value has been fixed by definition in the SI. Most classes round it to 6.022 × 10²³.

How do I find the number of atoms rather than molecules?

First find the number of molecules (moles × Avogadro's number), then multiply by the number of atoms in one molecule. One water molecule, H2O, has 3 atoms, so 1 mole of water contains about 1.807 × 10²⁴ atoms. This calculator shows the total atom count when you enter a formula.

What counts as a particle?

It depends on the substance. For molecular compounds like water or glucose, a particle is a molecule. For ionic compounds like NaCl, it is a formula unit. For an element like iron or helium, it is an atom. The math is the same in every case.

Rates and figures last checked October 2026.

This calculator gives estimates for planning. Check current rates and product labels before you buy, list or file.