Density functional theory calculations have been used to study the electronic structure of Mn-doped, Ni-doped, and Mn/Ni-codoped InSb and GaAs semiconductors. The ferromagnetic transition energy has been calculated using a multiscale method in which exchange interaction is calculated by the Hartree–Fock exact atomic method and is then included as a Hubbard parameter in calculation of the electronic structure of the material. The present calculation results demonstrate that, in all cases, there is hybridization of the impurity d states with the valence band of the host semiconductor. The contributions of the Ni and Mn dopants are approximately additive.