How to use the profit margin calculator
- Pick what you want to find: Find my margin when you know cost and price, Find selling price when you know cost and the margin you want, or Find cost when you know the price and margin and want the most you can pay.
- Fill in the fields shown: Cost per item, Selling price or Target margin.
- Read the profit, margin, markup and selling price. The bar and the margin and markup table update as you type.
How margin and markup are calculated
Profit is the selling price minus the cost. Margin and markup both divide that profit, but by different amounts:
- Margin = profit ÷ selling price × 100, the share of each sale you keep.
- Markup = profit ÷ cost × 100, the amount you add on top of cost.
- Price for a target margin = cost ÷ (1 − margin ÷ 100), and cost for a target margin = price × (1 − margin ÷ 100).
Because a bigger number (the price) sits under margin, margin is always smaller than markup on a profitable sale. Margin here means gross margin: it counts only the cost you enter, not overhead, taxes or interest.
Worked example
The calculator opens with a $60.00 cost and a $100.00 selling price. The profit is $40.00, the margin is 40.00% ($40 ÷ $100) and the markup is 66.67% ($40 ÷ $60). Now choose Find selling price with a 35% target margin on the same $60.00 cost: $60.00 ÷ 0.65 = $92.31, which is $32.31 of profit and a 53.85% markup. Choose Find cost with a $100.00 price and 35% margin, and the most you can pay is $65.00.
Limits and edge cases
- Add fees that come out of every sale, such as shipping, packaging and payment processing, to the cost. Otherwise the margin looks better than it is.
- Use prices before sales tax, since tax you collect is not your revenue. The sales tax calculator shows how much of a total is tax.
- A target margin must be below 100%, because no price with a real cost can keep all of it. A cost of zero gives a 100% margin but no markup, so the tool shows markup as not defined. A selling price below cost gives a negative margin.
- To price from a markup percentage, use the markup calculator. To see how many units cover your fixed costs, use the break-even calculator, and for a sale price use the discount calculator.
Frequently asked questions
How do I calculate profit margin?
Subtract the cost from the selling price, divide by the selling price and multiply by 100. A $60.00 cost and a $100.00 price give ($100 − $60) ÷ $100 × 100 = 40.00%.
What is the difference between margin and markup?
Margin is profit as a percentage of the selling price, and markup is profit as a percentage of the cost. On a $60.00 cost sold for $100.00, the same $40.00 profit is a 40.00% margin and a 66.67% markup.
How do I price an item for a 35% margin?
Divide the cost by 1 minus the margin as a decimal. For a $60.00 cost, $60.00 ÷ 0.65 = $92.31. Adding 35% to the cost instead gives $81.00, which is only a 25.93% margin.
What is a good profit margin?
It depends on the industry. For US public companies in January 2026, NYU Stern reports gross and net margins of 26.31% and 1.32% for grocery retail, 32.24% and 9.37% for restaurants, and 71.72% and 25.49% for software.
Can profit margin be negative or over 100%?
It can be negative when you sell below cost. It reaches 100% only when the item costs nothing and can never go above 100%, because profit cannot exceed the selling price. Markup has no upper limit.
Source: NYU Stern (Aswath Damodaran), Margins by Sector, US, January 2026, averages for publicly traded companies. Estimates only, not financial advice.