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 marginRequired markupExample: 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

  1. 01Choose what you know: cost and revenue, cost and target margin, or revenue and margin.
  2. 02Enter the two known values - the calculator solves the missing one instantly.
  3. 03Read your gross margin, markup, and profit side by side.
  4. 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

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?
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.
What is the formula to convert margin to markup?
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).
How do I price a product for a target margin?
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.
What is a good gross 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.
Is gross margin the same as net margin?
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.

Related tools

12 suggested