The clustering problem has been studied by many researchers using various approaches, including tabu searching, genetic algorithms, simulated annealing, ant colonies, a hybridized approach, and artificial bee colonies. However, almost none of these approaches have employed the pure particle swarm optimization (PSO) technique. This study presents a new PSO approach to the clustering problem that is effective, robust, comparatively efficient, easy-to-tune and applicable when the number of clusters is either known or unknown. The algorithm was tested using two artificial and five real data sets. The results show that the algorithm can successfully solve both clustering problems with both known and unknown numbers of clusters. (C) 2011 Elsevier Ltd. All rights reserved.