Many shop owners and buyers confuse margin with markup. Someone adds 40% to the cost and believes they are earning a 40% margin. The difference is not cosmetic: it changes the price and the profit, and it leaves the sales reports and the pricing sheets speaking two different languages inside the same business.
The calculator uses the CIMA Official Terminology. Margin is profit divided by the selling price; markup is profit divided by cost. If you know your target margin, the selling price is the cost divided by one minus the margin. If you know the markup, the price is the cost multiplied by one plus the markup. VAT is then added on the net selling price: 15% in Saudi Arabia and 5% in the UAE.
In the default example the unit cost is 60 and the target margin is 40%. The price before VAT is 100 and the profit is 40 per unit. The markup that matches this margin is 66.67%, not 40%. With 15% VAT the tax is 15 and the customer pays 115. Had you simply added 40% to the cost, you would sell at 84 and your actual margin would be 28.57%.
Use margin when you compare your profitability with competitors or industry reports, which usually quote margin on sales. Use markup when you price a long list of items quickly from purchase invoices. VAT is never part of your margin, because you collect it on behalf of the tax authority, so do not work out profit on the VAT-inclusive price. The third option, a known price, helps when the market sets the price and you want to see how much of it you keep.
A frequent mistake is using the purchase price alone and leaving out freight, customs clearance, packing and payment gateway fees, which produces a margin you never see in the bank. This is also the gross margin per unit, not the company's net profit: rent, salaries and marketing all have to come out of it. If the loss warning appears, the price is below cost. That can be fine for a short promotion, as long as it is a deliberate choice and not a calculation error.