Magnesium (Mg) alloys, especially high-modulus Mg alloys, are catching more and more attention for their excellent performance. Doping rare earth elements (RE) and then generating hard intermetallic is one of the popular ways to strengthen the Mg alloys. As an important intermetallic , Mg 24 RE 5 is rarely investigated. In this work, we comprehensively investigate the structural, mechanical, and thermodynamic properties of Mg 24 RE 5 by first-principles calculations. The accuracy of our results is confirmed by comparing with limited previous results. All Mg 24 RE 5 are energy-stable, mechanically stable, and dynamically stable. The lattice constant is almost linear with the ionic radii of the corresponding RE elements. Mg 24 Y 5 shows the largest Young's modulus (54.6 GPa), followed by Mg 24 Lu 5 and Mg 24 Tm 5 , while Mg 24 Sm 5 and Mg 24 Gd 5 show the lowest anisotropy. Moreover, we calculated the thermodynamic properties for all Mg 24 RE 5 and obtained the critical temperature for heat capacity . All in all, this work provides plentiful fundamental data for designing RE-containing Mg alloys.