Profit Margin Calculator

Work out margin, markup, profit and selling price from any two figures.

Margin And Markup Are Not The Same Number

Pricing goes wrong most often in one particular place: confusing margin with markup. A product that costs 40 and sells for 60 has a 50% markup — the profit as a share of the cost — but only a 33% margin, the profit as a share of the price. Set prices by adding “a 40% margin” to the cost and every product ends up underpriced.

This calculator works from whichever two figures you know: cost and price, cost and a target margin, cost and a target markup, or price and margin. It shows margin, markup, profit and price together, so the relationship between them is always visible, and totals for any number of units.

Key features

  • Four ways in — cost and price, cost and margin, cost and markup, price and margin.
  • Margin and markup side by side — so they cannot be confused.
  • Totals for any quantity — revenue and gross profit across units sold.
  • What-if pricing — the price needed for a margin ten points higher.
  • Loss warning — flags a price below cost.
100% client-side — no data leaves your machine

This tool runs entirely inside your browser using native Web APIs. Your files and text are never uploaded to a server, never logged and never shared with third parties.

How to use: Profit Margin Calculator

  1. Choose what you know
    Pick the pair of figures you have.
  2. Enter the numbers
    Cost, price and percentages; the results update as you type.
  3. Read margin and markup
    Both are shown, with profit and price.
  4. Try a different price
    See how a change moves your margin before you commit.

Technical specifications

Processing locationEntirely in your browser — no server round trip
Data uploadedNone. Files and text never leave your device
PriceFree — no account, no trial, no usage cap
CategoryCalculators
Works offlineYes, once the page has loaded
Browser supportChrome 90+, Edge 90+, Firefox 90+, Safari 15+
Interface languagesEnglish, 中文, हिन्दी, Español, العربية

Frequently asked questions

What is the formula for profit margin?

Gross margin = (price − cost) ÷ price × 100. For an item costing 40 and selling at 65, the margin is 25 ÷ 65 = 38.5%.

What is the formula for markup?

Markup = (price − cost) ÷ cost × 100. For the same item, 25 ÷ 40 = 62.5%. Markup is always larger than margin for a profitable item.

How do I find a price for a target margin?

Divide the cost by one minus the margin: price = cost ÷ (1 − margin). For a 40% margin on a cost of 30, the price is 30 ÷ 0.6 = 50. Choose Cost and margin to do this automatically.

Can a margin be more than 100%?

No. A margin of 100% would mean the item cost nothing, so every real margin is below 100%. Markup has no ceiling: selling for three times the cost is a 200% markup.

Does this include tax and overheads?

No — these are gross figures, the difference between what an item costs you and what it sells for. Net profit also subtracts rent, wages and other overheads, and sales tax is usually collected on top of the price.

Related tools

Back to all tools