How to check this calculation
Formula & conventions
Margin is a share of selling price, while markup is calculated on cost. Fees and taxes are user-entered percentages of sales; no tax rates are fetched. The result separates cost, profit and charges.
P = C / (1 − m − f − t)
Position origin: left edge or base indicated in the drawing.