Margin calculator: margin, markup and selling price
Enter your costs and choose whether you already know the selling price or want to hit a target margin. You see your margin, your markup and the price including VAT straight away.
Short answer
Margin = (selling price − cost) ÷ selling price × 100%. Markup = (selling price − cost) ÷ cost × 100%. If something costs 70 and you sell it for 100 excluding VAT, your margin is 30% and your markup 42.9%. Always calculate with amounts excluding VAT or sales tax.
Margin and markup calculator
Enter amounts excluding VAT or sales tax. Any currency works.
- Cost price
- 7,000.00
- Selling price excl. VAT
- 8,750.00
- Selling price incl. VAT
- 10,500.00
- Gross profit
- 1,750.00
- Margin
- 20.0%
- Markup
- 25.0%
Formulas for margin, markup and selling price
| What you want to know | Formula |
|---|---|
| Gross profit | selling price − cost |
| Margin | gross profit ÷ selling price × 100% |
| Markup | gross profit ÷ cost × 100% |
| Selling price for a target margin | cost ÷ (1 − margin) |
| Selling price for a target markup | cost × (1 + markup) |
Margin and markup describe the same gross profit but divide it by something different. Margin compares the profit with the selling price, markup with the cost. That is why, on a profitable sale, markup is always higher than margin.
Margin and markup are not the same
The most expensive mistake in a quote: adding 25% markup and thinking you make a 25% margin. Your margin is 20%. On annual revenue of 500,000 that is 25,000 less gross profit than you expected.
| Markup | Margin |
|---|---|
| 10% | 9.1% |
| 25% | 20% |
| 33.3% | 25% |
| 50% | 33.3% |
| 100% | 50% |
Worked example: a quote for an installation job
An installation company quotes for a 40-hour job. The example is fictional; the calculator above starts with these amounts.
| Item | Amount excl. VAT |
|---|---|
| Materials and purchases | 4,000.00 |
| Labour: 40 hours × 48 cost per hour | 1,920.00 |
| Subcontracting | 1,080.00 |
| Cost price | 7,000.00 |
| Selling price with 25% markup | 8,750.00 |
| Gross profit | 1,750.00 |
| Margin | 20% |
| Selling price incl. 20% VAT | 10,500.00 |
If the company really wants a 25% margin, the selling price becomes 7,000 ÷ 0.75 = 9,333.33 excluding VAT. That is a markup of 33.3%.
Watch the labour line: use the cost per hour (wages plus employer costs and non-billable time), not your hourly sales rate. Otherwise you count your profit twice. More on the right hourly cost in automating job costing.
Gross margin, net margin and profit margin
Gross margin is revenue minus the cost of sales, divided by revenue. That is what the calculator works out. Net margin is net profit divided by revenue: what is left after staff, premises, depreciation, interest and tax are paid as well. People use profit margin for either one, so say which you mean.
Which costs belong in the cost price? Everything you can link directly to a sale or project: purchases, materials, hours at cost, subcontracting and freight. Rent, office costs and marketing do not belong there; they reduce the net margin.
Getting your margin from your accounts
For the business as a whole, take the gross margin from the profit and loss account: (revenue − cost of sales) ÷ revenue over the same period. In Xero and QuickBooks Online the profit and loss report shows both lines, as long as your purchases are posted to cost of sales accounts rather than to overheads.
Margin per customer, product or project needs more: tracking categories, classes, projects or items in your bookkeeping, and often hours from another system. With DigiData you connect, for example, Xero or QuickBooks Online to your other software, and the financial dashboard recalculates your margin every day. How to watch margin per project while the work is running is covered in project controlling with AI.
Frequently asked questions
What is a good margin?
There is no fixed standard. A wholesaler runs on low margins and high volume, a consultancy on high margins and few purchases. Compare your margin with your own figures from last year and with businesses in the same sector, and look per product, customer or project for where the margin falls behind.
How do I convert markup to margin?
Margin = markup ÷ (1 + markup). A 25% markup gives 0.25 ÷ 1.25 = 20% margin. The other way round: markup = margin ÷ (1 − margin). For a 20% margin you need 0.20 ÷ 0.80 = 25% markup.
Do I calculate margin with or without VAT?
Without. VAT or sales tax is passed on to the tax authority and is not revenue. If you only have a price including VAT, divide it first, for example by 1.20 at a 20% VAT rate.
Is margin the same as profit?
No. Margin is gross profit as a percentage of the selling price, before fixed costs such as rent, office staff and marketing. Net profit is what remains after those costs are paid too.
Your margin, updated every day
Connect your accounting software to DigiData and see margin per month, customer and project without exports. 14-day free trial, cancel monthly.
See the financial dashboard