Ecommerce · 28 Oct 2026
How to calculate profit margin (gross, operating and net)
Profit margin = profit ÷ revenue × 100. Here is how to calculate gross, operating and net margin, with worked examples, Excel formulas and 2026 benchmarks.
Key takeaways
Margin is your profit as a percentage of the selling price. Markup is your profit as a percentage of the cost. They use the same profit, divided by different numbers, so markup is always higher than margin. A product that costs $60 and sells for $100 has a 40% margin but a 66.7% markup.
Mixing the two up is one of the most common pricing mistakes small sellers make. If you aim for a 40% margin but add 40% to cost, you end up with a 28.6% margin, and every sale earns less than you planned.
| Margin | Markup | |
|---|---|---|
| What it measures | Profit as a share of the selling price | Profit as a share of the cost |
| Formula | (Price − Cost) ÷ Price × 100 | (Price − Cost) ÷ Cost × 100 |
| $60 cost, $100 price | 40% | 66.7% |
| Can it pass 100%? | No, it is always below 100% | Yes, a 200% markup is common |
| Best used for | Checking profitability, comparing products, reporting | Setting a price quickly from a supplier cost |
Margin tells you how much of each sale you keep after paying for the product.
Margin % = (Selling price − Cost) ÷ Selling price × 100
Example: you buy a phone stand for $12 and sell it for $30. Profit is $30 − $12 = $18, so the margin is $18 ÷ $30 × 100 = 60%. That means $0.60 of every dollar you take in is gross profit. Fixed costs like ads, apps and wages still come out of that.
Markup tells you how far above cost you set the price.
Markup % = (Selling price − Cost) ÷ Cost × 100
Same phone stand: profit is $18, so the markup is $18 ÷ $12 × 100 = 150%. Same product and same profit, but 150% markup versus 60% margin. The only difference is the number you divide by. To go straight from a cost to a price, use the markup price calculator.
No. A 50% markup gives a 33.3% margin. To earn a 50% margin, you need a 100% markup, which means doubling the cost. Retailers call that "keystone" pricing.
| Cost | Pricing rule | Selling price | Profit | Margin | Markup |
|---|---|---|---|---|---|
| $20 | 50% markup | $30.00 | $10.00 | 33.3% | 50% |
| $20 | 50% margin | $40.00 | $20.00 | 50% | 100% |
The second price earns twice the profit per unit. Confusing the two rules can halve what you make on each sale.
You don't need to recalculate from prices. If you know one percentage, you can get the other:
| Markup | Margin |
|---|---|
| 10% | 9.1% |
| 20% | 16.7% |
| 25% | 20% |
| 30% | 23.1% |
| 40% | 28.6% |
| 50% | 33.3% |
| 60% | 37.5% |
| 75% | 42.9% |
| 100% | 50% |
| 150% | 60% |
| 200% | 66.7% |
| Target margin | Markup needed |
|---|---|
| 10% | 11.1% |
| 20% | 25% |
| 25% | 33.3% |
| 30% | 42.9% |
| 40% | 66.7% |
| 50% | 100% |
| 60% | 150% |
| 70% | 233.3% |
| 80% | 400% |
Notice how quickly the markup grows at high margins. Going from a 60% to an 80% margin means going from a 150% to a 400% markup.
Plan and report in margin, and use markup only as a shortcut for setting prices. Margin is the better number for decisions:
Markup is handy when you have a supplier price and want a selling price fast. Just make sure the markup you use comes from your target margin, using the conversion above. To set a price from a target margin directly:
Price = Cost ÷ (1 − Target margin)
Example: a $20 cost and a 40% target margin gives $20 ÷ 0.60 = $33.33. If you had added 40% to cost instead, you'd charge $28.00 and earn a 28.6% margin, which is $5.33 less profit on every unit.
Most margin-vs-markup guides use the supplier price as "cost". For an online store, the true cost of one sellable unit is its landed cost:
Say the phone stand costs $12 from the supplier, $3 per unit to ship to you and $1.50 to package. Its landed cost is $16.50.
Payment processing fees, marketplace commissions, outbound shipping you don't charge for, and returns all reduce margin further. Work out what they cost you per order before you decide that a margin is "good".
There is no single good margin. It depends on your category, your prices and how much you spend to win each sale. For context, here are average gross margins for listed US companies by industry, from NYU Stern professor Aswath Damodaran's January 2026 data:
| Industry | Average gross margin | Equivalent markup |
|---|---|---|
| Retail (grocery and food) | 26.3% | 35.7% |
| Retail (general) | 33.2% | 49.7% |
| Retail (special lines) | 35.3% | 54.6% |
| Shoes | 43.9% | 78.2% |
| Household products | 51.0% | 104.2% |
| Apparel | 56.9% | 131.9% |
| Software | 71.7% | 253.6% |
These figures are averages for large public companies with buying power and their own supply chains, so treat them as context rather than targets. A small online store usually needs a higher gross margin than a big retailer, because it pays more per unit for shipping, ads and payments. If paid ads are your main channel, check what ROAS your margin needs with the break-even ROAS calculator.
Find the landed cost of your three best sellers, then run each through the profit margin calculator. If a margin is below what your ads and fees need, use the markup price calculator to find the price that fixes it. Both are free, need no signup and run in your browser, so your numbers stay on your device. For the full pricing method, read how to price a product for profit.
Yes, whenever there is a profit. Both use the same profit, but margin divides it by the price, which is the larger number. So margin always comes out smaller than markup.
No. Margin can only reach 100% if the product cost nothing. Markup has no upper limit: a product that costs $5 and sells for $25 has a 400% markup and an 80% margin.
A 42.9% markup. Use Markup = 30 ÷ (100 − 30) × 100. On a $50 cost, the price would be $71.43.
Not quite. Gross margin only subtracts the cost of goods. Net profit margin also subtracts operating costs such as ads, software, wages and rent. The formulas in this guide give gross margin per product.
Use margin. Dropshipping costs (product, supplier shipping, payment and app fees) are paid on every order, and your ad budget has to come out of what's left. Margin shows that directly, and your break-even ROAS is based on it.
Ecommerce · 28 Oct 2026
Profit margin = profit ÷ revenue × 100. Here is how to calculate gross, operating and net margin, with worked examples, Excel formulas and 2026 benchmarks.
Ecommerce · 23 Oct 2026
About 7 in 10 online carts never become orders. Here is what Baymard Institute's research shows about why, and the checkout fixes that matter most.
Ecommerce · 20 Oct 2026
Start from your costs, pick a target margin and check the numbers before you spend on ads.