In this paper we present and study a clustering technique based on genetic algorithms -- Clustering Genetic Algorithm. Performance of the algorithm is demonstrated on experiments. We have shown that it outperforms the k-means algorithm on some tasks. In addition, it is capable of optimising the number of clusters for tasks with well formed and separated clusters.