Convert between grams, moles and the number of particles (molecules or atoms) of any substance just by typing its chemical formula.
For example H2O, NaCl or C6H12O6
You can type 6.022e23 for particles.
Enter the values to see the result here.
Formula
Grams, moles and particles are linked through the molar mass M and Avogadro’s constant NA:
n=MmN=n×NANA=6.02214076×1023mol−1
Worked example
How many molecules are in 36.03 g of water?
M(H2O)=18.015 g/mol.
Moles: 36.03/18.015=2.000 mol.
Molecules: 2.000×6.022×1023=1.204×1024.
Going the other way, 0.5 mol of NaCl has a mass of 0.5×58.44=29.22 g.
Common mistakes
Using the wrong formula, for example H2O2 instead of H2O. The molar mass doubles almost exactly.
Mixing up atoms and molecules when the question asks for atoms.
Typing the number of particles without the exponent: 6.022 and 6.022e23 are very different.
Forgetting to convert milligrams or kilograms to grams first.
Frequently asked questions
What is a mole?
A mole is exactly 6.02214076 × 10²³ particles of anything, a number called Avogadro's constant. It lets chemists count atoms by weighing: one mole of a substance has a mass in grams equal to its molar mass.
Are particles molecules or atoms?
It depends on the substance. For H2O the particle is a molecule, for NaCl a formula unit, and for an element such as Fe an atom. The tool simply divides by Avogadro's constant, so the count refers to one formula as you typed it.
How many atoms are in the sample, not molecules?
Multiply the number of particles by the number of atoms in the formula. One mole of H2O holds 6.022 × 10²³ molecules and three times that many atoms.