molecalculator

Moles & Molar Mass

Mass to Atoms Calculator: Convert Grams to Atoms

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

Atoms of target element 6.022 × 1023 atoms
Amount of substance
1.000000 mol
= Sample mass ÷ Molar mass
Particles in sample
6.022 × 1023 particles
Result, rounded to a whole number
Sample mass
12.011 g
Set in the form below
You enter
Sample mass (g), Molar mass (g/mol), Atoms of target element per particle (atoms/particle)
You get
Atoms of target element (atoms), Amount of substance (mol), Particles in sample (particles)
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.

Convert a sample’s mass to atoms by dividing its mass by the substance’s molar mass, then multiplying the moles by Avogadro’s constant. Enter mass in grams and molar mass in grams per mole to get the number of atoms; for a compound, the result is initially the number of molecules or formula units, so multiply by the number of atoms of the element in each unit.

Formula

The calculation follows two steps: convert mass to moles, then convert moles to particles. To count atoms of a particular element, include how many of those atoms occur in each particle:

Natoms = (m / M) × NA × a

  • m is sample mass in grams (g).
  • M is molar mass in grams per mole (g/mol).
  • NA is Avogadro’s constant, exactly 6.02214076 × 1023 particles per mole.
  • a is the number of atoms of the target element in one particle, in atoms per particle.
  • Natoms is the resulting count of target-element atoms.

For a pure element such as carbon, a = 1: each particle counted is one carbon atom. For water, a hydrogen count uses a = 2 because each H2O molecule contains two hydrogen atoms; an oxygen count uses a = 1. The second output, amount of substance, is m/M. The third output reports particles, before multiplying by a.

Worked Example

Using the calculator’s default values, the sample is 12.011 g of carbon, its molar mass is 12.011 g/mol, and the target is carbon with one atom per particle.

  1. Find the amount: 12.011 g ÷ 12.011 g/mol = 1 mol.
  2. Convert moles to particles: 1 mol × 6.02214076 × 1023 particles/mol = 6.02214076 × 1023 particles.
  3. Count target atoms: 6.02214076 × 1023 particles × 1 atom/particle = 6.02214076 × 1023 carbon atoms.

Rounded to the calculator’s zero decimal places, the headline result is approximately 602,214,076,000,000,000,000,000 atoms. In scientific notation, that is 6.022 × 1023 atoms. The unrounded value is more useful for understanding the calculation; the displayed count is not a claim that a real sample can be counted atom by atom with that precision.

Assumptions

  • The sample is a single, known substance with the entered molar mass and composition.
  • Mass and molar mass use compatible units: grams and grams per mole.
  • The substance’s formula correctly gives the number of target-element atoms per particle.
  • Avogadro’s constant is exact; the practical precision of the answer is limited by the measured mass and chosen molar mass.

How to Choose the Molar Mass

For an element, use its atomic molar mass from a reliable periodic table. For a molecular or ionic substance, calculate the molar mass from its chemical formula by adding the atomic masses of all atoms in one molecule or formula unit. For example, water has two hydrogen atoms and one oxygen atom, so its molar mass is approximately 2(1.008) + 15.999 = 18.015 g/mol. If the sample is water and you want hydrogen atoms, set the atom-per-particle value to 2; for oxygen, use 1.

For a compound, “particles” means molecules when the substance is molecular, and formula units when it is an ionic solid. Ionic solids do not consist of separate molecules, but the formula unit still gives the correct mole ratio. If a sample is a mixture, solution, impure material, or substance with an uncertain composition, its total mass alone is not enough to determine an exact atom count. You also need the amount or mass fraction of the specific component.

When This Conversion Is Useful

Mass-to-atoms dimensional analysis connects a laboratory-scale mass measurement with the microscopic number of particles it represents. It is useful in introductory chemistry, stoichiometry, materials calculations, and checking whether a proposed atom count is consistent with a sample’s mass. The intermediate mole value is also useful: it lets you compare the sample with reaction coefficients or other quantities expressed in moles.

Keep the units visible to see why the conversion works:

g × (mol/g) × (particles/mol) = particles.

More explicitly, dividing grams by grams per mole cancels grams and leaves moles. Multiplying by particles per mole then cancels moles and leaves particles. For target atoms in a compound, multiplying by atoms per particle leaves atoms. This cancellation is a quick way to catch a reversed molar mass or a missing composition factor.

Common Mistakes and Limits

  • Using molar mass backwards: divide mass by molar mass to obtain moles. Multiplying by molar mass instead gives mass when starting from moles.
  • Confusing atoms with molecules: Avogadro’s constant converts moles into particles of the substance. It does not automatically count every atom inside a compound’s particles.
  • Forgetting the formula subscript: one mole of H2O contains two moles of hydrogen atoms and one mole of oxygen atoms. Set the atom-per-particle value for the element being counted.
  • Mixing units: if mass is entered in milligrams, convert it to grams first (1,000 mg = 1 g). A mass in kilograms must likewise be converted (1 kg = 1,000 g).
  • Reporting false precision: Avogadro’s constant is exact, but a measured mass and tabulated molar mass have finite precision. Round the final result to match the quality of the inputs.
  • Assuming a bulk sample is pure: impurities or a mixture change the mass attributable to the substance. Use only the mass of the component whose atoms you intend to count.

This is a particle-count calculation, not a way to identify a substance or measure its purity. It also does not account for isotope-specific composition unless the molar mass supplied reflects that composition. For ordinary chemical calculations, standard atomic weights are generally appropriate; specialized isotope work requires isotope-specific masses and abundances.

Frequently Asked Questions

How do you convert grams to atoms?
Divide grams by molar mass in g/mol to get moles, then multiply by 6.02214076 × 1023 particles per mole. For a compound, multiply by the number of atoms of the element you want in each particle.

Can I use this formula for a compound?
Yes. First use the compound’s molar mass to find moles of molecules or formula units. Then multiply by the number of target-element atoms in each molecule or formula unit.

How many atoms are in one mole?
One mole contains exactly 6.02214076 × 1023 specified entities. Those entities may be atoms, molecules, ions, or formula units; the entity depends on what substance or particle the mole represents.

What if my mass is in milligrams?
Convert milligrams to grams before using a molar mass in g/mol: divide the milligram value by 1,000. Alternatively, convert all quantities to a consistent set of units before calculating.

Why is the answer not always the number of atoms?
The mole conversion first gives the count of particles of the substance. A molecule can contain several atoms, so multiply the particle count by the number of atoms of the chosen element in each molecule to obtain that element’s atom count.

Related

Formula used
in m | Sample mass | g | 12.011 | 0
in mm | Molar mass | g/mol | 12.011 | 0
in a | Atoms of target element per particle | atoms/particle | 1 | 0
out n | Atoms of target element | atoms | (m / mm) * 6.02214076e23 * a | 0
out mol | Amount of substance | mol | m / mm | 6
out p | Particles in sample | particles | (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 →