This paper introduces a novel approach for estimating the numbers of endmembers in hyperspectral imagery. It exploits the geometrical properties of the noise hypersphere and considers the signal as outlier of the noise hypersphere. The proposed method, called outlier detection method (ODM), is automatic and non-parametric. In a principal component space, noise is spherically symmetric in all directions and lies on the surface of a hypersphere with a constant radius. Reversely, signal radiuses are much larger that noise radius and vary in all directions, thus signal lies in a hyperellipsoid. The proposed method involves three steps: 1) noise estimation; 2) minimum noise fraction transformation; and 3) outlier detection using inter quartile range. Estimation of the number of endmembers is accomplished by the estimation of the number of noise hypersphere outliers using a robust outlier detection method. The ODM was evaluated using simulated and real hyperspectral data, and it was also compared with well-known methods for estimating the number of endmembers. Evaluation of the method showed that the method produces robust and satisfactory results, and outperforms in relation to its competitors.