induwara.lk
induwara.lkFinance · Pricing

Profit Margin Calculator

Calculate gross margin, markup, net profit margin, and break-even units from cost and selling price. Four pricing tools in one card, verified by two formulas — no signup, no ads, sources cited below.

By Induwara AshinsanaUpdated May 11, 2026
Profit margin calculator4 modes
Identity verified
Gross margin
20.00%
Verified — margin and markup agree
Markup
25.00%
Profit per unit
20.00
Identity check
Verified
margin = markup ÷ (1 + markup)

margin% = (price − cost) ÷ price × 100 = (100.0080.00) ÷ 100.00 × 100 = 20.00%markup% = (price − cost) ÷ cost × 100 = (100.0080.00) ÷ 80.00 × 100 = 25.00%

Pure-browser maths — nothing is uploaded.Currency-agnostic; numbers formatted in en-LK.

How it works

Every result on this page comes from a standard accounting identity. The four modes — margin from price, price from markup, full profit-and-loss margins, and break-even analysis — share two building-block formulas and the conversion between them.

1. Margin vs. markup — same profit, different base

Both numbers describe the absolute profit (selling price − cost), but they divide it differently. Gross margin uses the selling price as the base: margin% = (price − cost) ÷ price × 100. Markup uses the cost as the base: markup% = (price − cost) ÷ cost × 100. A product costing 80 and selling for 100 has 20 of profit, which is 25% of the cost (a 25% markup) but only 20% of the selling price (a 20% margin). Margin can never exceed 100%; markup is unbounded. Confusing the two is the most common pricing mistake in retail — a shop intending to make a 30% margin but applying a 30% markup leaves money on the table on every sale.

2. Converting between margin and markup

The two are linked by a closed-form identity. Given a markup, margin = markup ÷ (1 + markup/100). Given a margin, markup = margin ÷ (1 − margin/100). The calculator runs this identity in both directions and shows a Verified badge when the round-trip matches — a low-cost guard against arithmetic typos on busy pricing days.

3. Gross, operating, and net margins

The full P&L stack subtracts expenses in three layers, each yielding its own margin:

  • Gross margin = (revenue − COGS) ÷ revenue. Measures pricing power against direct production cost.
  • Operating margin = gross profit − operating expenses (rent, salaries, marketing), divided by revenue. Measures whether the core business is sustainable before financing decisions.
  • Net margin = operating profit − interest − tax − other items, divided by revenue. The bottom line owners and the tax office care about.

The line-item order follows IFRS IAS 1 (and US GAAP). Mixing VAT-inclusive revenue with VAT-exclusive costs over-states every margin by the VAT rate — use net-of-VAT numbers on both sides for an honest read.

4. Break-even analysis

Break-even tells you how many units must be sold for revenue to equal total costs. The formula: units = fixed costs ÷ (price − variable cost per unit). The denominator is the contribution margin per unit — the amount each sale contributes toward recovering fixed costs. If price is at or below variable cost, contribution is zero or negative and no finite volume reaches break-even; the calculator surfaces this rather than returning Infinity. Above break-even, every additional unit drops the full contribution margin to operating profit.

Worked examples

Classic 80 / 100 (a 25% markup is a 20% margin)

Cost 80 · Selling price 100

  1. Profit = 100 − 80 = 20.00
  2. Markup = 20 ÷ 80 × 100 = 25.00%
  3. Margin = 20 ÷ 100 × 100 = 20.00%
  4. Identity check: 25 ÷ (1 + 0.25) = 20.00% ✓

Full P&L for a small bakery

Revenue 1,000,000 · COGS 600,000 · OpEx 200,000 · Tax+other 50,000

  1. Gross profit = 1,000,000 − 600,000 = 400,000 (40.00% margin)
  2. Operating profit = 400,000 − 200,000 = 200,000 (20.00% margin)
  3. Net profit = 200,000 − 50,000 = 150,000 (15.00% net margin)
  4. Bakery industry net margin benchmark: 4–9% — this is healthy.

Break-even on a Rs 50 product

Fixed costs 10,000 · Price 50 · Variable cost 30

  1. Contribution margin = 50 − 30 = 20 per unit (40% of price)
  2. Break-even units = 10,000 ÷ 20 = 500 units
  3. Break-even revenue = 500 × 50 = 25,000
  4. Unit 501 onwards: each sale drops 20 to operating profit.

Edge case — free giveaway promo

Cost 0 · Selling price 100

  1. Profit = 100 − 0 = 100
  2. Margin = 100 ÷ 100 × 100 = 100% (everything is profit)
  3. Markup = 100 ÷ 0 = undefined (cannot divide by zero)
  4. Calculator returns — for markup, with a hint instead of NaN.

Frequently asked questions

Sources & references

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.