Rare-earth element R involved compounds RFe 12 have been getting more attention since they are theoretically predicted to have high magnetization and magnetocrystalline anisotropy energy which are superior to Nd-Fe-B. However, the thermodynamic instability of RFe12 structure leads to a difficult in synthesis the bulk materials. The present work attempts to analysis the effect of random mixing of multi-element at both R and Fe sites of RFe12 to investigate the influence of the high entropy alloys on the stability of compounds based on various special quasirandom structure (SQS) models for (Sm, X)(Fe12 -xMx ) (X=Zr, Ce, M=1-, 2-, 3-, 4- 5- component of Ti, Co, Mo, Cr, Ni, V, Si). Gibbs free energies are calculated from electronic structures and various finite temperature effects. We found that combing the configurational entropy and vibrational entropy, the stabilities of the RFe12 -based compounds are obviously improved by multi-element random mixing.