A sensitive, precise and accurate method was developed to screen and quantify triterpenoids based on ultra-performance liquid chromatography–photodiode array–quadrupole time-of-flight mass spectrometry (UPLC–PDA–QTOF–MS). An exact neutral loss scan of 62.0004Da (CH2O3) was used to selectively detect triterpenoids in Poria cocos, followed by a survey scan for exact masses of precursor and fragment ions of these triterpenoids. The developed method was applied to quantify seven major triterpenoids in 40 P. cocos samples of different origins within 18min, and a total of 31 triterpenoids were unequivocally or tentatively identified. Principal component analysis of these samples showed a clear separation of three groups, and ten triterpenoids play key roles in differentiating these samples were obtained from the OPLS-DA variable influence on projection (VIP) plot and then unequivocally or tentatively identified. The developed method can be applied for rapid bitterness evaluation, quality control and authenticity establishment of P. cocos.