We develop a novel statistical approach for classifying generalists and specialists in two distinct habitats. Using a multinomial model based on estimated species relative abundance in two habitats, our method minimizes bias due to differences in sampling intensities between two habitat types as well as bias due to insufficient sampling within each habitat. The method permits a robust statistical classification of habitat specialists and generalists, without excluding rare species a priori. Based on a user-defined specialization threshold, the model classifies species into one of four groups: (1) generalist; (2) habitat A specialist; (3) habitat B specialist; and (4) too rare to classify with confidence. We illustrate our multinomial classification method using two contrasting data sets: (1) bird abundance in woodland and heath habitats in southeastern Australia and (2) tree abundance in second-growth (SG) and old-growth (OG) rain forests in the Caribbean lowlands of northeastern Costa Rica. We evaluate the multinomial model in detail for the tree data set. Our results for birds were highly concordant with a previous nonstatistical classification, but our method classified a higher fraction (57.7%) of bird species with statistical confidence. Based on a conservative specialization threshold and adjustment for multiple comparisons, 64.4% of tree species in the full sample were too rare to classify with confidence. Among the species classified, OG specialists constituted the largest class (40.6%), followed by generalist tree species (36.7%) and SG specialists (22.7%). The multinomial model was more sensitive than indicator value analysis or abundance-based phi coefficient indices in detecting habitat specialists and also detects generalists statistically. Classification of specialists and generalists based on rarefied subsamples was highly consistent with classification based on the full sample, even for sampling percentages as low as 20%. Major advantages of the new method are (1) its ability to distinguish habitat generalists (species with no significant habitat affinity) from species that are simply too rare to classify and (2) applicability to a single representative sample or a single pooled set of representative samples from each of two habitat types. The method as currently developed can be applied to no more than two habitats at a time.