Atom Calculator
Find the number of protons, neutrons, and electrons in any neutral atom or ion, or work backward from particle counts to identify the atomic number, mass number, and net charge. Two 3D diagrams compare a neutral atom to its ion and show the electron-shell structure, with charts comparing particle counts across common ions.
Reviewed by the ToolNestr Editorial Team — July 2026
Neutral atom vs ion
1. A neutral atom
A central nucleus (protons in red, neutrons in grey) surrounded by an equal number of orbiting electrons (blue) — net charge zero.
2. The same atom as a positive ion
Same nucleus, but one fewer orbiting electron — the missing electron leaves the ion with a net positive charge.
Atomic structure graphs
How it works
The core idea in one line: an atom's identity as an element is locked in by its proton count alone — everything else (neutrons, electrons, net charge) can vary independently without changing what element it is.
protons = Z
the atomic number defines element identity
neutrons = A − Z
mass number minus atomic number
electrons = Z − charge
protons minus net charge (0 for a neutral atom)
Protons never change during ordinary chemical processes, so protons = Z is fixed for a given element. Mass number A counts every nucleon (proton + neutron), so subtracting protons leaves neutrons = A − Z. Electrons balance charge: a neutral atom has electrons = Z exactly, while an ion has electrons = Z − charge, since losing an electron leaves a net positive charge and gaining one leaves a net negative charge.
Worked example 1 — a neutral sodium atom
Given: Sodium-23 has atomic number Z = 11, mass number A = 23, and no net charge.
A neutral atom always has equal protons and electrons, which is exactly why its overall charge is zero.
Worked example 2 — the sodium ion Na⁺
Given: The same Sodium-23, but now as the Na⁺ ion (net charge = +1) formed when it loses one electron.
Only the electron count changes when an ion forms — the proton and neutron counts stay exactly the same, since ionization never touches the nucleus.
Common ions — protons stay fixed, electrons shift
Notice the proton count (which defines the element) never changes — only electrons are gained or lost to form the ion.
| Species | Protons | Electrons | Net charge |
|---|---|---|---|
| Na (neutral) | 11 | 11 | 0 |
| Na⁺ ★ | 11 | 10 | +1 |
| Cl (neutral) | 17 | 17 | 0 |
| Cl⁻ | 17 | 18 | −1 |
| Mg²⁺ | 12 | 10 | +2 |
★ Reference row (worked example 2). Losing electrons gives a positive charge; gaining electrons gives a negative charge.
Where atomic structure actually matters
📊 Reading the periodic table
Every element's position on the periodic table is fixed by its atomic number, the exact proton count — understanding proton/neutron/electron counts is the foundation for reading and using the entire table.
🔋 Ion formation in batteries and salts
Batteries and dissolved salts rely on atoms gaining or losing electrons to form ions — understanding how electron count shifts while protons stay fixed explains how these charged particles form and move.
☢️ Nuclear chemistry
Nuclear reactions change proton and neutron counts directly (unlike ordinary chemical reactions, which only shuffle electrons) — tracking these counts explains how one element can transmute into another during radioactive decay.
🔬 Mass spectrometry interpretation
Mass spectrometers detect ions by their mass-to-charge ratio, so correctly accounting for how many electrons an ion has lost or gained is essential to correctly interpreting the resulting spectrum.
Common misconceptions
"Mass number and atomic mass are the same thing."
Mass number is a whole-number count of protons plus neutrons for one specific isotope. Atomic mass on the periodic table is a weighted average across all of an element's naturally occurring isotopes, so it is almost never a whole number.
"Atoms with different electron counts must be different elements."
Element identity is defined only by proton count (Z). Ions of the exact same element can have very different electron counts than the neutral atom — Na and Na⁺ are both sodium, just with different net charges.
"Forming an ion changes an atom's mass number."
Ionization only involves gaining or losing electrons, which have negligible mass. The mass number (protons + neutrons) is completely unaffected by whether an atom is neutral or ionized.
"A positive ion has gained protons."
A positive ion (cation) forms by losing electrons, not gaining protons — proton count is essentially fixed for a given element under normal chemical conditions; only electron count changes to create ions.
Formula sources & further reading
The formulas here are standard, traceable to:
- • OpenStax, Chemistry 2e — Chapter 2, "Atoms, Molecules, and Ions" (free, peer-reviewed). openstax.org
- • Brown, LeMay & Bursten, Chemistry: The Central Science — Chapter 2, Atoms, Molecules, and Ions.
- • Zumdahl & Zumdahl, Chemistry — Atomic structure and ion formation.
protons = Z; neutrons = A − Z; electrons = Z − charge. Results are rounded/whole-number by definition, since particle counts are always integers.
How to use this calculator
Pick the mode
"From Z, A, charge" for forward calculation; "From particle counts" to identify an unknown atom or ion.
Enter the values
Type whole numbers for atomic number, mass number, charge, or particle counts as required.
Read the result
Particle counts, or the atom's Z, A, and charge, solve instantly.
Related tools
Frequently asked questions
How do you find the number of protons, neutrons, and electrons in an atom?
Protons always equal the atomic number (Z). Neutrons equal the mass number minus the atomic number (A − Z). Electrons equal the atomic number minus the net charge (Z − charge) — for a neutral atom, charge is 0, so electrons = Z.
What makes an atom become an ion?
An atom becomes an ion when it gains or loses electrons, creating a net electric charge. Losing electrons produces a positive ion (cation); gaining electrons produces a negative ion (anion). The proton and neutron counts never change in this process.
Does mass number change when an atom becomes an ion?
No — forming an ion only involves gaining or losing electrons, which have negligible mass compared to protons and neutrons. The mass number (protons + neutrons) stays exactly the same whether the atom is neutral or charged.
How is atomic mass different from mass number?
Mass number (A) is a whole-number count of protons plus neutrons for one specific isotope. Atomic mass on the periodic table is a weighted average across all naturally occurring isotopes of that element, which is why it usually isn't a whole number.
Can two atoms have the same electron count but be different elements?
Yes — this happens whenever ions are involved. For example, a neutral Neon atom (10 protons, 10 electrons) and a Sodium ion Na⁺ (11 protons, 10 electrons) both have 10 electrons, but they are different elements because their proton counts differ.