Conventional foundation bearing capacity calculation is based on Mohr-Coulomb linear failure criterion. But it is verified that almost all kinds of rock's strength envelope is nonlinear with normal stress through tests and is in compliance with modified Hoek-Brown nonlinear failure criterion. Therefore, program is composed by using Matlab software and nonlinear Sequential Quadratic Programming method to calculate bearing capacity and analyze its affect factors according to the upper limit theory of limit analysis adopting Hoek-Brown nonlinear failure criterion and multi-tangential method. The result shows that the main affect factors of rock foundation's bearing capacity are GSI and mi of the rock, however, the dead weight γ,over load q and excavation disturbance coefficient D affect the bearing capacity largely when GSI is small; after comparison with formers’ research, it is found that the bearing capacity is overestimated and having greater risk by using “single-tangential method” while the “mufti-tangential method is more rigorous in theory and whose result is more close to the actual value and more applicable.