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 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
- Check what a discount campaign does to your profit → Discount Calculator
- 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
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.
- 03Quote Generator - Free Price Quotes in PDFBuild a professional price quote with line items, tax, and a valid-until date, then export to PDF, CSV, or Excel. Free, private, saved in your browser.
- 04Purchase Order Generator - Free PO Templates in PDFCreate a professional purchase order with vendor details, line items, tax, and delivery date, then export to PDF, CSV, or Excel. Free, private, browser-based.
- 05Rent Receipt Generator - Free Proof of Rent PaymentCreate a rent payment receipt with landlord, tenant, property, and period covered, then export to PDF or CSV. Free, private, saved in your browser.
- 06Project Planner - Free Task List & TrackerTrack project tasks with owner, status, priority, and due date, filter by status, and watch progress update live. Free, saved in your browser, export to CSV or Excel.
- 07Packing List - Free Trip Checklist MakerBuild a trip packing checklist grouped by category, tick items off, track packed progress, and print or export it. Free, saved in your browser.
- 08Resume Builder - Free CV Maker with PDF ExportBuild a clean, one-column resume and download it as a polished, watermark-free PDF. Free, saved in your browser.
- 09Checklist Maker - Free Reusable ChecklistsBuild grouped checklists you can tick off, reset, and reuse, then export a print-friendly PDF or CSV. Free and saved in your browser.
- 10Invoice 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.
- 11Email Signature Generator - Free HTMLCreate professional HTML email signatures with name, title, photo, and social links. Multiple templates and styles. Free online tool.
- 12Privacy Policy Generator - GDPR CompliantGenerate a GDPR-compliant privacy policy for your website or app. Customizable for cookies, analytics, and payments. Free template.
From the blog
Further reading- Generate Barcodes for Products and InventoryBarcode generator guide: EAN, UPC, Code 128, and QR formats explained. Learn which to use for retail, inventory tracking, and shipping labels.7 min read
- Receipt Generator: Make Professional Receipts OnlineCreate professional receipts online for your business. Covers the receipt elements, legal requirements, and tips for organizing your records.7 min read
- Free Invoice Generator: Create and Download PDFsGenerate professional invoices in seconds. Add your logo, line items, tax rates, and payment terms. Download as PDF. No signup or monthly fees required.7 min read