Margin Calculator

Turn cost and selling price into profit, gross margin percentage, and markup percentage in one step. See instantly why a 50% markup is only a 33% margin so you can price for the profit you actually want.

Calculator Finance Updated Jun 17, 2026
Learn how this works
How to Use
  1. Enter the unit cost — what you pay to buy or produce the item.
  2. Enter the selling price you charge the customer.
  3. Read the profit per unit (selling price minus cost).
  4. Read gross margin (profit ÷ selling price) and markup (profit ÷ cost) as percentages.
  5. Try the presets — keystone retail, restaurant food, electronics, apparel — to benchmark your numbers against typical industry margins.
Input
Presets
Result

Show Work

Enter values to see the step-by-step calculation.

Formulas

Gross margin
(sell − cost) / sell
Markup
(sell − cost) / cost

About the Margin Calculator

The Margin Calculator is a free tool for personal-finance and money decisions. It runs right in your web browser, so there is nothing to download. Turn cost and selling price into profit, gross margin percentage, and markup percentage in one step. See instantly why a 50% markup is only a 33% margin so you can price for the profit you actually want.

How it works

Type your numbers into the boxes. The answer shows up right away — you do not have to press a button. If you change a number, the answer changes too. So you can try different numbers and watch what happens, or check an answer you worked out yourself. Just make sure each box has the right kind of number in it.

Want the deeper story? The Knowledge Base explains the ideas behind the tools in more detail.

Frequently Asked Questions

What is the difference between margin and markup?

They measure profit against two different bases. Markup is profit as a percentage of cost (profit ÷ cost), while margin is profit as a percentage of the selling price (profit ÷ price). Because the selling price is larger than the cost, the margin percentage is always lower than the markup percentage — a 50% markup is only a 33.3% gross margin.

How do I calculate gross margin?

Subtract cost from selling price to get profit, then divide that profit by the selling price and multiply by 100. For example, a $100 item that costs $60 yields $40 profit, and $40 ÷ $100 = 40% gross margin. This calculator does both that and the markup figure automatically.

What is a good profit margin?

It varies widely by industry. Grocery and electronics retailers often run on single-digit to mid-teens margins on volume, while apparel, jewelry, and software can carry 50%+ gross margins. Restaurants target high food margins (often 60–75% on ingredients) to absorb labor and rent. Compare your number to peers in your sector rather than to a universal target.

What is keystone pricing?

Keystone is the classic retail rule of doubling the wholesale cost to set the retail price — a 100% markup, which works out to a 50% gross margin. It is a quick starting point, but many categories price above or below keystone depending on competition, demand, and carrying costs.

Does this include taxes, shipping, or overhead?

No. This is a gross-margin calculator based purely on unit cost and selling price. It does not subtract sales tax, shipping, payment-processing fees, labor, or fixed overhead. To find net (operating) margin, fold those costs into your unit cost first or analyze them separately.

How do I use the Margin Calculator?

Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.

Is it free? Does it work without internet?

Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.

Where does my data go?

Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.

Common Use Cases

Setting a retail price

Start from your wholesale cost and a target margin to back into the price tag you should put on a product.

Vetting a supplier quote

Drop in a new cost and your current price to see exactly how much margin you keep or lose when a supplier changes terms.

Reading a markup as a margin

Convert a vendor-quoted markup into the gross margin you will actually earn, so two offers can be compared apples to apples.

Benchmarking against your industry

Use the keystone, restaurant, electronics, and apparel presets to check whether your margins are typical for your category.

Quick deal math at the counter

Sales reps and shop owners can confirm a quote still clears the minimum margin before agreeing to a discount.

Last updated: