Article — Atom Calculator
Atom calculator: count atoms in any sample of matter
An atom is the smallest unit of an element that retains the element's chemical identity. It consists of a dense central nucleus (protons and neutrons) and a surrounding cloud of electrons. The atom calculator converts a mass of any element into the number of atoms using Avogadro's constant N_A = 6.022 × 10²³ mol⁻¹, or returns protons, neutrons, and electrons from the atomic number Z and mass number A.
Twelve grams of carbon-12 contain exactly one mole — 6.022 × 10²³ atoms. The math scales linearly: 1 g of carbon contains 5.02 × 10²² atoms, 100 g of gold (197 g/mol) contains 3.06 × 10²³ atoms. The calculator handles 25 common elements directly and computes subatomic particle counts for any isotope.
What is an atom?
An atom is the fundamental unit of matter as a chemist defines it. Each atom has a nucleus roughly 10⁻¹⁵ m across, containing positively charged protons and electrically neutral neutrons. Around the nucleus, electrons occupy quantum mechanical orbitals at distances around 10⁻¹⁰ m. The overall atom is electrically neutral when the electron count equals the proton count.
The number of protons defines the element. One proton is hydrogen. Six protons is carbon. Seventy-nine is gold. This number (Z, the atomic number) is fixed for every element — change it and you have transmuted matter, a nuclear reaction rather than a chemical one.
How to count atoms from mass
Counting atoms from a measurable mass uses two facts: the element's molar mass (grams per mole) and Avogadro's number. Divide mass by molar mass to get moles, then multiply by N_A to get atoms. The chain is short, but the resulting numbers are large.
moles = mass ÷ molar massatoms = moles × 6.022 × 10²³atoms = (mass ÷ molar mass) × N_AFor example, 1 g of water contains 1 ÷ 18.015 = 0.0555 mol of H₂O, which equals 3.34 × 10²² water molecules. Each molecule contains 2 hydrogen atoms and 1 oxygen, so a gram of water contains 6.68 × 10²² H atoms and 3.34 × 10²² O atoms.
Subatomic particles in an atom
An atom's three primary particles are protons, neutrons, and electrons. Protons carry +1 elementary charge and a mass of 1.00728 u. Neutrons are uncharged with mass 1.00867 u. Electrons carry −1 charge and almost no mass — 0.00055 u, about 1/1836 of a proton.
If an atom were the size of a football stadium, the nucleus would be a pea at the centre and the electrons would be specks darting around the upper seats. More than 99.97% of the atom's mass is in that pea, and the rest of the volume is essentially empty space.
Atomic number and mass number
Atomic number Z is the count of protons in the nucleus. It defines the element and is identical for every atom of that element. Mass number A is the total number of nucleons — protons plus neutrons. A is specific to an isotope, not the element as a whole.
The relationship is simple: number of neutrons N = A − Z. For ⁵⁶Fe (iron-56), Z = 26 and A = 56, so N = 30 neutrons. The notation ²³⁵U means uranium-235: Z = 92 protons, A = 235 nucleons, N = 143 neutrons.
Atom isotopes and their counts
Isotopes are atoms of the same element with different neutron counts. Carbon has three natural isotopes: ¹²C (98.93%), ¹³C (1.07%), and ¹⁴C (trace, radioactive). All three are chemically identical because they share Z = 6, but ¹⁴C decays with a half-life of 5,730 years — the basis of radiocarbon dating.
To find neutrons of an isotope, subtract Z from A. To find electrons of an ion, subtract the charge from Z. Na⁺ has Z = 11 and charge +1, so 10 electrons. O²⁻ has Z = 8 and charge −2, so 10 electrons too — both share the neon noble-gas configuration.
Electron configuration of an atom
Electrons fill orbitals from lowest energy upward, following the Aufbau principle. The first shell (1s) holds 2 electrons. The second (2s, 2p) holds 8. The third (3s, 3p, 3d) holds 18. The maximum per shell is 2n² where n is the shell number.
Iron (Z = 26) configuration is 1s² 2s² 2p⁶ 3s² 3p⁶ 4s² 3d⁶, abbreviated [Ar] 4s² 3d⁶. The outermost (valence) electrons determine an atom's chemistry — Fe loses 2 or 3 to form Fe²⁺ or Fe³⁺ ions in solution.
Atom size and scale
Atomic radii range from about 25 pm (hydrogen) to 260 pm (caesium). The nucleus is roughly 100,000 times smaller. A single drop of water (0.05 mL) contains about 1.67 × 10²¹ molecules of H₂O — that is more molecules in one drop than there are stars in the observable universe.
- 1 mol of any atom = 6.022 × 10²³ atoms
- 1 g of carbon = 5.02 × 10²² C atoms
- 1 g of gold = 3.06 × 10²¹ Au atoms
- 1 g of hydrogen gas (H₂) = 5.97 × 10²³ H atoms
- 1 g of iron = 1.08 × 10²² Fe atoms
- 1 g of mercury = 3.01 × 10²¹ Hg atoms
Common atom calculation pitfalls
Three errors come up repeatedly. First, confusing atoms with molecules: 1 mole of O₂ contains 6.022 × 10²³ molecules but 1.204 × 10²⁴ oxygen atoms because each molecule has two. Second, using wrong molar mass — always verify against the periodic table for the element, not for a compound. Third, forgetting that ions have different electron counts than the neutral atom.
If the question asks for atoms of element X in a compound, multiply the number of compound molecules by the count of X in the formula. 1 mol of glucose (C₆H₁₂O₆) contains 6 × 6.022 × 10²³ = 3.61 × 10²⁴ carbon atoms, 12 × N_A hydrogen atoms, and 6 × N_A oxygen atoms.
The atom calculator handles the arithmetic, but the chemistry choices — which element, which isotope, what charge — stay with you. Used carefully, it bridges the world we measure (grams on a balance) with the world that actually reacts (atoms in motion).
Beyond chemistry classrooms, atom counting matters in materials science and semiconductor manufacturing. A single silicon transistor in a modern CPU contains roughly 10⁸ silicon atoms; a 300 mm silicon wafer contains 10²⁵ atoms total. Doping concentrations are measured in atoms per cubic centimetre, with high-precision integrated circuits requiring dopant levels of 10¹⁴ to 10¹⁹ atoms/cm³. The Avogadro-based counts make these macroscopic ratios tractable.
Nuclear physics uses atom counting in reverse. Radiocarbon dating measures the ratio of ¹⁴C to ¹²C atoms in organic samples, comparing to atmospheric levels to estimate age. Mass spectrometry can detect down to a few thousand atoms of a target element — incredibly sensitive, but still relying on the same N_A conversion the calculator uses.
In biology, the count of specific molecules per cell is often staggering. A single E. coli bacterium contains around 4,300 different protein species at copy numbers from 1 to 10⁵ molecules each. The mole and Avogadro's number connect those biological counts to the analytical chemistry that measures them.