Cheminformatics, and large databases of materials serve an increasingly important role in scientific research. An interesting observation has been made in databases of inorganic materials. The rule of four is the observation that the number of atoms in a primitive unit cell is commonly a multiple of four. A crystal structure may be thought of as a lattice with an attached motif. Repetition of the motif at every lattice point produces the ideal crystal structure. A primitive unit cell is one with exactly one lattice point, and therefore contains exactly one instance of the motif. The unit cell must have the same chemical composition as the crystal. Therefore, the motif must consist of an integer multiple of the formula unit otherwise known as the empirical formula A common way that Z can increase is modulation. An ideal structure is modulated positionally along one direction, with a period equal to twice the repeat distance of the ideal structure yields Z = 2 The number of atoms in a unit cell has no special reason to favour multiples of four. But Z on the other hand has strong preference for the values 1,2,4 This can be understood as inorganic structures are often modulations of ‘ideal’ higher symmetry structures. This combination leads to the observed rule of four.