How it's calculated
sale = price × (1 − d), total = sale × (1 + t)
price = original price, d = markdown rate, t = sales-tax rate (as decimals), sale = discounted price, total = after-tax price. Reverse mode recovers the original: price = sale ÷ (1 − d).
Common questions
How does reverse mode work?
It takes the marked-down price and the discount percentage and divides back out to recover the original price.
Is tax added before or after the discount?
Tax is applied to the discounted price, matching the way US stores ring up sales.