When atoms are brought together to form molecules or solids the change in the kinetic energy of the core electrons can be an order of magnitude larger than the change in total energy. In spite of this, pseudopotential methods, which neglect the redistribution of the core electrons, give results very close to the fully self-consistent results. We explain this apparent contradiction by showing that the correction to the frozen-core approximation, an approximation used implicitly in a pseudopotential calculation, vanishes to first order in the charge-density differences and we give a closed formula for the second-order correction. The cancellation of large errors involved in the frozen-core approximation is demonstrated for valence-electron configuration changes in several free atoms and for a bcc to fcc transformation of Mo. In all cases the frozen-core approximation makes an error of less than 5% in the energy of transformation, and the second-order correction formula accurately reproduces this error. © 1980 The American Physical Society.