We report the effects of lattice dynamics on the thermodynamic stability of binary R 1−x Fe x (0 < x < 1) compounds (R: rare-earth elements, Y, Ce, Nd, Sm, and Dy) at finite temperature predicted by first-principles calculation based on density functional theory (DFT). We first demonstrate that the thermodynamic stability of R 1−x Fe x (0 < x < 1) alloys cannot be predicted accurately by the conventional approach, where only the static DFT energy at T = 0 K is used. This issue can be overcome by considering the entropy contribution, including electronic and vibrational free energies, and we obtained convex hull plots at finite temperatures that successfully explain the thermodynamic stability of various known compounds. Our systematic calculation indicates that vibrational entropy helps stabilize various R 1−x Fe x compounds with increasing temperature. In particular, experimentally reported R 2Fe17 compounds are predicted to become thermodynamically stable above ~ 800 K. We also show that thermodynamic stability is rare-earth dependent and discuss its origin. Besides the experimentally reported structures, the stability of two new monoclinic RFe12 structures found by Ishikawa et al. [Phys. Rev. Mater. 4, 104408 (2020)] based on a genetic algorithm are investigated. These monoclinic phases are found to be dynamically stable and have larger magnetization than the ThMn12-type RFe12. Although they are thermodynamically unstable, the formation energies decrease significantly with increasing temperature, indicating the possibility of synthesizing these compounds at high temperatures.