The existence of pores is a very common feature of nature and of human life, but the existence of pores will alter the mechanical properties of the material. Therefore, it is very important to study the impact of different influencing factors on the mechanical properties of porous materials and to use the law of change in mechanical properties of porous materials for our daily lives. The SBFEM (scaled boundary finite element method) method is used in this paper to calculate a large number of random models of porous materials derived from Matlab code. Multiple influencing factors can be present in these random models. Based on the Monte Carlo simulation, after a large number of model calculations were carried out, the results of the calculations were analyzed statistically in order to determine the variation law of the mechanical properties of porous materials. Moreover, this paper gives fitting formulas for the mechanical properties of different materials. This is very useful for researchers estimating the mechanical properties of porous materials in advance.