How to Calculate Profit Margin (With a Worked Example)

Profit margin is (price minus cost) divided by price, times 100. A $200 price on a $150 cost gives a 25% margin.

Updated 3 min read By CodingEagles
Free tool Margin Calculator Gross profit margin % from a cost and a selling price. Open tool

Profit margin is the profit divided by the selling price, written as a percentage: (price − cost) ÷ price × 100.

TL;DR: Margin = (price − cost) ÷ price × 100. A $200 price on a $150 cost is a 25% margin. The margin calculator works it out from any two of cost, price, or profit.

The formula with a worked example

Take an item that costs you $150 and sells for $200. The profit is $50. Divide that by the $200 price and you get 0.25, or 25%. So a quarter of every sale is profit, and three quarters covers the cost.

Note that you divide by the price, not the cost. Dividing $50 by the $150 cost would give 33.3%, which is the markup, a different figure. Enter the cost and price into the margin calculator and it returns the margin without you having to remember which number goes on the bottom.

Margin versus markup

Both start from the same $50 profit, but they answer different questions. Margin asks what share of the sale is profit. Markup asks how much you added on top of cost. On this $150/$200 item the margin is 25% and the markup is 33.3%. They describe one sale, just from two angles.

Gross margin versus net margin

Gross margin uses only the direct cost of the product, the $150 above. Net margin goes further and subtracts everything else: rent, wages, shipping, tax, and other overheads. A shop with a 40% gross margin might end up with a 6% net margin once the bills are paid. Gross margin tells you whether the product itself earns money; net margin tells you whether the business does.

Frequently asked questions

What is a good profit margin?
It depends heavily on the industry. Grocery and retail often run on single-digit margins, while software can exceed 70%. As a rough guide, a 10% net margin is seen as average and 20% or more is healthy for many small businesses.
Is margin the same as markup?
No. Margin divides profit by the selling price, while markup divides the same profit by the cost. The selling price is always larger than the cost, so the margin percentage is always smaller than the markup percentage on the same item.

Ready to try it?

Gross profit margin % from a cost and a selling price. Free, in-browser, and 100% private — your data never leaves your device.

Open the Margin Calculator