The satellite and hypersatellite of K X-rays resulted from additional vacancies in L-shell and M-shell for Kr and Xe atoms have been calculated systematically by using the multiconfiguration-Dirac–Fock (MCDF) method, in which the Breit interaction, QED corrections are also considered. The present calculations for diagram lines are in good agreement with available previous results. It is found that the number of spectator vacancies in L shell varies nearly linearly with the energy shifts of both K X-ray satellites and hypersatellites for Kr and Xe atoms. While an additional M shell hole has nearly no effect on the Kα energy shifts in comparison with the small but evident energy shifts of Kβ lines. The simulated spectra based on our results show a good agreement with the current experimental spectra at Heavy-ion Research Facility (HIRFL) in Lanzhou. The results of this paper will be helpful in further interpretation of various K X-ray spectra and better understanding of the collision processes.