The energy required to separate electrons from an atom is known as ionisation energy. The difference between the energy when the electron is free and the electron energy level is the minimal energy required to detach the electron from the proton.