molecalculator

Moles & Molar Mass

Total Number of Atoms Calculator and How to Use It

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

Total number of atoms 1.805 × 1024 atoms
Amount of substance
0.999167 mol
= Sample mass ÷ Molar mass
Number of molecules or formula units
6.017 × 1023 entities
Result, rounded to a whole number
Sample mass
18 g
Set in the form below
You enter
Sample mass (g), Molar mass (g/mol), Atoms per molecule or formula unit (atoms)
You get
Total number of atoms (atoms), Amount of substance (mol), Number of molecules or formula units (entities)
Rounding
0 dp · 6 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.

This calculator finds the total number of atoms in a sample from its mass and the substance’s molar mass, or from a known number of molecules and the atoms in each molecule. Enter the values you know to get an atom count; the result is an estimate when the sample mass or molar mass is approximate.

Formula

For a sample with a known mass, first calculate the amount in moles, then convert moles to molecules or formula units using Avogadro’s constant, and multiply by the number of atoms in each entity:

Natoms = (m / M) × NA × a

  • Natoms is the total number of atoms in the sample.
  • m is the sample mass in grams (g).
  • M is the molar mass in grams per mole (g/mol).
  • NA is Avogadro’s constant, exactly 6.02214076 × 1023 entities per mole.
  • a is the number of atoms in one molecule or formula unit.

The formula uses grams divided by grams per mole to get moles. Multiplying by Avogadro’s constant gives the number of entities, and multiplying by a gives the number of atoms. The calculator’s first result is the total atom count. Its other results show the amount in moles and the number of molecules or formula units.

Worked Example

For the default values, the sample is 18 g of water. Water has a molar mass of 18.015 g/mol and three atoms in each molecule: two hydrogen atoms and one oxygen atom.

  1. Calculate moles: 18 g ÷ 18.015 g/mol = 0.99917 mol (approximately).
  2. Calculate the number of water molecules: 0.99917 mol × 6.02214076 × 1023 molecules/mol ≈ 6.0171 × 1023 molecules.
  3. Multiply by three atoms per molecule: 6.0171 × 1023 × 3 ≈ 1.8051 × 1024 atoms.

The calculator displays the total as a whole-number atom count, approximately 1.805 × 1024 atoms. A fractional value before rounding is a mathematical estimate, not a claim that a sample contains a fraction of an atom.

Assumptions

  • The substance is identified correctly and is sufficiently pure for the entered molar mass to represent the sample.
  • The sample’s mass and molar mass use the same substance and compatible units; mass is entered in grams and molar mass in grams per mole.
  • The entered atom count applies to one molecule or formula unit. The sample is treated as having a defined chemical composition.
  • Avogadro’s constant is exact; uncertainty mainly comes from measured mass, purity, composition and rounded molar mass.

What You’ll Need

  • The sample’s mass, if calculating from mass.
  • The substance’s chemical formula, so you can find its molar mass and count its atoms per molecule or formula unit.
  • A reliable periodic table or reference for atomic weights, plus a calculator if you want to check the arithmetic independently.

Step-by-Step

  1. Identify the substance. Write down its chemical formula and determine whether it is a molecular substance, such as H2O, or an ionic solid described by a formula unit, such as NaCl. This distinction tells you what one entity means in the calculation.
  2. Count atoms in one entity. Add the subscripts in the formula, remembering that a missing subscript means one. For H2O, count 2 hydrogen + 1 oxygen = 3 atoms. For Ca(OH)2, the parentheses mean there are two O atoms and two H atoms, plus one Ca atom: 5 total. If the formula has a coefficient, such as 2H2O, that coefficient describes two molecules; do not include it when finding atoms in one molecule.
  3. Find the molar mass. Add the atomic masses for each atom in the formula, multiplying each element’s atomic weight by its subscript. For water, using H = 1.008 and O = 15.999 g/mol per mole of atoms gives 2(1.008) + 15.999 = 18.015 g/mol. For compounds with parentheses, apply the multiplier to every atom inside them.
  4. Enter the sample mass and molar mass. The calculator expects mass in grams and molar mass in g/mol. Convert other units before entering them: 1 kg = 1000 g and 1 mg = 0.001 g. Do not enter a volume as a mass; volume requires a density to convert it to mass.
  5. Enter atoms per entity. Use the count from the formula, not the number of elements present. Water contains two kinds of elements but three atoms per molecule. For an element that exists as single atoms, such as helium, use 1 atom per entity.
  6. Read the total atom count. The calculator converts mass to moles, moles to entities, and entities to atoms. Because counts can be extremely large, the answer may be displayed in scientific notation. For example, 1.8 × 1024 means 1.8 followed by 24 powers of ten, not 1.8 atoms.
  7. Check that the result is plausible. The atom total should be the molecule or formula-unit count multiplied by the atoms in one entity. If your calculation starts with a known number of molecules instead of mass, multiply that count directly by atoms per molecule; do not apply the mass-to-moles steps again.

Common Mistakes

  • Mixing units: Dividing milligrams by a molar mass in g/mol without converting milligrams to grams makes the result 1000 times too small. Convert mass first.
  • Counting elements instead of atoms: H2O has two elements but three atoms. Count subscripts, including those implied by parentheses.
  • Using the wrong entity count: Ionic compounds are counted in formula units, not separate molecules. The atom-count multiplication still works when the formula-unit composition is used.
  • Forgetting a coefficient or applying it twice: A coefficient describes how many entities are present in a chemical equation. It is not part of the atom count in one formula unit unless the problem asks for multiple units.
  • Rounding too early: Keep extra digits through the calculation, then round the final result to match the precision of the measured mass and molar mass.
  • Using a volume as though it were a mass: A liquid volume alone does not determine the number of atoms. You also need an appropriate density and must account for concentration or purity where relevant.

Tips

  • Write the formula with all parentheses expanded before counting atoms. This makes polyatomic groups and hydrates easier to check.
  • For a pure element, use its molar mass and the correct entity. Some elements are commonly molecular: oxygen gas is O2, so it has two atoms per molecule; a sample of monatomic helium has one atom per entity.
  • For a mixture, calculate each substance separately and add the atom counts. A single molar mass is not generally meaningful for a mixture with changing composition.
  • Keep “entities” distinct from atoms. One molecule may contain several atoms, while one atom of an element is itself one entity.

Troubleshooting

The answer is 1000 times off: Check whether the mass was entered in grams. Convert kilograms, milligrams or micrograms to grams before using a molar mass in g/mol.

The result seems too large or too small: Check the exponent in scientific notation and verify that you multiplied by Avogadro’s constant once. Then check whether the formula’s atom count was entered correctly.

You do not know the molar mass: Add the atomic weights from the chemical formula using a periodic table. If the substance is a mixture, has variable composition, or has uncertain purity, a single exact molar mass may not be appropriate.

You only know volume or concentration: For a pure liquid, volume can be converted to mass only with a suitable density. For a solution, use the amount of the specific dissolved substance, based on its concentration and the solution volume; do not count all solution atoms as though they belonged to the solute.

The result is not an integer: That is expected from rounded measurements and molar masses. Report a suitably rounded estimate rather than treating the displayed decimal as a literal fraction of an atom.

Frequently Asked Questions

How do I calculate the total number of atoms from grams?
Divide the mass in grams by molar mass in g/mol, multiply by 6.02214076 × 1023 entities per mole, then multiply by atoms per molecule or formula unit.

How do I find atoms from a number of molecules?
Multiply the number of molecules by the total number of atoms in one molecule. For example, each CO2 molecule has three atoms.

Does the formula work for ionic compounds?
Yes. Use the molar mass and atom count in one formula unit. For NaCl, one formula unit contains one sodium atom and one chlorine atom, or two atoms total.

How many atoms are in one mole?
One mole contains exactly 6.02214076 × 1023 specified entities. The number of atoms depends on how many atoms are in each entity.

Can I calculate the atom count from a liquid’s volume?
Not from volume alone. You need density to find the mass of a pure liquid, or concentration and volume to find the amount of a particular solute in a solution.

Why is my answer approximate?
Mass measurements, purity and many reported molar masses have limited precision. Avogadro’s constant is exact, but the inputs can make the calculated atom count an estimate.

Related

Formula used
in m | Sample mass | g | 18 | 0
in mm | Molar mass | g/mol | 18.015 | 0.001
in a | Atoms per molecule or formula unit | atoms | 3 | 1
out n | Total number of atoms | atoms | (m / mm) * 6.02214076e23 * a | 0
out mol | Amount of substance | mol | m / mm | 6
out molc | Number of molecules or formula units | entities | (m / mm) * 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 →