Profit Margin Calculator
Enter cost and selling price to get gross profit, margin and markup live, or work backwards from a target margin or markup to the price you should charge. Add fees and quantity to see net margin and total profit.
The percent fee comes off the selling price (marketplace commission, payment processing), the fixed fee is a flat amount per sale. Leave both at zero for a pure gross margin calculator. The $ sign is just a label: the math works in any currency.
All math runs in your browser, nothing you type leaves the page.
Markup to margin conversion table
The same sale, expressed both ways. Markup measures profit against cost, margin measures it against price, so the margin is always the smaller number. Click a row to load that markup into the calculator.
| Markup | Equivalent margin | $100 cost sells for |
|---|---|---|
| 9.1% | $110 | |
| 16.7% | $120 | |
| 20% | $125 | |
| 23.1% | $130 | |
| 28.6% | $140 | |
| 33.3% | $150 |
Markup vs margin: the mix-up that underprices products
Margin and markup describe the same profit from two directions. Margin answers "what share of the price do I keep?" while markup answers "how much did I add on top of cost?". The formulas make the difference concrete:
Margin % = (Price - Cost) / Price x 100 Markup % = (Price - Cost) / Cost x 100 Price for a target margin = Cost / (1 - Margin / 100) Price for a markup = Cost x (1 + Markup / 100) The classic markup vs margin mistake is multiplying cost by the target percentage. A shop that wants a 40% margin on a $60 product prices it at $60 x 1.4 = $84, then wonders why the books show 28.6%. Multiplying applied a 40% markup, not a 40% margin. The correct price is $60 / 0.6 = $100, a full $16 higher, and the gap widens as the target grows: a 50% margin needs a 100% markup. Use the cost plus target margin mode above and the calculator does the division for you.
Typical profit margin benchmarks by business type
Margins vary so much between industries that a single "good margin" number is meaningless. These are honest, broad ranges for healthy businesses in each category. Gross margin is revenue minus direct product cost; net profit margin is what remains after every other expense, which is why the two columns look so different.
| Business type | Gross margin | Net margin | What eats the difference |
|---|---|---|---|
| Retail (brick and mortar) | 25 to 50% | 2 to 6% | High volume, thin nets. Rent, staff and inventory eat most of the gross. |
| Ecommerce | 30 to 45% | 5 to 10% | Marketplace fees, shipping, returns and ads sit between gross and net. |
| SaaS and software | 70 to 85% | 0 to 25% | Huge gross margins. Many run near zero net for years while funding growth. |
| Restaurants | 60 to 70% | 3 to 6% | Food cost is 28 to 35% of menu price. Labor and rent take most of the rest. |
| Professional services | 50 to 70% | 10 to 20% | Margin is mostly billable time. Utilization drives the net number. |
If your gross margin lands inside the range for your category but your net margin does not, the leak is in operating costs, fees or marketing spend, not in pricing. If the gross margin itself is below range, either the cost base is too high or the price is too low, and the target margin mode above tells you exactly what the price needs to be.
Margin is half the picture
A margin calculator tells you what each sale is worth. It cannot tell you which visitors actually turn into sales, and that is where most margin math quietly breaks: bot traffic inflates visit counts, makes conversion rates look worse than they are, and pushes ad spend toward pages that were never seen by a real person. Knowing your margin is half the picture. Knowing which traffic actually converts is the other half.
DevDome Analytics separates real visitors from bots on every metric, so the conversion rates you multiply against these margins reflect actual humans, on your own site, with no sampling.
Profit margin and markup FAQ
What is the difference between margin and markup?
Margin is profit as a percentage of the selling price. Markup is the same profit as a percentage of the cost. Sell for $100 what cost you $60 and your profit is $40: that is a 40% margin (40 / 100) but a 66.7% markup (40 / 60). Markup is always the bigger number for the same sale, and confusing the two is one of the most common ways businesses underprice their products.
How do I calculate profit margin?
Subtract cost from revenue to get gross profit, divide by revenue, then multiply by 100. Margin = (Revenue - Cost) / Revenue x 100. Revenue of $250 against $150 of cost gives $100 gross profit and a 40% margin. This margin calculator runs the same math live and shows the equivalent markup next to it so you can compare both views of the same sale.
What is a good profit margin?
It depends on the business type. As a rough rule, a 10% net margin is average, 20% is strong and under 5% is thin. Gross margins run much higher: retail typically sees 25 to 50%, ecommerce 30 to 45%, restaurants 60 to 70% gross but only 3 to 6% net, and SaaS 70 to 85% gross. Compare against your own category, not a universal number.
How do I convert markup to margin?
Margin = Markup / (100 + Markup) x 100. A 50% markup is a 33.3% margin, a 25% markup is exactly a 20% margin. Going the other way, Markup = Margin / (100 - Margin) x 100, so hitting a 50% margin requires a 100% markup. The conversion table on this page lists the common values, and clicking a row loads it straight into the calculator.
What is the difference between gross margin and net margin?
Gross margin subtracts only the direct cost of the product from revenue. Net profit margin also subtracts everything else it takes to sell it: marketplace and payment fees, shipping, payroll, rent, marketing, taxes. This calculator covers the first slice of that gap: enter a percent fee and a fixed fee per sale and it recomputes margin after fees, which is much closer to what you actually keep.
How do I price a product for a 30% margin?
Divide the cost by 0.7, do not multiply by 1.3. Price = Cost / (1 - 0.30). A $70 product priced at cost x 1.3 sells for $91 and earns only a 23.1% margin. Priced at $70 / 0.7 = $100, it hits the full 30%. Multiplying by 1.3 applies a 30% markup, not a 30% margin, and the shortfall grows the higher your target margin gets.
Do marketplace and payment fees count against my margin?
Yes, and they bite harder than they look. A 15% marketplace fee plus a 2.9% + $0.30 payment fee can turn a healthy 40% gross margin into roughly a 20% net margin before you have paid for shipping or ads. Use the fees fields in this calculator to see your margin after fees, and the marketplace fee calculator for platform-specific fee schedules.
More free tools: Marketplace Fee Calculator · Amazon Affiliate Commission Calculator · Invoice Generator · UTM Link Builder · Word Counter