The Calc Guide › Calculator
Profit Margin Calculator
A profit margin calculator that keeps margin and markup apart: an item costing $40 and selling at $100 makes $60 of profit, a 60% margin on the price and a 150% markup on the cost. The tool also solves the price for a target margin, or the cost a price can carry. Checked November 2026.
Last updated: November 24, 2026
Margin and markup, kept apart and solved in every direction
Margin is profit as a percentage of the price; markup is the same profit as a percentage of the cost. They are different numbers for the same sale, and this tool always shows both. Cost here is the cost of the item itself, before rent, wages and other overheads, so the margin shown is a gross margin.
How this is worked out
Profit = price − cost; margin = profit / price; markup = profit / cost.
Next: a different ratio, return on invested capital, with the ROI Calculator
Free. No sign-up. Calculated in your browser; nothing is sent to our servers.
What this calculator does
This profit margin calculator answers the three pricing questions a seller actually asks, and it keeps the two percentages that are forever being confused with each other side by side while it does it. From a cost and a selling price it gives the profit, the margin (profit as a percentage of the price) and the markup (the same profit as a percentage of the cost). From a cost and a target margin it solves the price you need to charge. From a price and a margin it solves the cost the price can carry.
One boundary: this is per-sale pricing math on the cost of the item itself, a gross margin. Return on investment is a different concept, the return on capital invested over a holding period, and it has its own page here, the ROI Calculator.
Worked example: an item that costs $40 and sells for $100
The tool opens on a cost of $40 and a selling price of $100:
Scroll sideways to see all columns →
| Line | Amount |
|---|---|
| Profit, $100 − $40 | $60.00 |
| Margin, $60 / $100 | 60% |
| Markup, $60 / $40 | 150% |
Both percentages are true at once. The margin says that 60 cents of every dollar taken is gross profit. The markup says the price sits 150% on top of the cost. The three modes of the tool are this one example read in three directions: enter the cost and the price to get both percentages; enter the cost of $40 with a target margin of 60% and the price comes back as $100; or enter the price of $100 with a margin of 60% and the cost it can carry comes back as $40.
Margin is not markup: the confusion, priced
Suppose the intention is a 60% margin on that $40 item, but the pricing is done as a 60% markup instead. The price becomes $40 x 1.60 = $64. The profit is $24, and the margin actually achieved is $24 / $64 = 37.5%, not 60%. Each sale brings in $36 less profit than intended ($60 − $24), and the shortfall is invisible on any single sale because the business is still, visibly, making money.
The reverse error also happens: a supplier quotes a 50% markup and it is heard as a 50% margin, when a 50% markup is a margin of 33.33%. Take a $100 cost sold at $150: profit $50, margin 33.33%, markup 50%. Whenever one of the two percentages is quoted to you, the first question is which base it is a percentage of, the price or the cost.
From margin to markup
This table makes the translation mechanical (markup = margin / (1 − margin)):
Scroll sideways to see all columns →
| If the margin is | The markup is |
|---|---|
| 10% | 11.11% |
| 20% | 25% |
| 25% | 33.33% |
| 30% | 42.86% |
| 33.33% (one third) | 50% |
| 40% | 66.67% |
| 50% | 100% |
| 60% | 150% |
| 75% | 300% |
On a profitable sale the markup is the larger of the two, because it divides the same profit by the smaller number, and the gap grows as the margin rises.
From markup to margin
Read the other way (margin = markup / (1 + markup)):
Scroll sideways to see all columns →
| If the markup is | The margin is |
|---|---|
| 10% | 9.09% |
| 25% | 20% |
| 50% | 33.33% |
| 75% | 42.86% |
| 100% | 50% |
| 150% | 60% |
| 200% | 66.67% |
| 300% | 75% |
A 100% markup, doubling the cost, is a 50% margin and never more.
If your starting point is the markup itself, the Markup Calculator runs the pair from the cost side: the price a target markup puts on a cost, with this page’s margin shown alongside for comparison.
How margin and markup are worked out
- Profit = price − cost.
- Margin = profit / price.
- Markup = profit / cost.
- Price for a target margin = cost / (1 − margin), with the margin as a decimal (60% is 0.60).
- Cost inside a price = price x (1 − margin).
The two bases: margin divides by the price (also called revenue), markup divides by the cost (also called cost of goods sold, COGS). Every formula on this page is one of those two divisions or its rearrangement, and every disagreement about a margin figure is, underneath, a disagreement about the base.
A margin of 100% or more cannot price: margin is a share of the price, and the cost must be some positive share of it too, so a finite price exists only below a 100% margin. As the target margin approaches 100%, the price the formula demands grows without limit: a $40 cost at a 99.99% margin needs a $400,000 price. Markup has no such ceiling, since it is measured on cost. Comparing this year’s margin with last year’s is a percentage change calculation; how to calculate percentage change sets out the formula and the sign rules. Where neither figure is the starting point, the comparison is a percentage difference rather than a change; how to calculate percentage difference explains when each one applies.
What the margin here leaves out: the cost in these formulas is the cost of the item itself, what it cost to buy or make. Rent, wages, card fees, shipping and taxes sit below the gross margin line, so a healthy gross margin is a necessary condition for profit, not a sufficient one. A price below cost is returned as a negative margin, because that is sometimes the number that ends an argument about a discount: a $100 cost sold at $80 is a -25% margin and a -20% markup.
Edge cases, as the calculator returns them
- A selling price of $0 in the margin mode: no result (the margin has no base).
- A cost of $0: margin 100%, markup shown as not defined, because there is no cost to divide by.
- A target margin of 100% or more in the price or cost mode: no result.
- A margin of 0%: price equals cost, profit $0.
- A price below cost: negative margin and negative markup.
Sources and method
Margin and markup are definitions, not statistics: the formulas above, computed exactly by the tool, rounded to cents and hundredths of a percent. The same definitions appear in Xero’s margin versus markup guide, whose $100 cost sold at $150 example gives a 33.3% margin and a 50% markup, matching this page. The conversion tables are the identities markup = margin / (1 − margin) and margin = markup / (1 + markup), evaluated at the values shown and recomputed with code on November 18, 2026. Figures checked November 2026.
Change log
November 18, 2026: “the margin is always the smaller percentage” limited to profitable sales; “a quoted margin above 100% is a markup” softened to “most likely”; the 33.33% row labeled as one third; markup-to-margin table, edge-case list and a conversion FAQ added; privacy line left unchanged; the Omni Calculator cross-check replaced with a linked source; links to the Markup Calculator and Sales Tax Calculator kept, both pages confirmed live on November 18, 2026.
November 5, 2026: first full version. Questions or corrections: contact us.
Related calculators
The ROI Calculator measures return on invested capital over a holding period, the neighboring ratio this page is most often confused with. The Sales Tax Calculator adds the tax on top of the price you settle on, or takes it back out of a total. The Percentage Calculator covers the underlying percentage math in every direction.
Frequently asked questions
How do I calculate profit margin?
Subtract the cost from the price to get the profit, then divide the profit by the price and multiply by 100. An item costing $40 and selling for $100 makes $60 of profit, and $60 / $100 is a 60% margin. The division is by the price, the money coming in, never by the cost. Dividing by the cost gives the markup instead, which is a different number for the same sale, 150% in this example.
What is the difference between margin and markup?
The base. Margin expresses profit as a percentage of the selling price; markup expresses the same profit as a percentage of the cost. On a profitable sale the price is the bigger number, so the margin is the smaller percentage, and the two are linked by markup = margin / (1 − margin), with both written as decimals. A 50% markup is a 33.33% margin; a 50% margin needs a 100% markup. Quoting one when you mean the other understates or overstates profit on every single sale.
How do I set a price for a target margin?
Divide the cost by one minus the target margin, with the margin as a decimal: price = cost / (1 − margin). For a $40 cost and a 60% target margin, that is $40 / 0.40 = $100. The method to avoid is adding the percentage to the cost: adding 60% to $40 gives $64, which feels like the same operation and is not, because the 60% was applied to the cost instead of being taken as a share of the final price. The $64 price delivers a margin of only 37.5%.
How do I convert a markup into a margin?
Divide the markup by one plus the markup, with the markup as a decimal: margin = markup / (1 + markup). A 100% markup (doubling the cost) is 1 / 2 = a 50% margin, and a 50% markup is 0.5 / 1.5 = a 33.33% margin. The table above shows the common pairs. A markup of any size gives a margin below 100%.
Can a margin be more than 100%?
No. Margin is profit as a share of the price, and since the price is the profit plus a cost of at least zero, the share cannot pass 100%. It reaches 100% only when the cost is zero, as with a purely digital good that costs nothing to deliver. Markup, measured on cost, has no ceiling: a $10 cost sold at $100 is a 900% markup and a 90% margin. A quoted margin above 100% is most likely a markup, or a mistake.
Is profit margin the same as ROI?
No. Margin is per sale: of this price, how much is left after the cost of the item. ROI is per investment over time: of the capital put into something, how much came back, and over how long. A shop can run a 60% margin and a poor ROI if its capital sits in slow stock, or a thin margin and an excellent ROI if the stock turns over fast. The ROI Calculator on this site works the investment version.
Educational tool only. Results are estimates based on the numbers you enter and the assumptions explained on this page, not financial advice.