The gender identification of silkworm pupae is a critical step in the sericulture industry's breeding process. In this study, a low cost, short-wavelength (815-1075 nm) near infrared (NIR) spectrometer combined with multivariate spectra evaluation methods was used to establish calibration models for the on-line identification of female and male pupae of eight silkworm varieties (Hibiscus, Jingsong, 932, Xiang Hui, 7532×Xiang Hui, Haoyue B, Jingsong B, and 7532). The diffuse reflection short-wavelength spectra were recorded, and then principal component analysis (PCA), linear discriminant analysis (LDA), and partial least squares discriminant analysis (PLSDA) were tested for calibration model development. The PCA and LDA results showed, that spectral differences between the female and male silkworm pupae existed, however, the two evaluation techniques could not separate the female and male silkworm pupae with the required accuracy. The PLSDA calibration models, on the other hand, could separate the pupae according to their gender with the necessary prediction accuracy of >98.44%. Thus, it has been proved, that a low-cost, short-wavelength range NIR spectrometer in combination with a PLSDA calibration routine can be successfully applied for the reliable on-line identification of female and male silkworm pupae.