In this study, a quantitative risk assessment methodology is developed for gas leakage and explosion accident consequences inside residential buildings. Meanwhile, the effective risk reduction measures are also proposed. The gas leakage and dispersion behavior is firstly analyzed to provide a real initial scenario for the subsequent explosion simulation using CFD code FLACS. And then, the explosion consequences with a real inhomogeneous flammable gas cloud are accurately predicted. Based on the probit model, the probabilities of different adverse impacts (i.e., eardrum rupture, lung damage and head impact) caused by gas explosion accidents are estimated, respectively. Combining the probability with the consequence severity scores, a risk-based concept is adopted to calculate the explosion risk index at any region of residential buildings. Meanwhile, the higher risk index among these adverse impacts is chosen at each grid point. In addition, a grid-based concept and isoline are further used to represent this explosion risk index. Furthermore, the effects of vent area ratio and broken pressure of glasses are investigated to propose the effective risk reduction measures. This methodology is applied to a typical residential building, located in Harbin, China. The results show that the explosion consequence severity at any region of residential buildings could be presented quantitatively. In addition, the risk region distribution of gas explosion inside residential buildings could be also identified. Furthermore, the minimum vent area ratio and the maximum broken pressure of glasses could be recommended to reduce gas explosion risk index. This study provides an effective analysis method and contributes to develop safety measures and improve the emergency response plans for gas leakage and explosion accidents inside residential buildings.