Digital ToolPad.

Runs 100% in your browser

Your data never leaves your device. zero uploads.

Margin Calculator

Work out your profit margin from cost and price, or the price to charge for the margin you want, with profit and markup shown alongside.

  • Margin & profit
  • Price for a target margin
  • Markup side by side
  • Excel formulas

Profit margin from cost and price

Fill in the boxes. The answer appears as you type.

Selling price for a target margin

Fill in the boxes. The answer appears as you type.

Selling price from cost and markup

Fill in the boxes. The answer appears as you type.

What is profit margin?

Profit margin is profit as a percentage of the selling price. If something costs $40 and sells for $65, the profit is $25 and the margin is 25 ÷ 65 = 38.5%. Margin is what accountants and investors use to compare profitability. Markup is a different measure: profit as a percentage of cost (25 ÷ 40 = 62.5%). Confusing the two is a common pricing mistake, so this calculator always shows both.

How to use Margin Calculator

  1. Enter cost and selling price to get the margin, profit and markup.
  2. Or enter cost and the margin you want to get the selling price.
  3. Compare margin and markup in the results.
  4. Copy the spreadsheet formula to price a whole product list.

Margin formulas

  • Profit = selling price − cost.
  • Margin % = profit ÷ selling price × 100.
  • Price for a target margin = cost ÷ (1 − margin %).
  • Markup % = profit ÷ cost × 100. A 50% markup is only a 33.3% margin.

Why use this margin calculator

  • Answers as you typeNo Calculate button. Change any number and every result updates instantly.
  • Shows the workingEach answer has a plain-English sentence, the steps and a formula for Excel or Google Sheets.
  • Margin vs markup, clearlyBoth percentages shown together so you never mix them up.
  • PrivateYour numbers are calculated on your device and never sent anywhere.

Common uses

  • Pricing products. Set prices that hit a target margin.
  • E-commerce. Check margins after supplier price changes.
  • Quotes and services. Price jobs from your costs.
  • Business plans. Model gross margin for different prices.

More calculators: percentage, discount, hours and time card calculators. Browse all everyday calculators.

Example: pricing for a 35% margin

Cost $40, target margin 35% → price = 40 ÷ 0.65 = $61.54 → profit $21.54, markup 53.8%.

What to expect from the result

This is gross margin on a single item: it does not include overheads, taxes, shipping or payment fees unless you add them to the cost.

Margin Calculator questions

How do you calculate profit margin?

Subtract cost from selling price to get profit, divide by the selling price and multiply by 100. $25 profit on a $65 price is a 38.5% margin.

What is the difference between margin and markup?

Margin is profit as a percentage of the price; markup is profit as a percentage of the cost. The same $25 profit on a $40 cost is a 38.5% margin but a 62.5% markup.

How do I price for a 30% margin?

Divide the cost by 0.70. A $50 cost needs a $71.43 price for a 30% margin.

What is a good profit margin?

It depends on the industry: grocery retail often runs below 5% net, while software can exceed 70% gross. Compare with businesses like yours.

Can margin be more than 100%?

No. Margin is a share of the price, so it is always below 100%. Markup can exceed 100%.

100% private — your data never leaves your browser

No registration, no tracking of your content, no server uploads. Don't just take our word for it:

  • No server, no uploads

    Your files and text are processed entirely on your device. Nothing is ever sent to us.

  • Works offline

    Once loaded, this tool keeps working with your Wi-Fi turned off. Try it.

  • Verify it yourself

    Open your browser's DevTools → Network tab. You'll see zero requests carrying your data.

Explore more tools

More utilities for your next task.

Browse all tools