Think of the formula unit as an “ionic molecule”.
are formed when positively charged ions, or cations, and negatively charged ions, or anions, are bonded together by the electrostatic force of attraction and held in giant lattice structures.
Since the cations and anions are stuck together in this giant structure, you can’t say that you’re dealing with molecules.
Instead you get formula units. A formula unit is the smallest whole number ratio that exists between the cations and anions that form an ionic compound.
For example, sodium chloride, ##NaCl##, is formed when sodium cations, ##Na^(+)##, are to chloride anions, ##Cl^(-)##.
These ions come together to form a lattice structure that looks like this
As you can see, the ions are distributed in a ##1:1## ratio, with each sodium cation being surrounded on all sides by chloride anions and vice versa.
Each unit cell contains an equal number of sodium cations and an equal number of chloride anions.
This means that the formula unit of sodium chloride, i.e. the empirical formula that best describes this ionic compound, is ##NaCl##.
So, as a conclusion, you can think of the formula unit as being for (and for that form covalent networks) what a molecule is for .