Deposition of atoms or molecules on a solid surface is a flexible way to prepare various novel two-dimensional materials if the growth conditions, such as suitable surface and optimum temperature, could be predicted theoretically. However, prediction challenges modern theory of material design because the free energy criteria can hardly be applied to this issue due to the long-standing problem in statistical physics of the calculations of the free energy. Herein, we present an approach to the problem by the demonstrations of graphene and γ-graphyne on the surface of copper crystal, as well as silicene on a silver substrate. Compared with previous state-of-the-art algorithms for calculations of the free energy, our approach is capable of achieving computational precisions at least 10-times higher, which was confirmed by molecular dynamics simulations, and working at least four orders of magnitude faster, which enables us to obtain free energy based on ab initio calculations of the interaction potential instead of the empirical one. The approach was applied to predict the optimum conditions for silicene growth on different surfaces of solid silver based on density functional theory, and the results are in good agreement with previous experimental observations.