Skip to content
PosSwift

Margin and selling price calculator, with VAT

Last updated: 12 November 2026

Find the selling price of an item from its purchase price and the margin you want, or work out the margin left in a price you already charge. Markup, margin rate and coefficient, with Moroccan VAT at 20 %, 10 % or 0 %. The calculation runs in your browser; nothing is sent.

I know
Calculated on
VAT on the sale
Selling price excl. VAT
130,00 DH
VAT 20 %
26,00 DH
Selling price incl. VAT
156,00 DH
Margin (MAD)
30,00 DH
Markup (on cost)
30 %
Margin rate (on price)
23,08 %

Calculation: 100,00 DH × 1,3 = 130,00 DH HT → + 20 % = 156,00 DH TTC · Coefficient (price incl. VAT ÷ cost): 1,56

Markup or margin rate: the difference

Both start from the same margin in dirhams, excluding VAT. The markup compares it with the purchase price, the margin rate with the selling price. For the same item the margin rate is always the smaller number. In French these are the taux de marge and the taux de marque.

TermFormulaExample: bought at 100 MAD, sold at 125 MAD excl. VAT
MarginSelling price excl. VAT − purchase price excl. VAT125 − 100 = 25 MAD
Markup (taux de marge)Margin ÷ purchase price × 10025 ÷ 100 = 25 %
Margin rate (taux de marque)Margin ÷ selling price excl. VAT × 10025 ÷ 125 = 20 %
CoefficientSelling price incl. VAT ÷ purchase price excl. VAT150 ÷ 100 = 1.5 (20 % VAT)

Selling price from the purchase price

With a markup: selling price excl. VAT = purchase price × (1 + markup). With a margin rate: selling price excl. VAT = purchase price ÷ (1 − margin rate). Then add VAT: price incl. VAT = price excl. VAT × (1 + VAT rate).

Example: an item bought at 80 MAD excl. VAT with a 25 % markup sells at 80 × 1.25 = 100 MAD excl. VAT, so 120 MAD incl. 20 % VAT. With a 25 % margin rate it sells at 80 ÷ 0.75 = 106.67 MAD excl. VAT, so 128 MAD incl. VAT.

The margin in a price you already charge

Start from the price including VAT: price excl. VAT = price incl. VAT ÷ (1 + VAT rate), then margin = price excl. VAT − purchase price.

Example: an item sold at 150 MAD incl. 20 % VAT, bought at 100 MAD excl. VAT. 150 ÷ 1.2 = 125 MAD excl. VAT, so a 25 MAD margin: 25 % markup, 20 % margin rate.

If the selling price excl. VAT is below the purchase price, the margin is negative and the item sells at a loss. The calculator says so.

Markup ↔ margin rate conversion table

Margin rate = markup ÷ (1 + markup). The other way round, markup = margin rate ÷ (1 − margin rate).

MarkupMargin rateCoefficient excl. VAT
10 %9.09 %1.1
20 %16.67 %1.2
25 %20 %1.25
30 %23.08 %1.3
50 %33.33 %1.5
100 %50 %2

Where VAT fits in

Margin is worked out excluding VAT. The VAT you charge a customer is not income: it is declared and paid over, after deducting the VAT paid on purchases. That is why the calculator starts from the purchase price excluding VAT and adds VAT on the selling price.

If you cannot reclaim the VAT on your purchases, enter your purchase price including VAT as the purchase price. If you do not charge VAT, pick 0 %.

The VAT rate depends on the product and on your situation. For a specific case, check with your accountant or the tax authority (DGI).

Your new prices, then at the till with PosSwift

Once your prices are set, import your products into PosSwift from a CSV file and print their barcode labels. The sales and product reports show what sells. On the Pro plan, supplier invoices are recorded with VAT and stamp duty. The till runs on Android tablets and Windows PCs, even without internet.

  • Discover PosSwift

    Offline point-of-sale for Moroccan shops, in English, French and Arabic.

  • VAT calculator

    Excluding ↔ including VAT at the 2026 rates of 20 %, 10 % and 0 %.

  • Free barcode labels

    Name, price and an EAN-13 barcode, on thermal rolls or A4 sheets.

  • All free tools

    Credit book, VAT calculator, invoice and quote, labels.

◂ Back to home