Accurate calculation of inner-shell ionization