The Colle–Salvetti method for calculating the correlation energy [Theor. Chim. Acta 37, 329 (1975)] is generalized to treat cases in which the reference function not a Hartree–Fock one, but a many-determinant wave function. Through calculations on atoms and diatomic molecules it is shown that this generalized approach gives the ‘‘experimental,’’ non-relativistic electronic energy at a millihartree level of accuracy also for internuclear distances far from the equilibrium positions.