molecalculator

Moles & Molar Mass

Calculate Molecules from Grams: Formula and Example

Calculator No. 01-0238 · Updated · Formula and assumptions shown below

Amount of substance 0.9992 mol
Molecules
6.017 × 1023 molecules
Result, rounded to a whole number
Mass
18 g
Set in the form below
Molar mass
18.015 g/mol
Set in the form below
You enter
Mass (g), Molar mass (g/mol)
You get
Amount of substance (mol), Molecules (molecules)
Rounding
4 dp · 0 dp

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

Convert a substance’s mass in grams into a number of molecules by using its molar mass and Avogadro’s constant. Enter the mass and molar mass to get the molecule count, along with the intermediate amount in moles.

Formula

First divide mass by molar mass to find the amount in moles; then multiply the amount in moles by Avogadro’s constant to find the number of molecules:

n = m / M
N = n × NA = (m / M) × 6.02214076 × 1023

  • m is the sample mass in grams (g).
  • M is the substance’s molar mass in grams per mole (g/mol).
  • n is the amount of substance in moles (mol).
  • N is the calculated number of molecules.
  • NA is Avogadro’s constant, exactly 6.02214076 × 1023 entities per mole.

The calculator’s first output is the molecule count. It also displays the moles as a helpful intermediate value. The result is a calculated count, so it can be fractional in the mathematical output even though individual molecules are discrete.

Worked Example

Find the number of molecules in 18 g of water. The calculator’s default values are the mass 18 g and the molar mass 18.015 g/mol.

  1. Divide mass by molar mass: n = 18 g / 18.015 g/mol = 0.99917 mol (rounded).
  2. Multiply by Avogadro’s constant: N = 0.99917 mol × 6.02214076 × 1023 molecules/mol ≈ 6.0171 × 1023 molecules.

With the calculator’s four-decimal display for moles and zero-decimal display for molecules, the outputs are 0.9992 mol and 601,705,439,684,712,500,000,000 molecules, respectively (about 6.017 × 1023). The displayed molecule count is rounded to the nearest whole molecule; the underlying calculation uses the unrounded intermediate value.

Assumptions

  • The sample is treated as the stated pure substance, and its mass and molar mass are accurate.
  • The calculation counts molecules of a molecular substance. For ionic compounds, metals, or other substances that are not made of discrete molecules, interpret the result as formula units or particles as appropriate—not molecules.
  • The molar mass is in g/mol, matching the mass input in grams.

What You’ll Need

  • The sample’s mass, measured or supplied in grams. Convert other mass units to grams before entering them.
  • The correct molar mass in g/mol. Look it up from a reliable reference or calculate it from the chemical formula and standard atomic weights.
  • A calculator, or the calculator fields above.

Step-by-Step

  1. Identify the substance. Confirm its chemical formula and whether it consists of molecules. For example, water is H2O and is molecular; sodium chloride is an ionic compound, so its particles are formula units rather than molecules.
  2. Find the mass in grams. Use the mass of the sample itself, not the mass of its container. If the mass is in milligrams, divide by 1,000 to convert to grams. If it is in kilograms, multiply by 1,000.
  3. Find the molar mass. Add the atomic masses for every atom in the formula. For water, using H = 1.008 g/mol and O = 15.999 g/mol gives M = 2 × 1.008 + 15.999 = 18.015 g/mol. Keep enough digits during the calculation to avoid unnecessary rounding.
  4. Divide grams by grams per mole. Calculate n = m / M. The gram units cancel, leaving moles. For example, 18 g of water divided by 18.015 g/mol is about 0.99917 mol.
  5. Multiply moles by Avogadro’s constant. Calculate N = n × 6.02214076 × 1023. The mol units cancel, leaving a number of particles. Call them molecules only when that description fits the substance.
  6. Check the scale and report the result. Particle counts are usually very large, so scientific notation is easier to read. Include the substance, mass, molar mass, and whether the count is molecules, atoms, or formula units.

Common Mistakes

  • Using the wrong molar mass: A formula with subscripts needs the correct number of each atom. For example, CO2 contains two oxygen atoms, not one.
  • Mixing units: Dividing milligrams directly by g/mol makes the answer 1,000 times too small. Convert the mass to grams first, or convert the molar mass consistently.
  • Reversing the division: Use mass divided by molar mass to get moles. Molar mass divided by mass does not give the amount in moles.
  • Calling every particle a molecule: Ionic solids are described in formula units; an element such as helium is counted in atoms. Choose the correct particle name for the substance.
  • Rounding too early: Keep extra digits in the molar mass and mole calculation, then round the final count to a sensible number of significant figures.

Tips

  • Write the units beside each value. The unit cancellation makes it easier to see whether the calculation is set up correctly.
  • For a compound, calculate molar mass from the complete formula, including parentheses and subscripts. A hydrate’s attached water molecules must also be included when present.
  • Use scientific notation for very large counts. For instance, 6.022 × 1023 is clearer than writing all the zeroes.
  • For a mixture or a sample of uncertain purity, the calculation gives the amount implied by the mass and molar mass entered. It does not determine the sample’s actual composition or purity.

Troubleshooting

If the result is far larger or smaller than expected, check whether the mass was entered in grams, whether the molar mass is in g/mol, and whether the decimal point is correct. Confirm that the molar mass belongs to the exact formula and form of the substance. If a mass is given in milligrams, divide it by 1,000; if it is in kilograms, multiply by 1,000.

If the calculator rejects an entry, use a nonnegative mass and a positive molar mass. If it produces a mathematically valid number but the particle label seems wrong, report formula units or atoms instead of molecules where appropriate. If a substance is a mixture, solution, or impure material, a single mass and molar mass may not be enough; you need composition or purity information to calculate the amount of a particular component.

Frequently Asked Questions

What is the formula for converting grams to molecules?
Divide mass in grams by molar mass in g/mol, then multiply the moles by 6.02214076 × 1023 particles per mole.

Can I calculate molecules from grams without molar mass?
No. You need the substance’s identity or molar mass to convert a mass into moles before finding the particle count.

How do I find molar mass from a chemical formula?
Multiply each element’s atomic mass by its number of atoms in the formula, then add those contributions. Use a reliable atomic-weight reference and account for every subscript.

How do I convert milligrams to molecules?
Convert milligrams to grams by dividing by 1,000, then apply the usual grams-to-molecules formula with the correct molar mass.

Does this method work for atoms or ions?
Yes, the mole-to-particle calculation works the same way, but name the counted entities correctly. Depending on the substance, the result may be atoms, ions, or formula units rather than molecules.

Should I round the molecule count?
Keep full precision during the calculation and round the final answer to match the precision of the measured mass and molar mass. A rounded count is an estimate, not a claim that a fractional molecule exists.

Related

Formula used
in m | Mass | g | 18 | 0
in mm | Molar mass | g/mol | 18.015 | 0.001
out n | Amount of substance | mol | m / mm | 4
out molecules | Molecules | molecules | n * 6.02214076e23 | 0

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

The whole Moles & Molar Mass section →