Some examples of formula units are NaCl and BaO. These are the chemical formulas for table salt and barium oxide, respectively. Both are ionic compounds, forming crystals with many interconnected atoms. Formula units are the smallest basic unit of the crystal that maintains the chemical properties of the compound.
Not all materials made up of different kinds of atoms form distinct molecules. Ionic compounds and network solids form crystal lattices in which every atom in the structure is attracted to its neighbors, so that the entire piece forms a single mass. When describing these materials, formula units are used. Formula units are found by calculating the smallest electrically neutral form of the compound.