molecalculator

Moles & Molar Mass

Mass to Atoms Formula: Convert Grams to Atoms

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

Atoms 6.017 × 1023 atoms
Amount of substance
0.9991 mol
= Sample mass ÷ Molar mass
Sample mass
12 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
Atoms (atoms), Amount of substance (mol)
Rounding
0 dp · 4 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.

To convert a sample’s mass to atoms, multiply its mass by Avogadro’s constant and divide by its molar mass: atoms = mass (g) ÷ molar mass (g/mol) × 6.02214076 × 1023. Enter the sample mass and the substance’s molar mass to calculate the number of atoms; for a compound, this first gives molecules or formula units, which must then be multiplied by the number of atoms of the element in each particle.

Formula

The formula is N = (m ÷ M) × NA. Here, N is the number of atoms, m is sample mass in grams (g), M is molar mass in grams per mole (g/mol), and NA is Avogadro’s constant, exactly 6.02214076 × 1023 mol−1.

Dividing mass by molar mass converts grams into moles: (g) ÷ (g/mol) = mol. Multiplying the amount in moles by atoms per mole gives a particle count. For a pure element, the particles are atoms, so this calculation directly returns atoms. The calculator’s first output is the atom count; the second is the amount of substance in moles.

Worked Example

Using the default values, the sample mass is 12.0 g and the molar mass is 12.011 g/mol, the standard atomic weight used here for carbon.

  1. Calculate the amount: 12.0 g ÷ 12.011 g/mol ≈ 0.99908 mol.
  2. Multiply by Avogadro’s constant: 0.99908 mol × 6.02214076 × 1023 atoms/mol ≈ 6.0166 × 1023 atoms.

Rounded to the calculator’s zero decimal places, the result is approximately 601,660,000,000,000,000,000,000 atoms. The same count in scientific notation is approximately 6.0166 × 1023 atoms. The mole output is 0.9991 mol when rounded to four decimal places.

Assumptions

  • The sample is pure and its specified molar mass represents the material being counted.
  • The mass and molar mass use compatible units: grams and grams per mole.
  • The displayed atom count is an ideal particle count calculated from the measured or entered mass; uncertainty in measurements and atomic weights is not included.
  • For compounds, the basic calculation counts molecules or formula units, not individual atoms, unless the count is multiplied by the appropriate atoms-per-particle factor.

Using the Formula for Elements and Compounds

For an element, use the element’s molar mass from the periodic table. For example, a 2.00 g sample of oxygen atoms has an amount of 2.00 ÷ 15.999 ≈ 0.12501 mol, or about 7.53 × 1022 oxygen atoms. Be attentive to what the sample consists of: oxygen gas is usually O2 molecules, not separate oxygen atoms. If the question asks for oxygen atoms in O2, multiply the molecule count by two.

For a compound, calculate its molar mass by adding the atomic masses in its chemical formula. Water, H2O, has molar mass approximately 2(1.008) + 15.999 = 18.015 g/mol. A 36.030 g sample therefore contains 2.000 mol of water molecules, or about 1.2044 × 1024 molecules. Each molecule has three atoms, so it contains about 3.6133 × 1024 total atoms. If the question asks only for hydrogen atoms, multiply the molecule count by two instead.

For ionic solids, the counted particles are more accurately called formula units rather than molecules. For example, one formula unit of sodium chloride contains one sodium ion and one chloride ion: multiply the formula-unit count by one to get either ion count, or by two for the total number of ions. When counting all atoms in a compound, use the sum of the subscripts in its chemical formula.

Choosing Molar Mass and Handling Units

The molar mass depends on the chemical identity and, for a compound, its exact formula. Use the value for the relevant chemical form, including waters of hydration or other components shown in the formula. Standard atomic weights are commonly adequate for classroom calculations; natural isotopic composition can cause small variations, while a specific isotope or isotope mixture may require its own molar mass.

  • Convert milligrams to grams by dividing by 1,000; convert kilograms to grams by multiplying by 1,000.
  • If mass is entered in grams and molar mass in g/mol, the result of mass ÷ molar mass is already in moles.
  • Do not enter a molecular mass in g/mol alongside a mass expressed in milligrams without first converting the mass to grams.
  • Keep guard digits during the calculation, then round the final answer to reflect the precision of the input measurements.

Avogadro’s constant is exact by definition, but that does not make a measured atom count exact. If a mass is recorded as 12.0 g, it has fewer significant figures than a value recorded as 12.000 g. An atom count is also a theoretical count derived from the sample’s mass and composition; it is not a claim that individual atoms were counted one by one.

Common Mistakes and Limits

A frequent error is to multiply grams directly by Avogadro’s constant. That omits the conversion from grams to moles and gives the wrong units. The mass must first be divided by molar mass. Another common error is to report molecules as atoms for a compound. Decide what particle is being counted, then apply the number of relevant atoms or ions in each particle.

Check that the formula matches the material’s state and composition. A sample containing impurities, a mixture, or a solution cannot generally be treated as entirely one pure substance unless its composition or concentration is known. For a mixture, calculate each component’s amount separately if its mass and identity are available, then combine the requested particle counts.

This conversion gives a count from mass and molar mass; it does not identify a substance, measure purity, or account automatically for experimental uncertainty. Molar masses rounded too aggressively can affect results, particularly for large calculations or comparisons. Report a sensible number of significant figures rather than implying more precision than the mass measurement supports.

Frequently Asked Questions

What is the formula for converting mass to atoms?
Use atoms = mass in grams ÷ molar mass in g/mol × 6.02214076 × 1023. For a compound, this first counts molecules or formula units, so multiply by the atoms per particle if you need individual atoms.

How do I convert grams to atoms without a calculator?
Divide the gram amount by the molar mass to find moles, then multiply the moles by 6.02214076 × 1023. A calculator helps because the final count is often very large.

Do I multiply by Avogadro’s number or divide by it?
After finding moles, multiply by Avogadro’s constant to get particles. To convert a particle count back to moles, divide by the constant.

Does mass to atoms give molecules for a compound?
Yes. Mass divided by compound molar mass and multiplied by Avogadro’s constant gives molecules for molecular substances, or formula units for ionic substances. Multiply that result by the number of the requested atoms or ions in each particle.

How do I find a compound’s molar mass?
Add the atomic masses of all atoms in its chemical formula, accounting for each subscript. For H2O, that is 2 × 1.008 + 15.999 = 18.015 g/mol.

Related

Formula used
in m | Sample mass | g | 12.0 | 0
in mm | Molar mass | g/mol | 12.011 | 0
out a | Atoms | atoms | m / mm * 6.02214076e23 | 0
out n | Amount of substance | mol | m / mm | 4

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 →