Margin Calculator - Gross Margin, Markup & Profit
Enter any two of cost, revenue, and margin, and the calculator solves the rest, including markup and profit. Free, instant, and fully browser-based so your pricing numbers stay on your device.
What do you know?
Gross margin
40.00%
Markup
66.67%
Profit
40.00
Cost 60.00 · Revenue 100.00
Indication only, not financial advice.
Margin vs markup: not the same thing
Margin is profit as a share of the selling price; markup is profit as a share of the cost. A product bought for 60 and sold for 100 has a 40% margin but a 66.67% markup. Mixing them up means underpricing: applying a "40% markup" when you wanted a 40% margin leaves you at only a 28.6% margin.
| Desired margin | Required markup | Example: cost 100, sell at |
|---|---|---|
| 10% | 11.11% | 111.11 |
| 15% | 17.65% | 117.65 |
| 20% | 25.00% | 125.00 |
| 25% | 33.33% | 133.33 |
| 30% | 42.86% | 142.86 |
| 35% | 53.85% | 153.85 |
| 40% | 66.67% | 166.67 |
| 45% | 81.82% | 181.82 |
| 50% | 100.00% | 200.00 |
How to Calculate Gross Margin, Markup, and Profit
Gross margin is calculated as (revenue - cost) / revenue × 100. Sell an item for 100 that costs you 60 and your gross margin is 40%: forty cents of every euro or dollar of revenue is gross profit. Markup looks at the same numbers from the cost side: (revenue - cost) / cost × 100, which in this example is 66.67%. The two are linked by a simple formula, markup = margin / (1 - margin), which is why a 50% margin always requires a 100% markup (doubling your cost).
The most common real-world use is price setting. If your cost is 24 and you need a 35% margin to cover overhead and profit, you should not multiply by 1.35 (that gives 32.40 and only a 25.9% margin). Instead divide by 1 - 0.35: the correct price is 24 / 0.65 = 36.92. This calculator does that division for you in the "Cost + margin %" mode, and the reverse in "Revenue + margin %" mode when you want to know the maximum you can pay a supplier at a given price point.
Typical gross margins vary enormously by industry: grocery retail often runs at 15-25%, apparel at 45-60%, restaurants at 60-70% on food (before labor), and software above 80%. Comparing your margin to your industry benchmark is more useful than any absolute rule. Remember this tool calculates gross margin only; net margin subtracts operating costs, taxes, and interest, and is usually far lower.
If you also want to know how many units you must sell before profit turns positive, the Break-Even Calculator on ToolForte pairs naturally with this one, and the Discount Calculator shows what a sale price does to your margin. Everything runs in your browser: no signup, no data sent anywhere.
How the Margin Calculator Works
- 01Choose what you know: cost and revenue, cost and target margin, or revenue and margin.
- 02Enter the two known values - the calculator solves the missing one instantly.
- 03Read your gross margin, markup, and profit side by side.
- 04Use the margin-to-markup table to price correctly and avoid the classic mixup.
Margin and markup are not the same
Margin is profit divided by revenue; markup is profit divided by cost. Buying at 60 and selling at 100 gives a 40% margin but a 66.67% markup. The costly mistake is applying a markup percentage when you meant a margin: multiplying cost by 1.40 for a '40% margin' actually yields only 28.6% margin. To price for a target margin, divide cost by (1 - margin): 60 / 0.60 = 100.
When to Use This Tool
Use it when setting prices for products or services, checking whether a supplier price increase still leaves enough margin, evaluating a reseller or wholesale deal, or translating a company-wide margin target into actual price tags. The reverse mode answers 'what is the most I can pay for this item if I must sell at 49.95 with a 45% margin?'
Common Use Cases
- Set a selling price that hits your target margin Break-Even Calculator - Units, Revenue & Contribution Margin
- Check what a discount campaign does to your profit Discount Calculator - Sale Price & Savings
- Work out the maximum purchase price for a fixed retail price
Tips
- To hit a margin target, divide cost by (1 - margin), never multiply by (1 + margin).
- A 50% margin always means doubling your cost (100% markup) - a handy sanity check.
- Recheck margins after every supplier price change; a 5% cost increase can quietly erase a third of a thin margin.
Frequently Asked Questions
- Gross margin = (revenue - cost) / revenue x 100. If you sell for 250 what cost you 150, your profit is 100 and your gross margin is 100 / 250 = 40%. It expresses profit as a share of the selling price, not of the cost.
- Markup = margin / (1 - margin). A 25% margin equals a 33.3% markup, a 40% margin equals a 66.7% markup, and a 50% margin equals a 100% markup. Going the other way: margin = markup / (1 + markup).
- Divide the cost by (1 - target margin as a decimal). For a cost of 24 and a 35% target margin: 24 / 0.65 = 36.92. Multiplying by 1.35 instead is the most common pricing mistake and gives you only a 25.9% margin.
- It depends heavily on the industry. Grocery retail typically runs 15-25%, apparel 45-60%, restaurants 60-70% on food before labor, and software companies often above 80%. Compare against your industry benchmark rather than a universal number.
- No. Gross margin only subtracts the direct cost of the product sold. Net margin also subtracts operating expenses, salaries, rent, marketing, interest, and taxes, and is much lower - a retailer with a 50% gross margin might have a 5% net margin.
How do I calculate gross margin?→
What is the formula to convert margin to markup?→
How do I price a product for a target margin?→
What is a good gross margin?→
Is gross margin the same as net margin?→
Related tools
12 suggested- 01Break-Even Calculator - Units, Revenue & Contribution MarginFind your break-even point in units and revenue from fixed costs, price, and variable cost, plus profit at any volume. Free, instant, browser-based.
- 02Discount Calculator - Sale Price & SavingsCalculate sale price from discount percentage, stack multiple discounts, or find the discount rate. Add tax after discount. Free tool.
- 03Invoice Generator - Free PDF InvoicesCreate professional PDF invoices with line items, tax, and company details. Live preview, print or save as PDF. Free - works entirely in your browser.
- 04Email Signature Generator - Free HTMLCreate professional HTML email signatures with name, title, photo, and social links. Multiple templates and styles. Free online tool.
- 05Privacy Policy Generator - GDPR CompliantGenerate a GDPR-compliant privacy policy for your website or app. Customizable for cookies, analytics, and payments. Free template.
- 06Free QR Code Generator - URL, WiFi & MoreCreate free QR codes for URLs, text, WiFi, email, and phone numbers. Static codes that never expire. Works offline in your browser.
- 07Barcode Generator - Code 128, EAN-13, UPC-A & MoreGenerate barcodes in 6 formats: Code 128, Code 39, EAN-13, EAN-8, UPC-A, and ITF. Auto check digit, live preview, PNG and SVG download. Free, runs in your browser.
- 08Habit Tracker - Build Daily StreaksTrack daily habits with a visual grid. Week and month views, streak counting, color-coded completion. All data saved locally in your browser.
- 09Kanban Board - Free Drag & Drop Task BoardOrganize tasks with a simple drag-and-drop Kanban board. Three columns: To Do, In Progress, Done. Priority labels, card editing, and localStorage persistence. Free and private.
- 10Budget Planner - Free Monthly Budget ToolPlan your monthly budget with income and expense tracking. Pie chart visualization, category breakdown, and savings goal tracking. All data saved locally.
- 11Receipt Generator - Create & Print Receipts FreeGenerate professional receipts with line items, tax calculation, and company details. Print directly or save as PDF. Free and easy to use.
- 12Random Group Generator - Split Names into TeamsSplit a list of names into balanced random groups by group count or group size. Free, instant, browser-based.