In order to obtain chemical insight from shifts in core-ionization energies, Delta I, it is often desirable to separate the initial-state contribution, Delta V, from that caused by relaxation in the final state, Delta R. These quantities are related through Delta I = Delta V-Delta R. Whereas the chemical shift itself, Delta I, may be measured very accurately, the scope of the present contribution is to provide a tool for accurate quantification of the initial-state contribution Delta V to the measured shift. Common procedures of estimating Delta V either from Hartree-Fock orbital energies or from electrostatic potentials at nuclear positions are examined. Whereas orbital energies suffer from the neglect of valence-electron correlation, the use of electrostatic potentials does not take proper account of the finite extension of core orbitals. In order to circumvent both of these problems, a reformulation valid for any valence-correlated wave function is presented for V, the energy needed to remove a core electron without relaxation of spectator electrons. The resulting expression may be seen as an extension of Koopmans' theorem, and reduces to the former in the case of a Hartree-Fock wave function. This extended Koopmans' theorem is used to compare initial-state effects in X-ray photoelectron spectra for a set of simple hydrocarbons. (C) 2000 Elsevier Science B.V. All rights reserved.