Availability of a low-energy, high current electron gun delivering a well-focused spot on the sample is essential for the inverse photoelectron spectroscopy. We have optimized an electron gun to obtain the maximum beam current at all electron kinetic energies of relevance with a reasonably small focus spot. Here we present the design, the procedure for the optimization, as well as the resulting characteristics of the electron gun