The internal rate of return method is currently an important analysis tool for economic feasibility evaluation of engineering project. Against the disadvantages of general methods to calculate internal rate of return, such as big calculation amount, slow speed and low result precision, the calculation of internal rate of return in engineering project was equivalently derived into an optimization problem. Then particle swarm optimization algorithm and ant colony optimization algorithm were applied to pursuit the optimal solution. A hydraulic engineering project was taking as an example and the analysis results indicated that the two methods used in the paper were simple, effective and precise, which can be extensively used in engineering projects.