An integrated approach combing density functional theory (DFT) and machine learning algorithm (MLA) is proposed here to obtain the molar heat capacities and entropies of diatomic macroscopic gasses with high quality. The DFT approach takes care of the main physical effects, while machine learning takes care of the intricate details it leaves out. After machine learning algorithm correction, a complete set of accurate prediction of vibrational energy spectrum is obtained, which is better than the results of DFT methods in accuracy. And then it is used to replace the vibrational part in the ro‐vibrational energy calculated by DFT to obtain the rectified ro‐vibrational energy. Furthermore, through the quantum ensemble theory, the thermodynamic properties of the macroscopic gas are calculated by the predicted ro‐vibrational energy spectrum, and are modified again by the machine learning algorithm. The study of the HCl and HBr system show that, compared with CCSD(T)/cc‐pV5Z and the improved variational algebraical method, the macroscopic thermodynamic properties calculated by this work in the temperature range of 300–6000 K are the closest to the experimental values. The relative error is less than 1% at each temperature.