Sodium has three orbits and potassium has four orbits. Lesser the distance of orbits from the nucleus, higher the energy is required to remove the outermost electron, and vice-versa. Therefore, more energy is required to remove an electron from sodium than from potassium. Hence, the ionization energy of sodium is higher.