AbstractA model for calculation of the ground and excited state energies, single and double electron affinities and ionization potentials of a many‐electron system confined in a cavity with a finite boundary potential is presented. Additional integrals of explicitly correlated Fock‐space coupled‐cluster method are calculated numerically with the use of conventional Gaussian basis sets on the same type of fine grids as those used for one‐electron integrals, which represents a rational and efficient tool for modeling confined systems. The method is verified by an example of H, He, and LiH systems with spherical potential and applied to describing a representative set of diverse spin and orbital states of molecule and its ions. As the size of the system and so the total number of the basis functions are increased, the accuracy of predictions also increases. In the case of , the internuclear distance is shown to be shortened with the increase in the potential wall height, while the energy differences between , , and states change only slightly. Critical cavity radii are determined, which correspond to the spontaneous ionization of and the loss of an excess electron by .