A method for the quantitative analysis of trans fatty acids (TFAs) in cooked soybean oil using terahertz (THz) spectrum is developed. The THz spectra of three groups of soybean oil samples that were cooked at different temperatures for various times were measured using a terahertz time-domain spectrum system (THz–TDS) with frequency range of 0.2–1.5 THz. A partial least squares (PLS) regression model based on the whole THz spectrum was constructed to predict the TFAs content in the cooked soybean oil samples. To reduce noise and improve the prediction accuracy of the model, a subinterval PLS (sub-PLS) model based on a part of the THz spectrum was constructed. This sub-PLS had high accuracy in predicting the TFAs content in cooked soybean oil samples (R = 0.987 and RMSECV = 0.956).