Profit Margin Calculator

Enter a cost and a selling price to see the margin, the profit and the markup. Or tell it the margin you want, and it works out the price to charge.

How it works

Margin is the profit on a sale as a share of the selling price: (price minus cost) divided by price. A cost of 60 and a price of 100 leave a profit of 40, which is a 40% margin.

In "Price for a target margin" mode the calculator turns that around. The price is the cost divided by (1 minus the margin), so a cost of 60 and a 25% margin give a price of 80. Adding 25% to the cost would give 75, which is only a 20% margin.

Markup is shown beside every answer, because it is the same profit measured against the cost and is easy to confuse with margin. Everything runs on this page; nothing you type leaves your device.

How to use it

  1. 1 Enter the cost of one item.
  2. 2 Enter your selling price, or switch to "Price for a target margin" and enter the margin you want.
  3. 3 Read the margin or the price, the profit per sale and the markup.
  4. 4 Change the currency if needed. It only changes how the amounts look.

Good to know

  • To hit a margin, divide the cost by (1 minus the margin), never multiply it by (1 plus the margin).
  • Compare products by margin, not by profit per sale. A 2 profit on a 5 item is a better margin than a 10 profit on a 100 item.
  • For a margin on your whole business, enter total costs and total revenue for the same period instead of one item.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Why adding 25% to the cost does not give a 25% margin

A café buys a tray of sandwiches from a supplier for 60 and wants a 25% margin on it. The quick answer is to add 25% to the cost: 60 plus 15 is 75. But the margin on a price of 75 is 15 divided by 75, which is 20%, not 25%. The café has priced every tray too low, and the gap grows with every sale.

The fix is to start from the price, not the cost. A 25% margin means the cost is 75% of the price. So the price is the cost divided by 0.75: 60 / 0.75 = 80. Check it: 80 minus 60 is 20, and 20 is 25% of 80. That is exactly what "Price for a target margin" mode does, for any cost and any margin under 100%.

The difference between the two methods gets bigger as the margin rises. For a 40% margin on a cost of 30, adding 40% gives 42, a margin of only 28.57%. The right price is 30 / 0.6 = 50. For a 50% margin you need to double the cost, a 100% markup, while adding 50% would leave you at 33.33%.

Going the other way is simpler. In "From cost and price" mode you enter what you pay and what you charge, and the calculator divides the profit by the price. A cost of 60 and a price of 100 is a 40% margin and a 66.67% markup. Shop platforms, accountants and lenders usually quote margin, so this is the number to know when you compare your products with each other or with your trade.

One margin number can hide a lot. A product with a high margin and few sales may earn less than one with a thin margin that sells all day. Margin also says nothing about fixed costs: a business can have a healthy gross margin on every item and still lose money each month if it does not sell enough. The Break-even Calculator shows how many sales that takes.

The limits of this page are the limits of the formula. It works on one cost and one price. It does not include sales tax or VAT, discounts, returns or card fees unless you add them to the cost yourself. It is arithmetic, not accounting advice.

Frequently asked questions

What is a good profit margin?

It depends on the trade. Grocery shops often run on low single-digit net margins, while software can keep most of each sale as gross margin. Compare yourself with businesses that sell the same kind of thing, and compare gross margin with gross margin.

Is this gross margin or net margin?

Gross margin, if you enter the cost of the product alone. Net margin takes off every cost of running the business, including rent, wages and tax. If you enter all of those as the cost, the same formula gives a net margin.

Why can a margin not reach 100%?

A 100% margin would mean the whole price is profit, which needs a cost of zero. As the margin you ask for gets close to 100%, the price needed grows without limit, so the calculator only accepts targets under 100%.

How do I turn a margin into a markup?

Markup = margin / (100 minus margin) × 100. A 20% margin is a 25% markup, a 40% margin is a 66.67% markup, and a 50% margin is a 100% markup. The calculator shows both every time.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.