A set of spectral endmembers can be used to model the spectral variability of an endmember in a hyperspectral image. Clustering analysis is used to group similar spectral endmember signatures into endmember classes. The resulting clusters are used to model the endmember variability in the image. In this paper, hierarchical, partitional and spectral clustering techniques are compared for endmember class extraction. Experimental results with test data and a full hyperspectral image are presented. Hierarchical clustering with complete and average linkage outperforms partitional and spectral clustering results. Validity indexes are compared for the estimation of the number of endmember classes. The Davies and Bouldin index, and the Kim index presented the best results for the estimation of the number of spectral endmember classes in the experiments presented.