Determination of the bearing capacity of foundations is one of the important issues in foundation engineering, particularly for important structures and weak foundations. Compared to the soils, the bearing capacity of rock mass foundations is higher, and it has a higher strength. However, the bearing capacity of the rock mass is largely based on rock mass quality and conditions as well as characteristics of its discontinuities. In designing shallow foundations on rock masses, the bearing capacity is estimated and determined based on mechanical behavior, rock mass strength, and deformability. The bearing capacity of rock foundations is often determined without taking the effect of seismic loads into account. However, due to the reduced seismic loads, the shallow foundations' bearing capacity is reduced due to the nature and type of the rock. Furthermore, the settlement and rotation are increased in footings. In the present study, the bearing capacity of rock masses in static and seismic conditions was numerically investigated in a quasi-static mode using FLAC 2D software, and the results were compared with those of an analytical method. According to the results, the quality and type of rock greatly affect the static and seismic bearing capacity of rock foundations. The reason is that the bearing capacity significantly increases by rising the geological strength index (GSI) and enhancing the rock mass quality. The numerical results show that the bearing capacity decreases as a result of an increase in the horizontal acceleration coefficient, while it increases as GSI and mi values increase. Moreover, the ultimate seismic bearing capacity is significantly decreased by increasing the horizontal acceleration coefficient.