Atom Calculator
Pick an element and enter its mass number and ionic charge to instantly find the number of protons, neutrons and electrons, the subatomic particle mass, and the electron shell configuration. You can also enter a custom atomic number to work with any isotope. All results update as you type.
What is the atom calculator?
This tool solves the three fundamental equations that connect atomic number (Z), mass number (A), ionic charge, and the counts of protons, neutrons and electrons. Pick any element from the list (which pre-fills its atomic number) or type a custom Z, then enter the mass number of the isotope you care about and the ionic charge (0 for a neutral atom). The calculator immediately returns the particle counts, the estimated subatomic mass in atomic mass units, and the Bohr-model electron shell configuration. It covers all 118 named elements and any valid isotope of each.
Core formulas: how protons, neutrons and electrons relate
Three simple equations govern atomic structure. First, the number of protons equals the atomic number: p = Z. Second, the number of neutrons is the mass number minus the atomic number: n = A - Z. Third, for an ion with charge c, the number of electrons is e = Z - c. For a neutral atom c = 0, so e = Z. The mass number A is always a whole number (it counts nucleons), while the standard atomic weight you see on a periodic table is the average over all naturally occurring isotopes weighted by their abundance, which is why it is often a decimal. This calculator uses the mass number you specify, not the average weight.
Subatomic particle masses and why they matter
A proton has a rest mass of 1.007276 u, a neutron 1.008665 u, and an electron just 0.000549 u (about 1836 times lighter than a proton). The total calculated mass here is the sum of all three types in your atom. In reality, the actual atomic mass is slightly less because some mass is converted to nuclear binding energy when nucleons bind together. This mass defect, described by Einstein's E = mc2, is what holds the nucleus together. For most chemistry purposes the difference is small, but in nuclear physics it is crucial. The calculated mass from this tool is therefore an approximation that ignores binding energy.
Isotopes and why the mass number changes
All atoms of the same element have the same number of protons, but the number of neutrons can vary. Atoms of the same element with different neutron counts are called isotopes. Carbon-12 (6 protons, 6 neutrons) is the most abundant carbon isotope and is the reference for the atomic mass unit. Carbon-13 (6 protons, 7 neutrons) is stable and makes up about 1.1% of natural carbon. Carbon-14 (6 protons, 8 neutrons) is radioactive and used in radiocarbon dating. The isotope notation writes the mass number as a superscript before the symbol: 14C for carbon-14. Change the mass number in this calculator to explore any isotope of your chosen element.
Common elements and their atomic structure
| Element | Symbol | Z | Common A | Neutrons | Std. weight (u) |
|---|---|---|---|---|---|
| Hydrogen | H | 1 | 1 | 0 | 1.008 |
| Carbon | C | 6 | 12 | 6 | 12.011 |
| Nitrogen | N | 7 | 14 | 7 | 14.007 |
| Oxygen | O | 8 | 16 | 8 | 15.999 |
| Sodium | Na | 11 | 23 | 12 | 22.990 |
| Chlorine | Cl | 17 | 35 | 18 | 35.45 |
| Calcium | Ca | 20 | 40 | 20 | 40.078 |
| Iron | Fe | 26 | 56 | 30 | 55.845 |
| Copper | Cu | 29 | 63 | 34 | 63.546 |
| Gold | Au | 79 | 197 | 118 | 196.967 |
Protons, most common mass number (A), neutrons, and standard atomic weight for selected elements.
Frequently asked questions
How do I find the number of neutrons?
Subtract the atomic number from the mass number: neutrons = A - Z. For iron-56 (A=56, Z=26), there are 30 neutrons. The mass number is the total count of protons plus neutrons in the nucleus, so rearranging gives you neutrons directly.
What is the difference between atomic number and mass number?
The atomic number (Z) counts only the protons in the nucleus and defines which element an atom is. The mass number (A) counts all nucleons, meaning protons plus neutrons. An element's atomic number never changes, but its mass number varies between isotopes. For example, all carbon atoms have Z = 6, but carbon-12 has A = 12 and carbon-14 has A = 14.
Why do ions have a different number of electrons than protons?
A neutral atom has equal numbers of protons and electrons, so its charge is zero. When an atom loses electrons it becomes a positively charged cation. When it gains electrons it becomes a negatively charged anion. Sodium (Z=11) loses one electron to form Na+, leaving it with 10 electrons. Chlorine (Z=17) gains one electron to form Cl-, giving it 18 electrons. The formula is e = Z - charge, where charge is positive for cations and negative for anions.
Why is the calculated mass slightly different from the actual atomic mass?
This calculator adds up the rest masses of all the protons, neutrons, and electrons in the atom. The actual measured mass of a nucleus is slightly less because energy is released as the particles bind together, and that energy has mass according to E = mc2. This difference, the mass defect, provides the nuclear binding energy that holds the atom together. For chemistry purposes the difference is tiny, but it explains why the calculated mass here may differ slightly from the tabulated atomic mass.
What does the electron shell configuration show?
The shell configuration lists how electrons fill the principal energy levels starting from the innermost shell (K shell, n=1, max 2 electrons), then L (n=2, max 8), M (n=3, max 18), and so on. For sodium with 11 electrons the result is 2, 8, 1 meaning 2 electrons in the K shell, 8 in L, and 1 valence electron in M. This Bohr-model view is a simplified picture. The full quantum mechanical configuration (1s2 2s2 2p6 3s1 for sodium) adds sublevel detail used in advanced chemistry.
What is the neutron-to-proton ratio and why does it matter?
The n/p ratio is the number of neutrons divided by the number of protons in a nucleus. Light elements near hydrogen have roughly equal neutrons and protons (ratio close to 1). As atomic number increases, more neutrons are needed to dilute the repulsion between protons and keep the nucleus stable, so the ratio rises above 1 for heavy elements. Nuclei far from the stable n/p band tend to be radioactive and decay toward stability. Carbon-12 (n/p = 1.0) is perfectly stable; carbon-14 (n/p = 1.33) is radioactive.