Sensor nodes in sensor networks often gather data and deliver them to the sink. However, the energy and radio range constraints force them to cooperate in transmitting the data to the destination with multihop communication. To achieve this, nodes have to be clustered and some of them are elected as the cluster head nodes to transmit the aggregated data. Unfortunately, the clustering brings extra traffic load to the cluster head nodes, particularly those closer to the sink. These nodes die faster than before as their energy is drained at a high rate. Therefore, some clustering and cluster head election algorithms were suggested to use the unequal clustering size to extend the lifetime of cluster head nodes. However, it is difficult to obtain the accurate cluster size in the process of unequal clustering. Moreover, some cluster head nodes with the overfull cluster members may die early. We propose an enhanced unequal clustering size algorithm to optimize the unequal cluster size in the different layers and balance the dissipation energy of all cluster head nodes. Simulation results show that our algorithm dissipates approximately the same energy of cluster head nodes in the different layers per round and obviously increases the number of rounds of data gathering and transmission.