Percentage Profit Calculator
Margin and markup describe the same profit with different denominators, and confusing them is one of the most expensive pricing mistakes a seller can make. This percentage profit calculator runs both directions: enter cost and price to get profit, margin, markup, and cost ratio, or enter cost and a target margin to find the price you must charge. If you need the same math with a full fee stack for a store, our Shopify margin calculator adds payment fees and ad costs on top.
Percentage Profit Calculator
Profit, margin, markup, and cost ratio, forward or in reverse from a target margin.
Quick Answer
An item costing $60 and selling for $100 earns $40 profit, which is a 40% margin but a 66.7% markup. Same dollars, different denominators. In reverse, a $60 cost with a 40% target margin needs exactly a $100 price, not $84: adding 40% to cost gives only a 28.6% margin.
Key takeaways
- Margin divides by price, markup divides by cost. Markup is always the bigger number for the same sale.
- Adding X% to cost never gives an X% margin. A 40% markup yields a 28.6% margin. Price from the margin formula instead.
- Margin can never hit 100%. It approaches 100% only as cost approaches zero.
- Margin + cost ratio always equals 100%. That is your built-in arithmetic check.
Margin and markup: the same profit, two different numbers
Take a $60 cost and a $100 price. The profit is $40 either way. Margin measures that $40 against the selling price: 40 / 100 = 40%. It answers “how much of each sale do I keep.” Markup measures the same $40 against the cost: 40 / 60 = 66.7%. It answers “how much did I add on top of what I paid.”
Formula: (price – cost) / price
Use it for: reading profitability, comparing products, setting targets.
Formula: (price – cost) / cost
Use it for: setting prices from costs, quoting suppliers, quick mental math.
Use margin when you want to know how profitable you are, because it shows what share of revenue survives. Use markup when you are building a price up from a known cost, because it is simpler arithmetic. What matters is never mixing them: a supplier quoting a “40% markup” who you hear as a “40% margin” just cost you real money.
The conversion table worth bookmarking
Converting between the two by hand uses simple formulas. Markup to margin: margin = markup / (1 + markup). Margin to markup: markup = margin / (1 – margin). The table covers the values people actually look up:
| Markup | Equals margin | Margin | Needs markup |
|---|---|---|---|
| 25% | 20.0% | 20% | 25.0% |
| 43% | 30.1% | 30% | 42.9% |
| 67% | 40.1% | 40% | 66.7% |
| 100% | 50.0% | 50% | 100% |
| 150% | 60.0% | 60% | 150% |
| 300% | 75.0% | 75% | 300% |
Pricing from a target margin: the reverse math
The mistake almost everyone makes once: “I want a 40% margin on my $60 cost, so I will charge $84.” That is a 40% markup, and it produces a 28.6% margin (24 / 84). The correct formula solves the margin equation backwards: price = cost / (1 – target margin). For a 40% margin on $60: 60 / 0.60 = $100. The higher your target margin, the wider the gap between the naive answer and the right one, which is why the reverse mode exists in the calculator above. Switch the mode, enter your cost and target, and it gives you the price plus the equivalent markup for quoting.
Worked example, checked against the tool
Forward mode with $60 cost and $100 price, verified in the calculator above:
- Gross profit: $100 – $60 = $40.00
- Margin: $40 / $100 = 40.0%
- Markup: $40 / $60 = 66.7%
- Cost ratio: $60 / $100 = 60.0% (check: 40 + 60 = 100)
Reverse mode with $60 cost and 40% target margin: $60 / (1 – 0.40) = $100.00 required price, profit $40.00, markup 66.7%.
What competing calculators miss
Nearly every margin calculator on the first page does the forward math and stops. None of them run the reverse direction, pricing from a target margin, which is the calculation a seller actually performs when setting prices. Most also present margin and markup as two disconnected outputs without teaching the relationship, so users keep making the same confusion error the tool was supposed to prevent. The conversion tables that do exist are usually buried or partial. This page pairs the calculator with the teaching: the comparison cards, the full conversion table, and the reverse solver, so the number comes with the understanding.
For margin math inside a real store with fees, see the Shopify margin calculator. The 20 percent margin calculator solves the popular fixed-target case directly, and the agency margin calculator applies the same concepts to service businesses.
Frequently asked questions
Margin divides profit by the selling price; markup divides profit by the cost. On a $60 cost and $100 price, the $40 profit is a 40% margin but a 66.7% markup. Markup is always the larger number for the same sale.
Subtract cost from selling price to get profit, divide by the selling price, and multiply by 100. A $100 sale with $60 cost gives ($100 – $60) / $100 x 100 = 40% profit margin.
Margin = markup / (1 + markup), with markup as a decimal. A 50% markup becomes 0.50 / 1.50 = 33.3% margin. Going the other way: markup = margin / (1 – margin).
Markup = margin / (1 – margin) = 0.40 / 0.60 = 66.7%. Or price directly: price = cost / (1 – 0.40) = cost / 0.60. On a $60 cost that is exactly $100.
Yes. If cost exceeds the selling price, profit is negative and so is the margin. A $60 cost sold at $50 gives a -$10 profit and a -20% margin. The calculator handles this normally.
Margin is profit divided by price, so 100% margin requires zero cost. As cost approaches zero, margin approaches 100% but never reaches it for any real product. Markup, by contrast, has no upper limit.
Use margin for targets and profitability analysis, since it reflects what you keep from each sale. Use markup for the quick arithmetic of building a price from a cost. Set the target in margin terms, then convert to markup for quoting if that is how your industry talks.
Divide your cost by (1 – target margin as a decimal). For a 30% margin on a $40 cost: $40 / 0.70 = $57.14. Do not just add 30% to the cost; that gives a 23.1% margin.
It depends on the business. Software can run 70%+ gross margins; grocery retail survives on single digits. Compare against your own industry’s benchmarks and your own history, not a universal number. The trend matters more than the level.
Cost ratio is cost divided by selling price, the complement of margin. Margin plus cost ratio always equals 100%, which makes it a quick arithmetic check on your numbers. It also frames cost control: lowering the cost ratio directly raises the margin.
Add This Calculator to Your Website
Put this percentage profit calculator on your own website or blog. Copy the code below and paste it into your page HTML. The embedded calculator updates automatically whenever we improve it.
Powered by Calculator Zilo – the embedded calculator links back to this page.
References
- Investopedia. "Profit Margin." Investopedia on profit margin definition and formula (Accessed Oct 18, 2026).
- Investopedia. "Markup." Investopedia on markup vs margin (Accessed Oct 18, 2026).
- Corporate Finance Institute. "Gross Margin Ratio." CFI on gross margin ratio calculation (Accessed Oct 18, 2026).
- Corporate Finance Institute. "Markup." CFI on the difference between markup and margin (Accessed Oct 18, 2026).
- Harvard Business Review. "Managing Price, Gaining Profit." HBR on pricing with costs and margins (Accessed Oct 18, 2026).
- Harvard Business Review. "A Quick Guide to Breakeven Analysis." HBR on breakeven and contribution margin analysis (Accessed Oct 18, 2026).
- Khan Academy. "Profit, revenue, and cost." Khan Academy on firm profit and cost concepts (Accessed Oct 18, 2026).
- Internal Revenue Service. "Publication 535 (2024), Business Expenses." IRS Publication 535 on cost of goods sold (Accessed Oct 18, 2026).
- U.S. Bureau of Economic Analysis. "Gross Domestic Product by Industry." BEA data on industry value added and margins (Accessed Oct 18, 2026).
- Federal Reserve Bank of St. Louis (FRED). "Corporate profits after tax." FRED series on US corporate profits (Accessed Oct 18, 2026).
