How to make efficient use of the limited energy of nodes so as to prolong the lifetime of the wireless sensor network(WSN) is an important problem. An energy efficient routing algorithm(EEA) based on clustering is presented. This algorithm uses clustering to reduce the number of nodes which join in researching route, which can reduce consumer energy. The improve route optimal degree is presented to evaluate the performance of the chosen route. Simulation results show that, compared with other algorithms, like ant colony optimization(ACO)-based routing algorithm(ARA) and EEAWSN, the proposed approach is able to keep away from the node with less residual energy, which can improve the life of networks.