The wireless sensors that make up a wireless sensor network (WSN) are randomly deployed in nature and cannot be artificially replaced when their batteries are depleted. Failure of communication connection between wireless sensors causes continuous connection attempts, which results in a lot of power dissipation and shortens the lifetime of the WSN. In this paper, we propose to extend the lifetime of WSNs by limiting the appropriate distance between the cluster head (CH) node and the communicating sensor nodes (SNs) so that a group of clusters of appropriate size can be formed on a two-dimensional plane. To equalize cluster size, sensor nodes with the shortest distance communicate with each other to form member nodes, and nodes with closer distances are bring together to form clusters. The simulation results show the improvement rate of cluster uniformity over the shortest distance-based clustering method for clustering based on the proposed cluster uniformity algorithm. The proposed method can improve the cluster uniformity of the network by about 20%. In addition, the power consumption of the proposed method is analyzed according to the difference in the density of sensor nodes in the cluster groups to examine the improvement in power consumption.