Finance

Margin Calculator

Margin % = (price − cost) ÷ price × 100. Solve for margin, price, or cost.

$
$

Margin

60%

Profit

$60.00

Price

$100.00

Cost

$40.00

Steps

  1. Profit = price − cost = $100.00 − $40.00 = $60.00.
  2. Margin % = (profit ÷ price) × 100 = 60%.
  3. Equivalent markup % ≈ 150%.
Margin vs markup (same deal)
Margin %Equivalent markup %
20%25%
25%33.33…%
50%100%
60%150%
https://calcwell.net/calculators/margin-calculator?mode=from-prices&cost=40&price=100
Share, cite or embed this calculator

Share link (includes current inputs when available)

Cite this calculator

CalcWell. "Margin Calculator." CalcWell, https://calcwell.net/calculators/margin-calculator. Accessed 2026-11-28.

Embeddable widget

Embed on your site with attribution linking back to calcwell.net.

<iframe src="https://calcwell.net/calculators/margin-calculator" title="Margin Calculator" width="100%" height="520" loading="lazy" style="border:1px solid #e5e7eb;border-radius:8px;"></iframe>
<p>Calculator by <a href="https://calcwell.net/calculators/margin-calculator" rel="noopener">CalcWell</a></p>

Worked example

Default example: cost $40, price $100.

Profit = $60. Margin = 60 ÷ 100 × 100 = 60%.

Answer: 60% margin (profit $60)

Margin formula

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

These are standard gross-margin identities used in retail and accounting textbooks, not a proprietary model. They ignore taxes, fees, and multi-step COGS allocations.

Pricing scenarios worked step by step

Retail: hitting a 35% margin

A shop pays $18.00 for a jacket and wants a 35% gross margin. Use the price-from-margin mode, or do it by hand: price = cost ÷ (1 − 0.35) = 18 ÷ 0.65 = $27.69. Check: profit is 27.69 − 18.00 = $9.69, and 9.69 ÷ 27.69 = 35.0%. The tempting shortcut of 18 × 1.35 = $24.30 only yields (24.30 − 18) ÷ 24.30 = 25.9% margin, because 35% was applied to cost instead of price.

Restaurant: pricing a dish from its food cost

Ingredients for a pasta dish cost $4.80 per plate. If the target food cost is 30% of the menu price, then the margin on ingredients is 70%. Price = 4.80 ÷ 0.30 = $16.00. Check: 16.00 − 4.80 = $11.20, and 11.20 ÷ 16.00 = 70%. This is gross margin on ingredients only; labor and rent come out of that $11.20.

E-commerce: margin after shipping and fees

A product sells for $50.00. It costs $22.00, shipping is $6.00, and the payment processor takes 3% of the price ($1.50). Total cost = 22.00 + 6.00 + 1.50 = $29.50. Profit = 50.00 − 29.50 = $20.50, so margin = 20.50 ÷ 50.00 = 41%. Using product cost alone would suggest (50 − 22) ÷ 50 = 56%, which overstates real profitability by 15 points. Enter the full landed cost as the cost field to get the honest figure.

Margin and markup equivalents

Markup = margin ÷ (1 − margin). The same profit looks bigger as a markup because the denominator (cost) is smaller than the price.

Gross marginEquivalent markupPrice on $100 cost
20%25%$125.00
25%33.33%$133.33
30%42.86%$142.86
33.33%50%$150.00
40%66.67%$166.67
50%100%$200.00
60%150%$250.00

Common mistakes

  • Adding the margin percentage to cost. A 40% margin needs price = cost ÷ 0.60 (cost × 1.667), not cost × 1.40.
  • Mixing up margin and markup in quotes. Agree on which one a supplier or client means before comparing numbers.
  • Ignoring discounts. A 20% sale on a 40% margin item does not leave 20%. On a $100 price with $60 cost, an $80 sale price gives (80 − 60) ÷ 80 = 25% margin.
  • Leaving out variable costs. Shipping, packaging, returns, and fees all belong in cost if they scale with each sale.
  • Confusing gross margin with net margin. This tool measures only price versus the cost you enter, not overhead or taxes.

When to use this vs related tools

Use the margin calculator when you think in terms of a share of revenue (reporting, comparing products, setting a target profit share). If your supplier or price list is built as cost plus a percentage, switch to the markup calculator. To see how a promotion changes your price before re-checking margin, try the discount calculator. For more business and money tools, browse the finance calculators. This page is educational and not financial advice.

Frequently asked questions

How do you calculate profit margin?

Gross margin % = (Selling price − Cost) ÷ Selling price × 100. Example: ($100 − $40) ÷ $100 × 100 = 60%.

How do I find price from a target margin?

Price = Cost ÷ (1 − Margin÷100). For 40% margin on $60 cost: 60 ÷ 0.60 = $100.

Is margin the same as markup?

No. Margin divides profit by price; markup divides profit by cost. A 60% margin equals a 150% markup.

We use cookies and similar technologies to improve your experience, analyze traffic, and show personalized ads. By clicking "Accept", you consent to the use of cookies. Privacy Policy · Cookie Policy