molecalculator

Moles & Molar Mass

Atoms Formula: How to Calculate the Number of Atoms

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

Number of atoms 6.022 × 1023 atoms
Amount of substance
1.000000 mol
= Sample mass ÷ Molar mass
Sample mass
12.011 g
Set in the form below
Molar mass
12.011 g/mol
Set in the form below
You enter
Sample mass (g), Molar mass (g/mol)
You get
Number of atoms (atoms), Amount of substance (mol)
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 number of atoms in a pure element sample from its mass and molar mass. Enter the sample mass in grams and the element’s molar mass in grams per mole; the result is the atom count, with the amount in moles shown as a helper value.

Formula

For a pure element, divide the sample’s mass by its molar mass to find the amount in moles, then multiply by Avogadro’s constant to find the number of atoms:

N = (m / M) × NA

  • N is the number of atoms, a count with no physical unit.
  • m is the sample mass in grams (g).
  • M is the element’s molar mass in grams per mole (g/mol).
  • NA is Avogadro’s constant, exactly 6.02214076 × 1023 mol−1.

The calculator’s first output is N, the quantity asked for. Its second output is n = m / M, the amount of substance in moles. For an element, the numerical value of its molar mass in g/mol is based on its atomic weight; it is not the mass of one atom in grams.

Worked Example

The defaults describe 12.011 g of carbon with a molar mass of 12.011 g/mol.

  1. Find the amount: n = m / M = 12.011 g / (12.011 g/mol) = 1 mol.
  2. Multiply by Avogadro’s constant: N = 1 mol × 6.02214076 × 1023 atoms/mol = 6.02214076 × 1023 atoms.
  3. Rounded to the calculator’s zero decimal places, the displayed count is 602,214,076,000,000,000,000,000 atoms.

The count is enormous because a mole is a large counting unit. The unrounded value is exactly Avogadro’s constant for this one-mole example.

Assumptions

  • The sample is a pure element, so each counted particle is one atom of that element.
  • The entered mass and molar mass use the stated units and refer to the same substance.
  • The calculation treats the sample as having a uniform, known composition; impurities and measurement uncertainty are not included.

What “Atoms Formula” Means

There is no single formula called “the atoms formula.” The phrase is a search-style question about how to calculate how many atoms are present. The standard chemistry method uses the mole relationship: first convert mass to moles, then convert moles to particles using Avogadro’s constant.

For a pure element, the particles are atoms. The same conversion gives molecules or formula units when the substance is a molecular compound or an ionic solid, respectively. The identity of the counted particle matters: a molecule can contain several atoms, and one formula unit can represent a ratio of ions rather than a discrete molecule.

For example, one molecule of water, H2O, contains three atoms: two hydrogen atoms and one oxygen atom. If the question asks for the total number of atoms in a water sample, first calculate the number of water molecules, then multiply by three. To count just hydrogen atoms, multiply the number of water molecules by two.

How to Use the Calculator

  • Enter the mass in grams. Convert from another unit first: 1 kg = 1,000 g and 1 mg = 0.001 g.
  • Enter the molar mass in g/mol for the element in the sample. The default values are set for carbon and are only suitable when carbon is the substance being counted.
  • Read the first result as the total number of atoms. The second result is the amount in moles, which helps check the conversion.

To look up an element’s molar mass, use a periodic table’s standard atomic weight. The IUPAC abridged standard atomic weights include carbon 12.011 g/mol, hydrogen 1.008 g/mol, oxygen 15.999 g/mol, and chlorine 35.45 g/mol. Some elements have standard atomic weights reported as intervals because naturally occurring isotopic composition varies; use a value appropriate to the sample when that distinction matters.

Compounds, Isotopes, and Common Mistakes

For a compound, use its molar mass to calculate the number of molecules or formula units, then account for the atoms in each particle. For example, a sample containing 1 mol of CO2 has 1 mol of carbon dioxide molecules. Each molecule has one carbon atom and two oxygen atoms, so it contains 1 mol of carbon atoms and 2 mol of oxygen atoms: 6.02214076 × 1023 carbon atoms and 1.204428152 × 1024 oxygen atoms.

For an isotope-specific sample, use the molar mass of that isotope rather than the element’s average standard atomic weight. A periodic-table atomic weight represents an isotopic average for ordinary terrestrial material, so it can be unsuitable for enriched or purified isotope samples.

  • Mixing units: grams divided by g/mol produces moles. Entering milligrams as though they were grams makes the answer 1,000 times too large.
  • Using atomic mass as the atom count: molar mass converts mass to moles; Avogadro’s constant is still needed to convert moles to particles.
  • Confusing atoms and molecules: one molecule may contain multiple atoms. Apply the chemical formula’s subscripts when the requested answer is an atom count in a compound.
  • Rounding too early: keep the calculator’s unrounded intermediate values when doing further calculations, then round the final answer to match the precision of the measurements.

Limits and Interpretation

The equation gives a theoretical count from the supplied mass and molar mass. It does not measure atoms individually, determine purity, or account for uncertainty in a balance reading, sample composition, or molar-mass choice. A reported atom count can have many digits because Avogadro’s constant is exact, but the sample measurement usually limits how many digits are scientifically meaningful.

The formula also assumes the intended particles are clear. If a question asks for atoms in an ionic compound, calculate formula units first and multiply by the total number of atoms represented by one formula unit. If it asks for a particular element’s atoms, multiply by that element’s subscript. For example, one formula unit of CaCl2 represents three atoms in total: one calcium and two chlorine.

Frequently Asked Questions

What is the formula for calculating atoms?
For a pure element, atoms = (mass in grams ÷ molar mass in g/mol) × 6.02214076 × 1023. The mass-to-molar-mass step gives moles; Avogadro’s constant converts moles to atoms.

How many atoms are in one mole?
One mole contains exactly 6.02214076 × 1023 specified particles. For a mole of an element, those particles are atoms; for a molecular substance, they are molecules.

How do I find the number of atoms in a compound?
Calculate the number of molecules or formula units from mass and molar mass, then multiply by the number of the requested atoms in each particle. For the total atom count, add the subscripts in the chemical formula, treating an element with no written subscript as having a subscript of one.

Is atomic mass the same as molar mass?
No. Atomic mass refers to the mass of an atom, commonly expressed in atomic mass units. Molar mass is the mass of one mole of those atoms, expressed in g/mol. Their numerical values are similar, but their units and meanings differ.

Can this formula calculate atoms in a gas?
Yes, if the gas sample’s mass and molar mass are known and the sample composition is specified. The mass-based mole calculation is the same; gas-law calculations are an alternative when pressure, volume, and temperature are known instead.

Related

Formula used
in m | Sample mass | g | 12.011 | 0
in mm | Molar mass | g/mol | 12.011 | 0.001
out atoms | Number of atoms | atoms | (m / mm) * 6.02214076e23 | 0
out mol | Amount of substance | mol | m / mm | 6

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 →