Calculating the number of molecules in a substance takes three pieces of information and two steps: you need the mass of your sample, the molar mass of the substance, and Avogadro’s number (6.02214076 × 10²³). Divide the sample mass by the molar mass to get moles, then multiply by Avogadro’s number to get molecules. The whole process rests on the mole, a unit that links the scale of individual molecules to masses you can weigh on a balance, and the math is straightforward once you see what each piece means.
The Two-Step Calculation
Every molecule count follows the same logic. First, convert the mass of your substance into moles. Second, convert moles into molecules. A mole is simply a specific count of particles, the same way a “dozen” means twelve. One mole of anything contains exactly 6.02214076 × 10²³ of those things, whether they are water molecules, oxygen atoms, or glucose units. That number is Avogadro’s number, and since 2019 it has been a fixed, exact value rather than an experimentally measured one.1Annalen der Physik. The Avogadro Constant for the Definition and Realization of the Mole
Here is the formula in plain terms:
- Step 1: Moles = mass of sample (in grams) ÷ molar mass of the substance (in grams per mole)
- Step 2: Number of molecules = moles × 6.022 × 10²³
That’s it. If you know those two operations, you can find the molecule count for any pure substance. The only variable that changes from one problem to the next is the molar mass, which depends on what the substance is made of.
Finding the Molar Mass
The molar mass tells you how many grams one mole of a substance weighs. For an element, you read it straight off the periodic table: carbon is about 12.01 g/mol, oxygen is about 16.00 g/mol, nitrogen is about 14.01 g/mol. For a compound, you add up the molar masses of every atom in its chemical formula.
Take water, H₂O. It has two hydrogen atoms (each about 1.008 g/mol) and one oxygen atom (about 16.00 g/mol). Add those together: 2(1.008) + 16.00 = 18.02 g/mol. That means 18.02 grams of water contains one mole of water molecules, which is 6.022 × 10²³ molecules.
For something larger like glucose (C₆H₁₂O₆), you do the same thing with more atoms: 6 carbons + 12 hydrogens + 6 oxygens = 6(12.01) + 12(1.008) + 6(16.00) = about 180.16 g/mol. A bigger molecule has a higher molar mass, which means the same mass of substance contains fewer molecules. A gram of glucose holds far fewer molecules than a gram of water because each glucose molecule is about ten times heavier than a water molecule.
The molar masses on a periodic table are averages that account for the natural mix of isotopes. Nitrogen, for instance, has a molar mass that reflects the natural ratio of nitrogen-14 to nitrogen-15 atoms, and that ratio can differ very slightly depending on the source of the sample.2IOPscience / Metrologia. Mass-spectrometric methods for determining isotopic composition and molar mass traceable to the SI, exemplified by improved values for nitrogen For everyday calculations, the standard values from the periodic table are more than precise enough. Isotopic variation only matters in specialized fields like geochemistry or nuclear science.
A Worked Example From Start to Finish
Suppose you have 50 grams of table salt, sodium chloride (NaCl). You want to know how many NaCl formula units are in that pile. (Technically, NaCl forms an ionic lattice rather than discrete molecules, so chemists call them “formula units,” but the calculation is identical.)
First, find the molar mass of NaCl. Sodium is about 22.99 g/mol and chlorine is about 35.45 g/mol. Together: 22.99 + 35.45 = 58.44 g/mol.
Next, convert grams to moles: 50 g ÷ 58.44 g/mol = 0.855 moles.
Finally, multiply by Avogadro’s number: 0.855 × 6.022 × 10²³ = about 5.15 × 10²³ formula units. That’s roughly 515 billion trillion sodium-chloride pairs in a handful of salt.
The logic scales in the same way regardless of the substance. For carbon dioxide (CO₂, molar mass about 44.01 g/mol), 100 grams gives you 100 ÷ 44.01 = 2.272 moles, which is 2.272 × 6.022 × 10²³ ≈ 1.37 × 10²⁴ molecules. For ethanol (C₂H₅OH, molar mass about 46.07 g/mol), 10 grams gives you 0.217 moles, or about 1.31 × 10²³ molecules.
When You Start With Something Other Than Mass
Not every problem hands you a mass in grams. Sometimes you start with a volume of gas, the concentration of a solution, or even a number of moles already specified. Each scenario just adds one preliminary step before the same moles-to-molecules conversion.
Gases at Standard Conditions
At standard temperature and pressure (0 °C and 1 atmosphere), one mole of any ideal gas occupies about 22.4 liters. If you know the volume of a gas under those conditions, divide by 22.4 to get moles, then multiply by Avogadro’s number. For example, 11.2 liters of oxygen gas at STP is 0.5 moles, which is about 3.01 × 10²³ molecules of O₂. If conditions are not standard, you’d use the ideal gas law (PV = nRT) to find moles first, but the concept is the same: get to moles, then multiply.
Solutions
If you have a 0.5 molar (0.5 M) solution and you take 2 liters of it, you have 0.5 × 2 = 1.0 mole of solute dissolved in that volume. Multiply by 6.022 × 10²³ and you have your molecule count. Molarity (moles per liter) is designed to make this conversion simple: moles = molarity × volume in liters.
Given a Number of Atoms Instead of Molecules
Sometimes a problem tells you a count of atoms and asks about molecules. If you have 1.2 × 10²⁴ atoms of hydrogen and those atoms are in H₂ molecules, divide by 2 to get the number of H₂ molecules: 6.0 × 10²³. The key is knowing how many atoms of each type sit inside each molecule, which the chemical formula tells you directly.
Common Mistakes That Throw Off the Answer
The math here is simple division and multiplication, but several errors trip people up repeatedly. Catching them in advance saves a lot of frustration.
- Using atomic mass instead of molecular mass: If the substance is O₂, the molar mass is about 32 g/mol (two oxygen atoms), not 16. The formula tells you how many atoms are bonded together. Forgetting to account for all the atoms in the molecule is probably the single most common mistake.
- Mixing up atoms and molecules: One mole of water contains 6.022 × 10²³ water molecules, but it contains three times as many individual atoms (two hydrogens plus one oxygen per molecule). The question usually asks for molecules, so make sure you are not accidentally reporting the atom count.
- Forgetting unit conversions: The molar mass is in grams per mole. If your sample mass is given in milligrams or kilograms, convert to grams first. A 500 mg aspirin tablet is 0.5 g, not 500 g, and that factor-of-a-thousand error will produce a wildly wrong molecule count.
- Rounding Avogadro’s number too aggressively: For most purposes, 6.022 × 10²³ is plenty precise. But rounding it to 6 × 10²³ introduces a small error that compounds if you are doing multiple steps. Use at least three significant figures unless the problem calls for a rough estimate.
- Treating ionic compounds as molecules: Table salt, as mentioned earlier, does not exist as individual NaCl molecules. You can still calculate “formula units” using the exact same method, and many problems use the word “molecules” loosely to mean particles. Just know that the terminology is slightly different for ionic solids.
Why Avogadro’s Number Is What It Is
The value 6.022 × 10²³ is not arbitrary. Historically, the mole was defined as the number of atoms in exactly 12 grams of carbon-12. That definition tied the mole to a physical artifact: ultimately, to the international prototype kilogram, a platinum-iridium cylinder stored in France. In 2019, the international system of units was revised so that Avogadro’s number became a fixed constant, 6.02214076 × 10²³ exactly, untethered from any physical object.1Annalen der Physik. The Avogadro Constant for the Definition and Realization of the Mole
Pinning down the number to that level of precision required extraordinary experiments. One approach involved crafting near-perfect spheres of silicon-28 and counting the atoms by measuring the crystal lattice spacing and the sphere’s volume. This yielded a value of 6.02214078 × 10²³ per mole, with an uncertainty of just 18 in the last two digits.3PubMed. Determination of the Avogadro constant by counting the atoms in a 28Si crystal That remarkable precision helped justify fixing the constant outright.
The deeper history stretches back more than a century. In 1905, Albert Einstein published theoretical work predicting how particles suspended in a fluid should jitter around, and in 1908 Jean Perrin confirmed those predictions experimentally, providing one of the first credible estimates of how many molecules are in a given quantity of matter.4Physics Education. Demonstrating Brownian motion and estimating Avogadro’s number using simple tools: a practical guide for students Perrin’s early values were rough compared to today’s standards, but they proved the concept: atoms and molecules are real, countable things, and a bridge between the macroscopic and molecular worlds could be built with careful measurement.
Counting Molecules Without Avogadro’s Number
The mole-based calculation described above is the standard approach for bulk samples, where you weigh something and convert. But there are contexts where scientists need to count molecules more directly, often at very small scales where the bulk method is impractical.
Fluorescence microscopy, for instance, can detect and count individual molecules adsorbed onto a surface. By tagging molecules with fluorescent labels and imaging the surface, researchers apply spatial criteria to identify and tally single molecules one at a time.5PubMed. Quantitative detection of single molecules in fluorescence microscopy images This is genuinely counting, not calculating from mass, and it is used in applications like biosensing and diagnostics where you might care about whether five or fifty molecules of a target are present on a chip.
In biology, counting molecules at the single-cell level has become a productive area of research. Techniques now exist to count individual messenger RNA molecules inside a single cell or to watch single proteins being made in real time.6Trends in Cell Biology. Quantifying single-cell gene expression These methods are far removed from the mass-and-molar-mass approach of a chemistry problem set, but they address the same fundamental question: how many molecules are here?
For proteins and other large biological molecules, figuring out the molar mass is itself a challenge, because you cannot simply add up atoms from a formula the way you can with water or glucose. Techniques like matrix-assisted laser desorption mass spectrometry can determine protein masses with an accuracy of roughly 0.01%, using sample sizes as small as one picomole.7PubMed. High-accuracy molecular mass determination of proteins using matrix-assisted laser desorption mass spectrometry Once you know the molar mass of a protein, you can apply the same moles-to-molecules conversion as with any other substance. The hard part is just getting that molar mass right.
Polymers and Mixtures Add a Layer of Complexity
The straightforward calculation works cleanly for pure substances with a single, well-defined molecular formula. Things get messier with polymers and mixtures, where the molecules are not all the same size.
A polymer like polyvinyl chloride (PVC) does not have a single molecular weight. Instead, a sample contains chains of varying length, and chemists describe its molecular weight as an average. There are different kinds of averages for this purpose, and they can be estimated from physical measurements like the viscosity of the polymer in solution.8Journal of Applied Polymer Science. Calculation of number‐average and weight‐average molecular weight of poly(vinyl chloride) polymers from intrinsic viscosity measurements The number-average molecular weight, for instance, gives you the average mass per polymer chain. If you divide your sample mass by that average and then multiply by Avogadro’s number, you get an approximate count of polymer chains. It is approximate because the chains are not all identical, but the method gives a useful estimate.
Mixtures present a similar issue. If you dissolve sugar and salt in water, there is no single molar mass for the mixture as a whole. You would need to know the mass and identity of each component, calculate the molecule count for each one separately, and add them up. In practice, this is only feasible when you know the composition of the mixture, either from the recipe or from chemical analysis.
For most real-world chemistry and biology, though, you are working with a known substance or a known solution concentration, and the two-step calculation handles things cleanly. The complications matter mainly in materials science and analytical chemistry, where the substances under study are inherently heterogeneous.
How Many Molecules Are in Everyday Amounts
Putting some familiar numbers through the calculation helps build intuition for just how large Avogadro’s number really is.
A single glass of water, about 250 mL, weighs roughly 250 grams. Dividing by the molar mass of water (18.02 g/mol) gives about 13.9 moles. Multiply by 6.022 × 10²³ and you get roughly 8.4 × 10²⁴ water molecules, over eight trillion trillion, in one glass. That number dwarfs most quantities people encounter in daily life. There are more molecules of water in a glass than there are estimated stars in the observable universe.
A 325 mg aspirin tablet (acetylsalicylic acid, C₉H₈O₄, molar mass about 180.16 g/mol) contains 0.325 ÷ 180.16 ≈ 0.0018 moles, which is about 1.09 × 10²¹ molecules. Even a tiny pill holds over a sextillion molecules of the active ingredient.
A single breath of air at room conditions is about 0.5 liters. At roughly standard pressure and body temperature, that is approximately 0.02 moles of gas (a mix of nitrogen, oxygen, and traces of other gases), which amounts to about 1.2 × 10²² molecules entering your lungs with each breath. The sheer size of these numbers is why chemists invented the mole in the first place: working with individual molecule counts for bulk samples would mean writing out numbers with two dozen digits every time.
If the numbers still feel abstract, consider it this way: if you could count one molecule per second, counting all the molecules in a single drop of water (about 0.05 mL, containing roughly 1.67 × 10²¹ molecules) would take more than 50 trillion years. That is thousands of times longer than the current age of the universe. The mole bridges this absurd gap between human-scale measurements and molecular reality, and the two-step calculation is how you walk across that bridge whenever you need to.