How Do Ions Form? Losing and Gaining Electrons
Ions form when atoms lose or gain electrons to get a full outer shell. Metals lose electrons and become positive ions, non-metals gain them. See it animated.

How do ions form? An ion forms when an atom loses or gains electrons, so its number of electrons no longer matches its number of protons and it carries an electric charge. Atoms do this to reach a full outer shell. Metals lose their 1–3 outer electrons and become positive ions (Na → Na⁺). Non-metals gain the 1–3 electrons they are missing and become negative ions (Cl → Cl⁻). When sodium meets chlorine, one electron moves from Na to Cl, and the two ions attract to make sodium chloride.
What is an ion?
An ion is an atom (or group of atoms) with an overall electric charge. A neutral atom has equal numbers of protons (+1 each, in the nucleus) and electrons (−1 each, in shells around it). Only the electrons move in chemical reactions. The nucleus never changes.
- Lose electrons → more protons than electrons → positive ion, called a cation.
- Gain electrons → more electrons than protons → negative ion, called an anion.
A sodium atom has 11 protons and 11 electrons. A sodium ion has 11 protons and 10 electrons, so its charge is 11 − 10 = +1, written Na⁺.
How are ions formed from atoms?
Ions are formed because a full outer shell (8 electrons, or 2 for the first shell) is very stable. That is the arrangement of the noble gases, which hardly react at all. An atom either loses its outer electrons or gains new ones, whichever takes fewer.
Metals lose electrons
Sodium's electron arrangement is 2,8,1. Its single outer electron is far from the nucleus and shielded by 10 inner electrons, so it is held weakly. Losing it leaves 2,8, the same arrangement as neon. The energy needed to remove it is called the ionisation energy. For sodium it is 496 kJ/mol, one of the lowest of any element.
Magnesium (2,8,2) loses two electrons to become Mg²⁺ (2,8). Aluminium (2,8,3) loses three to become Al³⁺.
Non-metals gain electrons
Chlorine's arrangement is 2,8,7: one short of a full shell. Its nucleus has 17 protons pulling on the outer shell, so it attracts an extra electron strongly and becomes Cl⁻ (2,8,8), like argon. Oxygen (2,6) gains two electrons to become O²⁻ (2,8).
Sodium chloride, step by step
- A sodium atom (2,8,1) and a chlorine atom (2,8,7) meet.
- Sodium's outer electron moves to chlorine's outer shell.
- Sodium is now Na⁺ (2,8) and chlorine is Cl⁻ (2,8,8). Both have full outer shells.
- The opposite charges attract strongly. This electrostatic attraction is the ionic bond.
- Billions of Na⁺ and Cl⁻ ions pack into a giant ionic lattice: a salt crystal.
In a dot-and-cross diagram you draw one atom's electrons as dots and the other's as crosses, so you can see exactly which electron moved. The ions are drawn in square brackets with the charge at the top right: [Na]⁺ [Cl]⁻.
How can you predict ion charges from the periodic table?
The group number tells you how many outer electrons an atom has, and so what charge its ion takes. Use this ion charges periodic table summary to predict any main-group ion:
| Group | Outer electrons | What happens | Ion charge | Examples |
|---|---|---|---|---|
| 1 | 1 | loses 1 | +1 | Li⁺, Na⁺, K⁺ |
| 2 | 2 | loses 2 | +2 | Mg²⁺, Ca²⁺ |
| 3 | 3 | loses 3 | +3 | Al³⁺ |
| 5 | 5 | gains 3 | −3 | N³⁻ |
| 6 | 6 | gains 2 | −2 | O²⁻, S²⁻ |
| 7 | 7 | gains 1 | −1 | F⁻, Cl⁻, Br⁻ |
| 0 (18) | 8 | no ion | — | He, Ne, Ar |
Group 4 elements such as carbon would need to lose or gain 4 electrons, which takes too much energy, so they usually share electrons in covalent bonds instead. Transition metals such as iron can form more than one ion (Fe²⁺ and Fe³⁺), which is why names like iron(III) oxide carry a Roman numeral.
What is the difference between positive and negative ions?
Positive and negative ions (cations and anions) differ in charge, in size and in where they come from.
| Positive ions (cations) | Negative ions (anions) | |
|---|---|---|
| Formed by | losing electrons | gaining electrons |
| Usually from | metals | non-metals |
| Size compared with the atom | smaller (a whole shell is lost) | larger (extra electrons repel) |
| Name | same as the element: sodium ion | ending changes to -ide: chloride, oxide |
| In electrolysis | move to the negative electrode (cathode) | move to the positive electrode (anode) |
The size difference is striking: an Na atom has a radius of about 186 pm, but Na⁺ is only about 102 pm, because its whole third shell has gone.
How do you work out the formula of an ionic compound?
The charges in an ionic compound must cancel to zero, so the formula comes straight from the ion charges.
- Na⁺ and Cl⁻: +1 and −1 cancel → NaCl
- Mg²⁺ and O²⁻: +2 and −2 cancel → MgO (two electrons move)
- Mg²⁺ and Cl⁻: one Mg²⁺ needs two Cl⁻ → MgCl₂
- Na⁺ and O²⁻: two Na⁺ for one O²⁻ → Na₂O
- Al³⁺ and O²⁻: 2 × (+3) = +6 and 3 × (−2) = −6 → Al₂O₃
Common mistakes
- Thinking protons move. Only electrons are lost or gained. The number of protons, and so the element, never changes.
- Getting the sign backwards. Losing negative electrons makes an ion positive, not negative.
- Writing the charge before the symbol or as a plain number: write Mg²⁺, not +2Mg or Mg2.
- Saying atoms "want" a full shell. Atoms have no wishes. The full-shell ions and the lattice are simply lower in energy, so the process releases energy overall.
- Mixing up ionic and covalent bonds. Electrons are transferred in ionic bonds and shared in covalent ones. See ionic vs covalent bonds.
Frequently asked questions
Why do metals form positive ions?
Metal atoms have only one, two or three electrons in their outer shell, far from the nucleus and shielded by the inner shells, so they are held weakly. Losing them takes less energy than gaining five or more, and it leaves a full shell underneath. With fewer electrons than protons, the metal ion has a positive charge, for example Na⁺, Mg²⁺ or Al³⁺.
Why do non-metals form negative ions?
Non-metal atoms have five, six or seven outer electrons, so they are only one to three short of a full shell. Their nuclei hold electrons strongly, so gaining a few electrons is easier than losing many. Once they have more electrons than protons they are negatively charged, such as Cl⁻, O²⁻ or N³⁻, and their names end in -ide.
What is the charge of an ion and how is it calculated?
The charge of an ion is the number of protons minus the number of electrons. A chloride ion has 17 protons and 18 electrons, so 17 − 18 = −1, written Cl⁻. A magnesium ion has 12 protons and 10 electrons: 12 − 10 = +2, written Mg²⁺. For the main groups, the charge also follows from the group number in the periodic table.
Do noble gases form ions?
Noble gases (group 0: helium, neon, argon and the others) already have full outer shells, so they almost never form ions in normal chemistry. Removing an electron takes a very large amount of energy, 2372 kJ/mol for helium, and adding one gives no extra stability. That is why they are called inert gases and exist as single atoms.
Try it yourself
Open the Molecule Builder and press ⚡ Simulation: how ions form in the Learn panel. Watch sodium's outer electron (a yellow cross) jump into the gap in chlorine's outer shell, then see the brackets and charges appear as Na⁺ and Cl⁻ pull together. Switch to Magnesium + oxygen to see two electrons move, and Magnesium + chlorine to see why the formula is MgCl₂. Then go to the Atom Builder, switch on Explore mode, and drag an electron out of an atom yourself to ionise it. To see what happens to ions in a melt or a solution, read electrolysis explained.
See it for yourself, in 3D and free.
Try it in the Ions & Ionic Bonding