Based on the traditional strip method, the five limit state performance functions of railway tunnel portal structure including compression, tensile, anti-overturning, anti-sliding and bearing capacity of foundation have been built in this paper. Then the partial factors and adjustment coefficients for each performance function have been determined through the target reliability index obtained from the calibration for railway tunnel general reference map and the design verification. In general, the calculation of the limit state of the tunnel portal structure and the reliability index are calculated by combining hand computation with MATLAB, ANSYS and EXCEL. This method has the disadvantages of low efficiency and poor practicability. So the software for calculating the tunnel portal structure based on the theory of limit state method has been developed by using Visual Basic, which has realized the function of calculating the reliability index and limit state of portal rapidly. Besides, the software has offered three methods to calculate the reliability index including JC method, quantile method and Monte-Carlo method. Moreover, the calculation results can be written to the EXCEL template file, which greatly improves the efficiency of calculating the tunnel portal structure. The accuracy of the software has been verified by comparing with the results of manual calculation.