Standard methods for determining the raw material content of compound feed are little exploited, except for the identification of meat and bone meal in feeds. In this work, near-infrared (NIR) spectroscopy and real-time polymerase chain reaction (PCR) were applied in order to establish new and fast methods for quantification of soybean meal content in compound feeds. The best prediction quality was achieved by using a model based on NIR spectroscopy (R2 = 0.9857, standard error of cross-validation 1.1065). Furthermore, a sensitive qualitative detection method by using the real-time PCR was developed (R2 = 0.976, slope -3.7599). Finally, the differences between the real-time PCR result and the NIR spectroscopy result for a given sample were also treated, and we found that the NIR spectroscopy method provided quite accurate results which approach closely those of the real-time PCR method.