Abstract Using density functional theory (DFT) methods, we have calculated ionization potential (IP) for K-shell single core hole (SCH) creation and double ionization potential (DIP) for K-shell double core hole (DCH) creation for XHmYHn (X, Y=C, N, O, F, m,n=0–3), NX2CXO (X=H or F) and C60. For these molecules, we estimated the relaxation energies (a measure of the electron density flow to the core-hole site) and the interatomic relaxation energies (a measure of the electron density flow to the two core-hole sites) from the calculated IPs and DIPs. For XHmYHn, we find that the interatomic relaxation energy for the DCH states having two holes at X and Y atoms decreases with the increase in the bond order between X and Y. For NX2CXO (X=H or F), we find that the substitution of the hydrogen atoms by the fluorine atoms affects the initial-state-bonding shifts but less influences the relaxation energy. For DCH states having two holes at two carbon atoms in C60, we find that the interatomic relaxation energy decreases with the increase in the hole–hole distance.