Chat with our AI personalities
The only practical reason to calculate the discount is as an intermediate step in determining the new price.
That means that there is a discount (a price reduction, compared to the "official" price), and that this reduction is calculate as a percentage of the total price.
The discount must be calculated first to get the base price of the item, then the tax percentage would be taken into consideration, otherwise you would be charging additional tax on an item which should be discounted in the first place. If you were to calculate tax first then the discount price, your total would be incorrect.
Cp = sp/d
The quickest way is to multiply the full price by 0.2 That is the amount of the discount.