In recent years, the Internet of Things (IoT) has evolved as a research field that transforms human lifestyle from traditional to sophisticated. In IoT, the network plays a crucial role in collecting data from sensors and moving to the sink. Increasing the network lifetime is a challenging task in IoT, which is connected to devices that are limited by resource. Clustering is one of the effective methods of increasing the network lifetime. However, improper cluster head (CH) selection easily drains the energy early in network nodes. With the aim to overcome the issue, this paper proposes the Type-2 Fuzzy Logic-based Particle Swarm Optimization (T2FL-PSO) algorithm to select the optimal CH to extend the network lifetime. The T2FL is highly useful in providing the accurate solution in uncertain network environments. Hence, T2FL is applied on the network parameters, residual energy, and the distance between sensor node and base station to determine the fitness value. Later, virtual clusters are formed on the basis of distance between sensor node and CH and between node and base station. To validate the performance of the proposed T2FL-PSO algorithm, extensive simulations are carried out using MATLAB 2019a. Furthermore, the proposed T2FL-PSO algorithm is compared with Particle Swarm Optimization Clustering (PSO-C) and Particle Swarm Optimization Wang Zhang (PSO-WZ). The result confirms that the proposed T2FL-PSO increases the network lifetime by 10%-15% and the packet transmission ratio by 10%. Compared with similar algorithms, the proposed T2FL-PSO also causes a higher increase of network lifetime.