To convert grams to moles, divide the mass in grams by the molar mass (g/mol). To convert moles to molecules, multiply the number of moles by Avogadro’s constant, 6.022 × 1023 molecules per mole. This two-step conversion is the standard way to move from a weighed sample of a substance to the number of individual particles it contains.
Formula
The conversion uses two linked formulas. First, moles from mass:
n = m / M
- n = amount of substance, in moles (mol)
- m = mass of the sample, in grams (g)
- M = molar mass, in grams per mole (g/mol)
Then, molecules from moles:
N = n × NA
- N = number of molecules (or formula units, atoms, ions)
- NA = Avogadro’s constant = 6.02214076 × 1023 mol−1
Combined, the full conversion is N = (m / M) × NA. The calculator above uses the same mass and molar mass inputs to compute molarity of a solution; the grams-to-moles step is identical (m / mm), and the volume input converts mL to L by dividing by 1000.
Worked Example
Take the default values: 2.922 g of sodium chloride (NaCl), molar mass 58.44 g/mol, dissolved in 250 mL of water.
Step 1 – Convert grams to moles:
n = 2.922 g / 58.44 g/mol = 0.05000 mol (exactly 0.05 mol)
Step 2 – Convert moles to molecules:
N = 0.05000 mol × 6.02214076 × 1023 mol−1 = 3.011 × 1022 molecules
That is about 30.1 sextillion NaCl formula units in the sample. Note that NaCl is an ionic compound, so the “molecules” are properly called formula units – one Na+ and one Cl− ion pair.
Step 3 – Molarity (what the calculator shows):
Molarity = 0.05000 mol / (250 mL / 1000) = 0.05000 mol / 0.250 L = 0.2000 mol/L (0.2000 M)
In millimolar: 0.2000 M × 1000 = 200.0 mM.
The calculator’s first output (0.2000 mol/L) matches this exactly.
Assumptions
- The molar mass is the standard atomic-weight sum for the compound as written (IUPAC abridged values).
- The sample is pure – no water, impurities, or other substances contribute to the mass.
- For molarity, the volume is the final solution volume after dissolving, not the volume of solvent added.
- The conversion assumes complete dissolution; it does not account for hydration or ion pairing.
Why This Conversion Matters
Chemists cannot count individual molecules on a balance. A gram of water contains roughly 3.34 × 1022 molecules – far too many to count directly. The mole bridges the macroscopic world (grams, litres) and the microscopic world (molecules, atoms, ions). One mole of any substance always contains the same number of particles, 6.022 × 1023, regardless of what the substance is. That fixed number lets you convert mass to particle count for any pure compound, as long as you know its molar mass.
This conversion is the backbone of stoichiometry. Balanced chemical equations give mole ratios, not gram ratios. If a reaction requires 2 moles of A for every 1 mole of B, you need to know how many moles you actually have in a given mass. Grams-to-moles is also the first step in preparing solutions of known concentration (molarity), as shown in the calculator above.
How to Find the Molar Mass
Molar mass is the mass of one mole of a substance, expressed in g/mol. For an element, it is numerically equal to its atomic weight from the periodic table. For a compound, add the atomic weights of all atoms in the formula.
Example – water, H2O:
- Hydrogen: 1.008 g/mol × 2 = 2.016 g/mol
- Oxygen: 15.999 g/mol × 1 = 15.999 g/mol
- Total = 18.015 g/mol
So 18.015 g of water is exactly 1 mole, containing 6.022 × 1023 water molecules. For hydrated salts (like CuSO4·5H2O), include the water molecules in the formula mass. For ionic compounds like NaCl, use the formula unit mass (22.990 + 35.45 = 58.44 g/mol).
Common Mistakes and How to Avoid Them
- Unit mix-ups: Molar mass must be in g/mol, not g or mg. If you have mass in milligrams, convert to grams first (divide by 1000) before dividing by molar mass.
- Using the wrong Avogadro constant: The value is 6.022 × 1023, not 6.022 × 1022 or 6.022 × 1024. A factor-of-ten error changes your answer by an order of magnitude.
- Rounding too early: Round only at the final step. If you round 58.44 to 58, you introduce about a 0.75% error. For most lab work, that is acceptable, but for precise stoichiometry, keep at least four significant figures.
- Confusing molecules with atoms: A molecule of CO2 contains 3 atoms (1 C + 2 O). If you need the number of atoms, multiply the number of molecules by the number of atoms per molecule.
- Forgetting the volume conversion in molarity: Molarity uses litres, not millilitres. Always divide mL by 1000.
When to Use Grams-to-Moles vs. Moles-to-Molecules
Use grams-to-moles whenever you have a weighed sample and need to know how much substance (in moles) you have for a reaction or solution. Use moles-to-molecules when you need the actual particle count – for example, to calculate the number of water molecules in a drop, or to compare the number of ions in different solutions.
The two steps are often combined. For instance, to find how many molecules are in 5.00 g of glucose (C6H12O6, molar mass 180.156 g/mol):
- Moles = 5.00 g / 180.156 g/mol = 0.02775 mol
- Molecules = 0.02775 mol × 6.022 × 1023 = 1.67 × 1022 molecules
This is a standard calculation in introductory chemistry, biochemistry (e.g., number of ATP molecules from a glucose mass), and molecular biology (e.g., copy number from DNA mass).
Frequently Asked Questions
How many molecules are in 1 gram of water?
Water has a molar mass of 18.015 g/mol. Moles = 1 g / 18.015 g/mol = 0.05551 mol. Molecules = 0.05551 × 6.022 × 1023 = 3.34 × 1022 molecules. That is about 33.4 sextillion water molecules in a single gram.
Why is Avogadro’s number 6.022 × 1023?
Avogadro’s constant is defined as the number of atoms in exactly 12 grams of carbon-12. That number was experimentally determined to be about 6.02214076 × 1023. It is now an exact defined constant (since 2019), and the mole is defined as the amount of substance containing that many elementary entities.
Can I convert grams directly to molecules without going through moles?
Yes, you can combine the two steps into one: molecules = (mass / molar mass) × Avogadro’s number. But conceptually, you are still doing the two-step conversion – the mole is the intermediate unit. There is no shortcut that skips the molar mass.
What is the difference between molecules and formula units?
Molecules refer to discrete covalently bonded groups, like H2O or CO2. Formula units are the simplest ratio of ions in an ionic compound, like NaCl or MgCl2. In calculations, the conversion is the same – one mole of NaCl contains 6.022 × 1023 formula units, not individual NaCl molecules, because NaCl does not exist as discrete molecules.
Does the conversion work for atoms and ions too?
Yes. The same method applies to atoms (e.g., grams of iron to atoms of Fe) and ions (e.g., grams of chloride to Cl− ions). Just use the appropriate molar mass – for ions, it is essentially the same as the atom or molecule, with a negligible electron mass difference. For example, 35.45 g of Cl− contains 6.022 × 1023 chloride ions.
What if I have a gas – does the conversion change?
No, the grams-to-moles conversion is the same for gases, liquids, and solids. However, if you have a gas at standard temperature and pressure (STP, 0 °C and 1 atm), you can also use the molar volume: 1 mole of an ideal gas occupies 22.414 L. That gives another route from volume to moles, but the mass-based route is identical.
Related
Formula used
in m | Mass of solute | g | 2.922 | 0 in mm | Molar mass | g/mol | 58.44 | 0.001 in v | Final solution volume | mL | 250 | 0.001 out c | Molarity | mol/L | m / mm / (v / 1000) | 4 out cmm | Concentration in millimolar | mM | c * 1000 | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- ug to ppb Calculator: Convert Micrograms per Liter1.00 ppb
- Grams to Moles Chemistry: How to Convert0.2000 mol/L
- Convert ug/l to ppb Calculator
- CPP Calculator Ontario: How CPP Is Calculated162.12 $/month
- Organic Chemistry Reaction Calculator: How It Works
- Uh to H Conversion: What It Means & How to Use It1.000 × 10−5 H