There exists still the controversy over the stable structure of Laves-phase Co<sub>2</sub>(Hf Ta) alloys with the C14, C15 or C36 structures. In this study, the stability, electronic and thermodynamic properties of Laves-phase Co<sub>2</sub>(Hf Ta) are investigated. In order to fully understand the influence of magnetic state and temperature on phase stability, we systematically study the free energy change at finite temperature, elastic stability, and phonon dispersion. The low Curie temperature can be estimated, which suggests that the Co<sub>2</sub>(Hf Ta) alloys possess the paramagnetic state in a wide temperature range. Results indicate that the lattice vibration and electronic excitation have an important effect on the phase stability. The ground state of Co<sub>2</sub>Hf compound has a C14-type structure, while the ground state of Co<sub>2</sub>Ta has a C36-type structure, without the effect of temperature. After doping Hf with different concentrations (0.25, 0.50, 0.75) into Co<sub>2</sub>Ta, the most stable structure still possesses the C36-type structure. After considering the contribution of vibration entropy and electron entropy, the relatively stable structures of Co<sub>2</sub>Hf and Co<sub>2</sub>Ta undergo the C36 and C14 phase transition, respectively. In addition, the thermodynamic properties, including Debye temperature, heat capacity, and vibration entropy, which vary with pressure and temperature, are studied. The electronic properties of Co<sub>2</sub>Hf and Co<sub>2</sub>Ta compounds are analyzed by the charge difference and density of states. The similar electronic density of states between different phases suggest that the Lave phases have the similar stability. The Hf-Co bonding with a certain direction is revealed. Our results are of great significance in understanding the structure and properties of Co<sub>2</sub>Hf and Co<sub>2</sub>Ta compounds.