In this paper, determinate beam and indeterminate beam with multiple span are optimized by using genetic algorithm, the mathematic model of optimize beam is built and the processing method of constraint conditions is given. The examples show that the algorithm could be used for optimizing determinate structure, and also optimizing indeterminate structure. Compared to the linear approximation method, genetic algorithm has advantages of being simple, easy, fast convergence and has no use for changing the objective function and constraint conditions to linearity or other processing. Its results agree with linear approximation method’s. It is the other method that can be adopt in engineering field.