Molecule Count Calculator Formula

Understand the math behind the molecule count calculator. Each variable explained with a worked example.

Formulas Used

Number of Molecules

num_molecules = (mass_grams / molar_mass) * 6.022e23

Moles

moles = mass_grams / molar_mass

Variables

VariableDescriptionDefault
mass_gramsMass of Compound(g)18
molar_massMolar Mass(g/mol)18.015

How It Works

How to Count Molecules

Formula

N = (mass / molar mass) × 6.022 × 10^23

Worked Example

How many molecules in 18 g of water?

mass_grams = 18molar_mass = 18.015
  1. 01Moles = 18 / 18.015 = 0.999 mol
  2. 02Molecules = 0.999 × 6.022 × 10^23 ~ 6.02 × 10^23

Frequently Asked Questions

What is the difference between atoms and molecules?

Atoms are individual elements; molecules are two or more atoms bonded together. H2O is a molecule with 3 atoms.

How do I find total atoms from molecule count?

Multiply the number of molecules by the number of atoms per molecule.

Does this work for ionic compounds?

Ionic compounds form formula units, not molecules. The math is the same but the result is formula units.

Ready to run the numbers?

Open Molecule Count Calculator