Search Calculators

Find a calculator by name, category, or keyword.

Margin Calculator

Calculate profit margin from cost and selling price. Gross margin and margin percentage.

What Is Profit Margin?

Profit margin is the percentage of a sale price that you keep as profit after paying what an item cost you. If you buy a product for $60 and sell it for $100, you keep $40 — and that $40 is 40% of the selling price. So your gross profit margin is 40%.

Margin is one of the most important numbers in any business because it tells you how much breathing room every sale gives you. A high margin means each sale contributes a lot toward covering rent, salaries, marketing, and eventually net profit. A thin margin means you have to sell in high volume just to stay afloat.

Key idea: Margin is always measured against the selling price, not against the cost. This is the single most important thing to get right — and it's exactly what separates margin from markup (more on that below).

This page focuses on gross profit margin, which looks only at the direct cost of the goods you sell (COGS) versus the price you charge. It does not include overhead, taxes, or operating expenses — those belong to operating margin and net margin. Gross margin is where every pricing decision starts.

The Profit Margin Formula

The gross profit margin formula uses just two inputs: the cost of the item and its selling price.

Gross Profit  = Selling Price − Cost
Profit Margin = (Gross Profit ÷ Selling Price) × 100

Or as a single line:

Margin (%) = ((Selling Price − Cost) ÷ Selling Price) × 100

The result is always a percentage between 0% and 100% (assuming you sell above cost). Let's run three worked examples.

Example 1 — Retail product

Cost          = $60
Selling Price = $100
Gross Profit  = 100 − 60 = $40
Margin        = (40 ÷ 100) × 100 = 40%

Example 2 — Coffee shop drink

Cost          = $1.20
Selling Price = $4.50
Gross Profit  = 4.50 − 1.20 = $3.30
Margin        = (3.30 ÷ 4.50) × 100 = 73.3%

Example 3 — Wholesale electronics

Cost          = $420
Selling Price = $480
Gross Profit  = 480 − 420 = $60
Margin        = (60 ÷ 480) × 100 = 12.5%

Notice how different the margins are. The coffee drink has a huge 73% margin but tiny absolute profit ($3.30), while the electronics move a lot of money at a slim 12.5%. Both business models can work — they just require completely different volumes and cost structures.

Margin vs Markup: The Difference That Trips Everyone Up

Margin and markup use the same two numbers but different denominators, and confusing them is the most common — and most expensive — pricing mistake there is.

  • Margin = profit ÷ selling price
  • Markup = profit ÷ cost

Using the same $60 cost / $100 price example:

Margin = 40 ÷ 100 = 40%
Markup = 40 ÷ 60  = 66.7%

Same dollar profit, two very different percentages. A markup is always a larger number than the equivalent margin, because cost is smaller than the selling price.

Why it matters: If a supplier tells you to "add a 40% markup" and you instead price for a 40% margin, you'll charge less than intended and quietly erode your profit on every unit.

Converting between them

Margin = Markup ÷ (1 + Markup)
Markup = Margin ÷ (1 − Margin)

So a 50% markup equals a 33.3% margin, and a 50% margin equals a 100% markup. Keep this straight and you'll price with confidence.

Margin vs Markup Reference Table

Use this table to translate instantly between markup and the profit margin it produces. Both columns describe the same transaction — they just measure profit against a different base.

Markup on CostEquivalent MarginIf cost = $100, price =
10%9.1%$110.00
15%13.0%$115.00
20%16.7%$120.00
25%20.0%$125.00
30%23.1%$130.00
50%33.3%$150.00
66.7%40.0%$166.67
100%50.0%$200.00
150%60.0%$250.00
200%66.7%$300.00
400%80.0%$500.00

How to read it: A common retail "keystone" pricing rule doubles the cost — that's a 100% markup, which equals a 50% margin. If you want a 40% margin, you need a 66.7% markup, not a 40% markup.

Typical Profit Margins by Industry

There is no single "good" margin — it depends entirely on your industry, volume, and cost structure. The benchmarks below are rough gross-margin ranges to help you sanity-check your own numbers.

Industry / SectorTypical Gross Margin
Grocery / supermarkets20% – 30%
Electronics retail5% – 15%
Apparel & fashion40% – 60%
Restaurants (food)60% – 70%
Restaurants (net profit)3% – 9%
Software / SaaS70% – 90%
Jewelry40% – 60%
Automotive (new cars)5% – 10%
Consulting / services50% – 80%
Coffee shops60% – 75% (per drink)

Context matters: A restaurant's 65% gross margin on food sounds huge, but after labor, rent, and waste, net profit often lands in the low single digits. Software has sky-high gross margins because copying code costs almost nothing — but heavy R&D and sales spend eat into the bottom line.

Use these as a starting reference, not a rule. Your local costs, brand, and positioning can justify margins well above or below these ranges.

How to Interpret Your Margin

Once the calculator gives you a percentage, here's how to make sense of it.

Step 1 — Compare to your industry benchmark. If you run an apparel store and your margin is 25%, you're well below the 40–60% norm; you may be underpricing or overpaying suppliers.

Step 2 — Check it covers your overhead. Gross margin has to fund everything gross profit doesn't include: rent, salaries, marketing, and profit. A 12% gross margin rarely survives contact with real-world operating costs.

Step 3 — Watch the trend, not just the number. A margin sliding from 45% to 38% over six months signals rising costs or discounting creep, even if 38% still looks healthy.

Step 4 — Model price changes. Because margin is measured against price, small price increases can move margin a lot:

Cost $60, price $100 → 40% margin
Cost $60, price $110 → 45.5% margin
Cost $60, price $120 → 50% margin

A 10% price bump here lifted margin by more than 5 percentage points — often with little effect on demand for a differentiated product.

How to Use This Margin Calculator

This tool turns the formula into a one-second calculation. Here's what each field does.

Inputs

  • Cost — what you paid to acquire or produce one unit (your COGS). Include the landed cost: purchase price plus shipping, import duties, and packaging if they apply.
  • Selling price — the price you charge the customer for that unit, before sales tax.

Outputs

  • Gross profit — the dollar amount you keep per unit (Selling Price − Cost).
  • Profit margin (%) — that profit as a percentage of the selling price.

Ways to use it

  1. Check an existing product. Enter cost and price to see your current margin instantly.
  2. Work backward to a target price. If you know your cost and want, say, a 45% margin, use Price = Cost ÷ (1 − Margin). For a $60 cost at 45%: 60 ÷ 0.55 = $109.09.
  3. Compare suppliers. Hold the selling price fixed and change the cost to see how a cheaper supplier lifts your margin.

Tip: Keep cost and price in the same currency and same unit (per item, per kilo, per case). Mixing a per-case cost with a per-unit price is the fastest way to get a nonsense result.

Pricing Strategies to Improve Margin

Improving margin isn't only about raising prices. Here are practical levers, roughly from easiest to hardest.

  • Trim landed cost. Negotiate bulk discounts, consolidate shipments, or switch suppliers. Every dollar off cost flows straight to gross profit.
  • Reduce discounting. A standing 15% discount can wipe out a third of a 45% margin. Audit how often you actually sell at full price.
  • Bundle products. Pairing a high-margin accessory with a low-margin core product lifts the blended margin of the sale.
  • Value-based pricing. Price on the value the customer receives, not on cost-plus. This is how software reaches 80%+ margins.
  • Tiered offerings. Good/better/best tiers push customers toward higher-margin premium options.
  • Cut shrinkage and waste. In food and retail, spoilage and theft silently lower your effective margin below the number on paper.

Rule of thumb: A price increase almost always improves margin more than an equivalent cost cut, because it raises both the numerator (profit) and, being measured against price, has an outsized percentage effect. Test a small increase before assuming demand will collapse.

Common Margin Mistakes to Avoid

These errors quietly cost businesses real money.

1. Confusing margin with markup. The #1 mistake. Pricing for a "40%" markup when you meant a 40% margin leaves you undercharging on every sale. Always confirm which base a number refers to.

2. Forgetting hidden costs in COGS. Shipping, duties, payment-processing fees, and packaging are all part of true cost. Omit them and your "margin" is fiction.

3. Believing you can't have a 120% margin. Gross margin caps at just under 100% — you cannot make more profit than the price the customer pays. If your math shows over 100%, you almost certainly calculated markup by mistake.

4. Discounting without recalculating. A 20% off promo on a product with a 40% margin cuts your gross profit in half, not by 20%. Model the new margin before you run the sale.

5. Confusing gross margin with net profit. A 60% gross margin does not mean you're pocketing 60%. Overhead, wages, and taxes come out afterward — net margin is usually a fraction of gross margin.

Quick self-check: If your calculated margin is negative, you're selling below cost. If it's above 100%, you've almost certainly divided by cost instead of price.

Related Calculators

Loading calculator...