Margin and selling price calculator
Start from the cost excl. VAT and the target margin, or from your selling price: the calculator gives the price excl. and incl. VAT, the margin, the markup rate, the margin rate and the coefficient.
Purchase price excl. VAT and directly related costs (transport, packaging…).
You will find this calculation pre-filled in the BILLX editor: nothing is saved or issued until you confirm. If you have no account, sign-up is free and the calculation will be waiting for you.
The calculation runs in your browser: nothing you enter is sent or stored.
Markup rate or margin rate?
Gross margin is the difference between the selling price excl. VAT and the cost price excl. VAT. The markup rate relates it to cost: margin ÷ cost. The margin rate relates it to the selling price: margin ÷ selling price excl. VAT. For the same margin, the markup rate is always higher than the margin rate: do not mix them up in your quotes.
The formulas
With a markup rate: price excl. VAT = cost × (1 + rate). With a margin rate: price excl. VAT = cost ÷ (1 − rate). With a coefficient: price excl. VAT = cost × coefficient. Price incl. VAT = price excl. VAT × (1 + VAT rate).
Example
Cost price: 100.00 MAD excl. VAT, target markup rate: 25%. Selling price: 125.00 MAD excl. VAT, giving a margin of 25.00 MAD, a margin rate of 20% and a coefficient of 1.25. With 20% VAT: 150.00 MAD incl. VAT.
What about VAT?
VAT charged to the client is paid over to the State (after deducting VAT on your purchases): it is not part of your margin. Always reason excl. VAT, then add the VAT applicable to the transaction (CGI, art. 99).
Sources
Rules verified on 01 Nov 2026. Calculation aid: the result is an estimate that depends on your situation; it does not replace advice from an accountant or the tax administration.
Your prices, in a catalogue that is always right
Save your products and services with their price excl. VAT in BILLX: they appear on your quotes and invoices in one click, with the right VAT.
Other calculators
- Morocco VAT calculatorExcl. ↔ incl. VAT, multiple lines, totals by rate (20%, 10%, exempt, out of scope).
- Auto-entrepreneur simulatorTax on turnover collected, ceiling, 80,000 MAD per-client rule.
- Freelance daily rateDaily rate based on target income, expenses, billed days and tax scheme.
- VAT collected and deductibleVAT to pay or credit to carry forward for your monthly or quarterly return.
- Quote profitabilityQuote margin after discount and costs, break-even point, suggested price.