Lattice energy is the energy change when an ionic compound is separated into its gaseous ions. It is given in units of kilojoules per mole. For example, when solid sodium chloride is separated into gaseous sodium and chlorine ions (), the lattice energy is 786 kJ/mol.