Ionic or Covalent? What Decides Which Happens

Author: codeplu.com
Last Updated: 17 Oct 2026
Est. Duration: 12 min
Skill Level: Beginner

Root Concept

When a metal meets a non-metal the metal’s outer electrons transfer across and the resulting oppositely charged ions attract one another in a giant lattice, but when two non-metals meet neither can give electrons up, so they share pairs instead and form separate neutral molecules.

CodePLU Goal

Upgrading Human Mental Models

Learn how to think in Workflows

Concept Playground
CodePLU logo

Concept Development By codeplu.com

Both routes start from the same meeting. Crossing the branches is the mistake worth making once.

One Meeting, Two Outcomes

Two atoms come near each other, and both have unfilled outer shells. The previous tutorials established why anything happens at all: an arrangement with filled outer shells is lower in energy, and systems settle into lower arrangements. What they did not settle is how the atoms get there, and there turn out to be two quite different answers depending on who has turned up.

If one of them is a metal, the route is transfer. Metals sit on the left of the periodic table with only one, two or three outer electrons, and losing those few is the short way to a filled arrangement. The non-metal, a few electrons short, takes them. Both end up charged — one positive, one negative — and opposite charges attract. That attraction is the ionic bond, and because every ion attracts every oppositely charged ion near it, the result is not a pair but a lattice extending in all directions.

If both are non-metals, transfer is not available. Neither has electrons to spare and both are short, so an electron moving across would simply swap the problem rather than solve it. The alternative is to share: each atom contributes one electron to a pair that sits between them and counts for both. Nothing has moved across, so nothing is charged, and the result is a discrete molecule rather than a lattice.

The playground runs both routes from the same starting point. Crossing them is the useful mistake, because it is the one that produces impossible substances.

What Decides Between Them

1

Why does a metal give its electrons away?

Because it has few to give and they are loosely held. A metal sits on the left of the table, so it has one, two or three outer electrons over a filled shell beneath. Losing those few exposes the filled shell underneath, which is the lower-energy arrangement, and it is a much shorter route than gaining five or six would be. The further left and the further down the table an element sits, the more loosely those outer electrons are held and the more readily this happens — which is the trend the periodic table tutorial described for group 1. Non-metals on the right have nearly full outer shells, so for them the short route runs the other way.

2

Why can two non-metals not do the same thing?

Because transfer would leave one of them worse off than it started. Consider two chlorine atoms, each with the arrangement 2,8,7 and each one electron short. If one handed an electron to the other, the receiver would reach 2,8,8 but the giver would drop to 2,8,6 and be two short instead of one. Nothing has been gained overall and energy has been spent. Sharing solves it properly: each contributes one electron to a pair sitting between the two nuclei, and both nuclei are attracted to that pair, so both count it towards a filled outer shell. The result is Cl₂ — read aloud, two chlorine atoms sharing a pair. Neither atom has given anything up, and both have what they needed.

3

Why is one a lattice and the other a molecule?

Because of what the attraction is attached to. An ion has a charge spread evenly all round it, so it attracts every oppositely charged ion in reach regardless of direction, and the structure keeps extending until it runs out of ions. There is no natural stopping point, which is why an ionic compound is a crystal rather than a collection of pairs and why NaCl is a ratio rather than a particle. A shared pair, by contrast, sits in one place between two particular nuclei and holds those two and nothing else. Once each atom has a filled outer shell the molecule is finished, and a second molecule nearby is barely attracted to the first — which turns out to matter enormously, and is the next tutorial.

4

Is the split really this clean?

No, and it is worth saying so rather than discovering it later. Bonding runs on a spectrum: a pair of electrons can be shared evenly, or shared unevenly because one atom attracts it more strongly, or pulled across completely. Ionic and covalent are the two ends of that range, and plenty of real compounds sit somewhere between them — hydrogen chloride shares a pair, but so unequally that it behaves as though charged. The two-category version is the right simplification at this level and predicts a great deal correctly. It is simply not a law of nature, and the honest phrasing for an in-between case is mostly ionic or mostly covalent.

Real World Example

Which bond forms can be predicted before anything is measured

Three Compounds, Read Off the Periodic Table

The rule is worth having because it is predictive. Knowing only where two elements sit, you can say which kind of substance they will make.

1

Step 1

Sodium and chlorine: a metal meets a non-metal

Sodium is a metal in group 1 with one outer electron; chlorine is a non-metal in group 7 and one short. Transfer settles both at once, giving Na⁺ and Cl⁻, and the opposite charges pull every ion towards its neighbours in all directions. The result is a cube-shaped crystal in which each sodium ion is surrounded by six chloride ions and vice versa, extending for as far as the crystal goes. Table salt under a hand lens really is a heap of tiny cubes, which is the lattice showing through at a scale you can see.

2

Step 2

Oxygen and hydrogen: two non-metals share

Oxygen is 2,6 and two short; hydrogen has one electron in a shell holding two. Neither is a metal, so nothing transfers. Each hydrogen shares its single electron with the oxygen and the oxygen shares one back, giving two shared pairs and leaving every atom with a filled outer arrangement. The product is one water molecule, H₂O, which is a real countable particle in a way that NaCl is not. Nothing is charged, and the molecule is complete — it does not keep growing the way a lattice does. That is why water can be counted a molecule at a time while salt can only be given as a ratio.

3

Step 3

Magnesium and oxygen: the same rule, bigger charges

Magnesium is a metal in group 2 with two outer electrons, and oxygen is two short, so one magnesium settles one oxygen exactly: Mg²⁺ and O²⁻, giving MgO in a one to one ratio. The charges here are twice those in sodium chloride, so the attraction holding the lattice together is far stronger, and magnesium oxide melts at about 2850 °C against salt’s 801 °C. Same kind of bond, same reasoning, and a melting point that differs by two thousand degrees because the charges are larger. The prediction of which bond forms came from the periodic table alone; the strength came from the size of the charges.

FAQs

Final Words

Two atoms meet with unfilled shells, and what happens depends on whether a metal is involved. A metal has few outer electrons and loses them readily, so with a non-metal the electrons transfer, both particles end up charged, and the opposite charges attract in every direction at once — producing a giant lattice rather than a pair. Two non-metals have no such option, because transfer would leave the giver worse off, so they share a pair instead, nothing is charged, and the product is a finished molecule.

What the attraction is attached to is the part worth keeping. A charge points nowhere in particular and builds a crystal; a shared pair sits between two specific nuclei and holds those two alone. It is also why the split is a spectrum rather than a wall. The next tutorial takes the consequence that catches most people out: why a substance made of strong covalent bonds can melt in your hand.