Impurity threshold calculation

hello, I have this kind of question " how do you calculate the limit of impurity for drug products? how can you tell if it’s higher or in the normal range? I had this case that one FPP had total impurities - 5% and in stability data it was not exceeding 1 %. How can I calculate qualification limits, to tell what is allowable impurity number for any kind of product?
thank you in advance.