Genetic algorithm (GA) is used for the optimal design of shell-and-tube heat exchangers due to the fact that traditional designs for shell-and-tube heat exchangers are complicated and uneconomical. To optimize the design of heat exchangers, mathematical models are established and the total costs are used as the objective function. Taking advantage of GA’s intelligent and multi-searching characteristics, researchers continuously iterate optimization variables and then obtain the minimum objective function of the design results within the optimal variable values and constraints. Two practical heat exchangers are used to test the research results. The Optimization results show that the optimized total costs have decreased by 18.2% and 7.98% respectively, which can also satisfy the heat transfer performance. Moreover, the results show that the design based on GA for shell-and-tube heat exchangers can significantly improve the economic efficiency of heat exchangers and thus can be applied to engineering practice.