Free tool · Updated July 2026
Margin Calculator
Enter any two of cost, revenue, profit, margin and markup and the rest are solved instantly. Set prices from a target margin, see the VAT-inclusive shelf price, and compute the three company margins.
Fill in any two fields and the other three are calculated. The last two fields you edit are treated as the inputs.
Solved figures
Your selling price (ex VAT)
Shelf price (incl VAT)
The three margins
Margin and markup are not the same number
More money is lost to this confusion than to any other pricing mistake. Margin is profit as a share of the selling price. Markup is profit as a share of the cost. Same profit, same transaction, two different percentages, because they divide by different things.
Markup = Profit / Cost x 100
Buy for €60, sell for €100, and your profit is €40. That is a 40% margin (40 out of 100) but a 66.7% markup (40 out of 60). The relationship is fixed and worth memorising in outline: a 25% markup gives a 20% margin, a 50% markup gives 33.3%, a 100% markup, the keystone pricing that doubles cost, gives exactly 50% margin. Markup is always the bigger number, and the gap widens as prices rise. The danger runs in one direction: a trader who wants a 30% margin and gets it by adding 30% to cost has actually earned a 23.1% margin, and across a year of sales the missing seven points are the difference between a business that works and one that quietly does not. The solver tab above shows both figures side by side on every calculation precisely so the two can never be swapped unnoticed.
Enter any two figures and the rest follow
Cost, revenue, profit, margin and markup are five views of one transaction, and any two of them determine the other three. That is the whole logic of the first tab: type the two you know, in any combination, and the solver fills in the remainder. A wholesaler who knows cost and target revenue reads off margin and markup. A shop that knows an item's margin and the profit it needs per unit reads off the price to charge. An accountant checking a client's claimed 35% margin against a known cost sees instantly what the revenue must have been.
One combination deserves its note: margin and markup together fix no euro amount. They are both ratios of the same two numbers, so telling the solver 20% margin and 25% markup is telling it the same fact twice. Add any one of cost, revenue or profit and the whole picture snaps into place.
Setting a price from a target margin
Pricing from cost is where the divide-or-multiply distinction earns real money. To hit a target margin, divide the cost by one minus the margin:
A product costing €140 priced for a 30% margin sells at 140 / 0.70 = €200, giving €60 of profit, and 60 / 200 checks out at 30%. Multiplying €140 by 1.30 instead gives €182, which delivers a 23.1% margin while the spreadsheet says 30%. The price setter tab applies the correct formula for whichever target you choose, and shows margin and markup together on the result so the check is automatic.
The VAT trap: margin is earned on the net price
In Ireland this is the second great margin error, and it is expensive. Shelf prices include VAT, but the VAT belongs to Revenue, not to you, so margin must be calculated on the price excluding VAT. A boutique selling a dress at €123 that cost €60 does not have a €63 gross profit. Strip the 23% VAT and the net price is €100, the profit is €40 and the margin is 40%, not 51%. Price from the gross figure and every margin in the business is overstated by the VAT rate.
The price setter tab handles this end to end: it prices your target margin on the net figure, then shows the VAT-inclusive shelf price beside it at 23%, 13.5% or the 9% rate that applies to hospitality food since July 2026. For the reverse journey, from a shelf price back to the net, the remove function on our VAT calculator is the companion tool, and the rates guide settles which percentage applies to what you sell.
Gross, operating and net margin: the three altitudes
A single product has one margin. A company has three, and they answer different questions. Gross margin is revenue minus the direct cost of what was sold, divided by revenue: it measures whether the core trade of buying and selling makes sense before anything else is paid. Operating margin subtracts the running costs, rent, wages, insurance, light and heat, and measures whether the business as an operation works. Net margin subtracts everything else, interest and tax included, and measures what the owner actually keeps from each euro of sales.
The company tab computes all three from four inputs, and the shape of the three numbers is often more informative than any one of them. Healthy gross margin with a weak operating margin points at overheads, not pricing. Thin gross margin points at buying or pricing, and no amount of cost control downstream fixes it. Benchmarks vary enormously by sector, and comparing across sectors is meaningless: grocery retail runs net margins in low single digits and thrives on volume, hospitality typically needs gross margins around 65 to 70% on food to survive its labour costs, and software carries gross margins above 80% because reproduction costs almost nothing. The useful comparison is always against your own sector and your own last year.
What discounting does to a margin
Every discount comes straight out of the margin, which makes the exchange rate between the two worth knowing before any sale is announced. At a 30% margin, 10% off removes a third of the profit per unit, and holding total profit steady requires selling 50% more units. At 15% off it requires double. At 20% off, a 30%-margin business is working for a third of its former profit on every sale and needs to triple volume to stand still. Few promotions clear that bar; the ones that do usually clear it through basket effects, new customers who return at full price, or stock that would otherwise be written off entirely. Run the promotion arithmetic from the shopper's side with our discount calculator, then from your side with the solver above, and let the pair of results decide.
Margin as a language
Beyond pricing, margin is how businesses talk to banks, buyers and each other. Lenders read declining gross margin as a buying or pricing problem long before losses appear. Trade buyers negotiate in margin points, and knowing that a supplier asking you to hold retail price while raising cost by 5% is asking for several points of your margin turns a vague squeeze into a number you can push back on. Accountants reviewing a set of figures test them with exactly the identities this calculator uses: if the claimed margin, the cost of sales and the revenue on a page do not solve to the same transaction, something on the page is wrong. Five numbers, two of which imply the rest. Keep the two you trust, and let the arithmetic tell you the truth about the others.
Contribution margin and the break-even question
One more margin deserves a seat at the table because it answers the question owners actually lose sleep over: how much do we need to sell to cover the fixed costs? Contribution margin is the selling price minus the variable cost of one unit, the amount each sale contributes toward rent, wages and everything that gets paid whether you sell or not. Divide the fixed costs by the contribution per unit and you have your break-even volume.
A coffee cart selling cups at €4 with €1.20 of variable cost contributes €2.80 per cup. Against €2,800 of monthly fixed costs, break-even is exactly 1,000 cups a month, or around 38 a day. Every pricing decision can be re-read through this lens: a price rise of 20 cent lifts the contribution to €3 and drops break-even to 934 cups, while a 10% discount cuts contribution to €2.40 and pushes break-even to 1,167. The same fixed costs, three very different mountains to climb. The company tab above gives you the margin percentages; the break-even division is one line on the back of an envelope once you have them.
Rules of thumb, and where they break
Keystone pricing, doubling the cost, is retail's oldest shortcut and delivers exactly a 50% margin, which is why it survives: for fashion, gifts and general merchandise with meaningful rates of markdown, shrinkage and dead stock, the 50% gross margin funds the losses and the overheads with something left. The rule breaks at both ends of the market. In high-volume, price-transparent categories, groceries, electronics, fuel, competition compresses margins far below keystone and volume does the work instead. In service businesses the shortcut fails differently, because the main cost is time, and pricing labour by doubling its cost systematically undercharges once non-billable hours are counted. The honest use of any pricing rule of thumb is as a starting point to be corrected by the solver above, never as the final number: the market sets what customers will pay, the calculator tells you what that price is worth to you, and the decision lives in the gap between the two.
The mistakes that recur
After the margin-markup swap and the VAT trap, both covered above, a handful of errors account for most of the rest. Forgetting variable costs beyond the invoice price: delivery inward, card processing fees, packaging and platform commissions all belong in cost before margin is measured, and a marketplace seller paying 15% commission on the gross has a very different margin from the one their spreadsheet shows. Measuring margin on some products and not others, so the profitable lines quietly subsidise the loss-makers for years. Confusing cash in the till with profit, when VAT and supplier payments inside that cash belong to other people. And benchmarking against a different sector's margins, which flatters or terrifies but never informs. Each mistake is invisible on any single transaction and expensive across a year, which is the strongest argument for making the five-figure check, cost, revenue, profit, margin, markup, a habit rather than an occasional audit.
Common questions
What is the difference between margin and markup?
Margin is profit divided by the selling price; markup is profit divided by the cost. Buying at 60 euro and selling at 100 euro gives a 40% margin but a 66.7% markup. Markup is always the larger number for the same transaction.
How do I price a product for a 30% margin?
Divide the cost by 0.70, which is one minus the margin. A 140 euro cost prices at 200 euro. Multiplying the cost by 1.30 instead gives only a 23.1% margin, which is the most common pricing error.
Should margin be calculated on the price including VAT?
No. VAT belongs to Revenue, not to the seller, so margin must be calculated on the price excluding VAT. In Ireland that means stripping 23%, 13.5% or 9% from the shelf price before working out the margin.
What is a good profit margin?
It depends entirely on the sector. Grocery retail runs net margins of a few percent on high volume, hospitality typically needs food gross margins around 65 to 70%, and software often carries gross margins above 80%. Compare against your own sector and your own history, not across industries.