Every atom is built from protons, neutrons and electrons, and three numbers tell you how many of each: the atomic number, the mass number and the charge.
Give it the three numbers and it counts the protons, neutrons and electrons and writes out the electron configuration.
How to use the Atom Calculator#
- Enter the atomic number. This is the number of protons. Look it up on the periodic table if you need to.
- Add the mass number. Optional. It gives the number of neutrons.
- Add the charge. Enter 0 for a neutral atom, or the charge of an ion.
The relationships#
Carbon-12 has atomic number 6 and mass number 12, so it has 6 protons and 6 neutrons, and 6 electrons if it’s neutral. A calcium ion with a charge of +2 has 20 protons, and 18 electrons.
Electron configuration#
Electrons fill shells and subshells in order of increasing energy, called the Aufbau order: 1s, 2s, 2p, 3s, 3p, 4s, 3d, and so on. Each s subshell holds 2 electrons, p holds 6, d holds 10 and f holds 14. Carbon, with 6 electrons, is 1s² 2s² 2p².
A handful of elements, such as chromium and copper, break the simple order because half-filled and filled d subshells are unusually stable. The calculator accounts for the common exceptions, but check a data table for the heavy elements.
Ions#
When an atom loses electrons it becomes a positive ion, and the electrons are removed from the outermost shell first. When it gains electrons it becomes a negative ion. The number of protons never changes, because that would make it a different element.
Worked examples#
Iron has atomic number 26. For the isotope iron-56, the mass number is 56, so there are 26 protons, 56 − 26 = 30 neutrons, and 26 electrons in a neutral atom. Its electron configuration is 1s² 2s² 2p⁶ 3s² 3p⁶ 3d⁶ 4s². Now take the ion Fe³⁺: it has lost three electrons, so it has 23, and the electrons come off the outermost shell first, which is 4s, then 3d. The configuration becomes 1s² 2s² 2p⁶ 3s² 3p⁶ 3d⁵.
| Atom or ion | Protons | Neutrons | Electrons |
|---|---|---|---|
| Carbon-12 | 6 | 6 | 6 |
| Sodium-23 | 11 | 12 | 11 |
| Na⁺ (sodium ion) | 11 | 12 | 10 |
| Chlorine-35, Cl⁻ | 17 | 18 | 18 |
| Uranium-238 | 92 | 146 | 92 |
Where the rules bend#
The order in which electrons fill orbitals follows the Aufbau principle: 1s, 2s, 2p, 3s, 3p, 4s, 3d and so on. A few elements break the pattern because a half-filled or full d subshell is slightly more stable. Chromium is 3d⁵ 4s¹ and copper 3d¹⁰ 4s¹, instead of the 3d⁴ 4s² and 3d⁹ 4s² the simple rule predicts. The calculator includes the known exceptions in the d and f blocks, so its results match what you find in a data table. When you remove electrons to make a cation, they come from the shell with the highest principal quantum number first, not from the orbital that filled last.
Atomic number, mass number and atomic mass#
The atomic number is the number of protons and defines the element. The mass number is the count of protons plus neutrons in one particular atom, and it is always a whole number. The atomic mass on the periodic table is different: it is an average over the naturally occurring isotopes weighted by their abundance, which is why chlorine’s is 35.45. Isotopes of the same element share the proton count but differ in neutrons, so carbon-12 and carbon-14 behave the same chemically but differ in stability. Enter the mass number of the isotope you are interested in to find its neutrons. For related maths, see the mean calculator, which does a weighted average if you build one by hand.
Frequently asked questions#
Subtract the atomic number from the mass number.
Atomic number minus the charge. A +2 ion has two fewer electrons than a neutral atom.
An atom of the same element with a different number of neutrons.
No. Only the number of electrons changes.
Because it has gained or lost electrons. A positive charge means electrons were lost, so Mg²⁺ has 12 − 2 = 10 electrons. A negative charge means electrons were gained, so O²⁻ has 8 + 2 = 10. The number of protons and neutrons does not change when an atom becomes an ion.