Gross margin = (Revenue - COGS) / Revenue. Net margin = (Revenue - ALL Costs) / Revenue. That's the entire difference. Gross margin only looks at what the product costs you. Net margin looks at what everything costs you — ads, shipping, fees, returns, software, overhead. One tells you how well you source and price. The other tells you if your business actually makes money.
Most founders track gross margin and assume it represents profit. It doesn't. A 60% gross margin can easily become a 5% net margin once you layer in ad spend and operating costs. This guide walks through both formulas with worked examples, shows you the full cost waterfall from gross to net, and gives you benchmarks by business model so you know where you stand.
Gross Margin vs Net Margin: Side-by-Side
Before diving into calculations, here's the core difference:
| Metric | Formula | What It Includes | What It Tells You |
|---|---|---|---|
| Gross Margin | (Revenue - COGS) / Revenue x 100 | Product cost only | Is the product priced well relative to cost? |
| Net Margin | (Revenue - ALL Costs) / Revenue x 100 | Every cost in the business | Is the business actually profitable? |
Gross margin is what you see on a spreadsheet. Net margin is what hits your bank account. If you only track one number, make it net margin. Gross margin is useful for sourcing and pricing decisions, but it's not profit.
How to Calculate Gross Margin
Gross margin measures the percentage of revenue left after you subtract the direct cost of the product. No marketing. No shipping to customers. No platform fees. Just the product itself.
Formula: Gross Margin = (Revenue - COGS) / Revenue x 100
What Counts as COGS
COGS (cost of goods sold) includes everything directly tied to producing or acquiring the product:
- Raw materials or wholesale purchase price
- Manufacturing and production costs
- Packaging and labeling
- Inbound freight (getting the product to your warehouse)
- Import duties and tariffs
COGS does NOT include advertising, outbound shipping to customers, payment processing, Shopify fees, software subscriptions, or warehouse rent. Those are operating expenses and they go into the net margin calculation.
Worked Example: $60 DTC Product
You sell a supplement for $60. Manufacturing, labeling, and inbound shipping cost $18 per unit.
- Revenue = $60
- COGS = $18
- Gross profit = $60 - $18 = $42
- Gross margin = $42 / $60 x 100 = 70%
That 70% looks excellent. But we haven't accounted for the $14 in Facebook Ads to acquire that customer, the $6 in shipping, the $2.04 in payment processing, or the return that happens 1 in every 12 orders. Those costs are what separate gross margin from net margin.
Worked Example: $30 Dropshipped Product
You sell a phone accessory for $30. Your AliExpress supplier charges $9 per unit including ePacket shipping to your customer.
- Revenue = $30
- COGS = $9
- Gross profit = $30 - $9 = $21
- Gross margin = $21 / $30 x 100 = 70%
Same 70% gross margin as the DTC brand above. But the dropshipper is about to get destroyed on ad costs. When your profit margin depends entirely on paid acquisition, that 70% gross margin means almost nothing without knowing CPA.
How to Calculate Net Margin
Net margin is the number that actually matters. It accounts for every cost in the business — not just the product, but the marketing, fulfillment, fees, and overhead required to sell it.
Formula: Net Margin = (Revenue - ALL Costs) / Revenue x 100
"ALL Costs" means COGS plus every operating expense: ad spend, outbound shipping, payment processing, platform fees, returns and refunds, software subscriptions, and overhead. If it costs money to run the business, it goes in this number.
Worked Example: Full Unit Economics on the $60 Supplement
Same $60 supplement. Now let's add every real cost a DTC founder pays:
| Cost Category | Amount | % of Revenue |
|---|---|---|
| Selling price | $60.00 | 100% |
| COGS (manufacturing + packaging + inbound freight) | -$18.00 | 30.0% |
| Gross Profit | $42.00 | 70.0% |
| Facebook Ads (CPA) | -$14.00 | 23.3% |
| Outbound shipping | -$6.00 | 10.0% |
| Payment processing (2.9% + $0.30) | -$2.04 | 3.4% |
| Shopify plan (prorated per order) | -$0.75 | 1.3% |
| Returns allowance (~8% rate) | -$4.80 | 8.0% |
| Software & overhead (prorated) | -$1.50 | 2.5% |
| Total Costs | -$47.09 | 78.5% |
| Net Profit | $12.91 | 21.5% |
The product went from a 70% gross margin to a 21.5% net margin. That's a 48.5-point gap. And this is actually a healthy example — many DTC brands run net margins of 10-15% or worse. For a deeper look at what "good" looks like, see our profit margin by industry benchmarks.
See your real margin — gross and net
Plug in your product cost, ad spend, shipping, and fees. See the gap between gross margin and what you actually keep per order.
Open Profit Margin Calculator →The Full Waterfall: How 60% Gross Becomes 5% Net
The most dangerous misconception in ecommerce is assuming gross margin approximates profit. Here's a realistic waterfall showing how a seemingly healthy 60% gross margin gets carved down to almost nothing — step by step.
| Stage | Cost Deducted | % of Revenue | Remaining Margin |
|---|---|---|---|
| Revenue | — | — | 100% |
| After COGS (gross margin) | Product cost | 40% | 60% |
| After ad spend | Facebook / Google Ads | 25% | 35% |
| After shipping | Outbound fulfillment | 10% | 25% |
| After payment processing | Stripe / Shopify Payments | 3.5% | 21.5% |
| After platform fees | Shopify plan + apps | 2% | 19.5% |
| After returns | Refunds + return shipping | 5% | 14.5% |
| After software & tools | Klaviyo, analytics, etc. | 2% | 12.5% |
| After overhead | Warehouse, contractors, misc | 3% | 9.5% |
| Net Margin | — | — | 9.5% |
60% gross margin. 9.5% net margin. That's a 50-point gap. Now bump ad spend from 25% to 30% (one bad month on Meta) and net margin drops to 4.5%. Add a higher return rate — common in fashion — and you're at breakeven or below.
This is why founders who only track gross margin get blindsided. Gross margin is a necessary metric for pricing and sourcing, but it's not profit. The full profit margin calculation requires every cost line.
COGS vs Operating Expenses: What Goes Where
Drawing the line between COGS and operating expenses is where most founders mess up. Getting it wrong means your gross margin number is meaningless.
| COGS (Gross Margin Deduction) | Operating Expenses (Net Margin Deduction) |
|---|---|
| Raw materials / wholesale cost | Facebook / Google / TikTok Ads |
| Manufacturing / production | Outbound shipping to customers |
| Packaging and labeling | Payment processing (Stripe, Shopify Payments) |
| Inbound freight (product to warehouse) | Shopify / platform subscription |
| Import duties and tariffs | App subscriptions (Klaviyo, etc.) |
| Direct labor on production | Returns, refunds, chargebacks |
| Quality control costs | Warehouse rent / 3PL fees |
| — | Contractor / employee payroll |
| — | Customer service costs |
The simplest rule: if the cost exists only because you made or bought the product, it's COGS. If the cost exists because you're running a business that sells products, it's an operating expense.
A common mistake: including outbound shipping in COGS. Shipping to your customer is a selling expense, not a product cost. Your gross margin should reflect what the product costs to create — not what it costs to deliver. For more on shipping math, see our guide on how to calculate shipping costs.
Gross Margin vs Net Margin Benchmarks by Business Model
Margins vary dramatically based on your business model. A dropshipper and a private label brand can sell the same product category and have completely different margin profiles.
| Business Model | Typical Gross Margin | Typical Net Margin | Why |
|---|---|---|---|
| Private Label / DTC | 60-80% | 15-25% | Low COGS, brand premium, higher AOV offsets ad cost |
| Dropshipping | 30-50% | 5-15% | Supplier takes a cut, ad spend eats most of the margin |
| Wholesale / Reselling | 25-40% | 8-15% | Lower gross margin but often lower ad spend (marketplace traffic) |
| Print on Demand | 30-50% | 5-12% | Similar to dropshipping; production cost per unit is higher |
| Subscription Box | 40-60% | 10-20% | Repeat revenue reduces effective CPA over time |
| Digital Products | 85-95% | 30-60% | Near-zero COGS; margin eroded mainly by ad spend |
Private label and DTC brands have the widest gap between gross and net. A 70% gross margin sounds great until you realize 25% goes to ads, 10% to shipping, and another 10-15% to fees and overhead. Dropshipping has a tighter gap because gross margins are already compressed — but the net margin floor is also lower.
Digital products are the outlier. Near-zero COGS means gross margin is 85%+, and the only major cost is customer acquisition. If you can get CPA under control, net margins above 40% are achievable.
For average Shopify store revenue and what other stores actually earn, we have a full breakdown.
Worked Example: Monthly P&L From Gross to Net
Let's walk through a complete month for a DTC skincare brand doing $80,000 in revenue. This shows exactly how gross margin shrinks to net margin line by line.
| Line Item | Amount | % of Revenue |
|---|---|---|
| Revenue (1,600 orders x $50 AOV) | $80,000 | 100% |
| COGS ($14 per unit) | -$22,400 | 28.0% |
| Gross Profit | $57,600 | 72.0% |
| Facebook & Instagram Ads | -$20,000 | 25.0% |
| Google Ads | -$4,000 | 5.0% |
| Shipping (avg $5.50 per order) | -$8,800 | 11.0% |
| Payment processing (2.9% + $0.30) | -$2,800 | 3.5% |
| Shopify plan + apps | -$500 | 0.6% |
| Returns & refunds (6% rate) | -$4,800 | 6.0% |
| Email marketing (Klaviyo) | -$400 | 0.5% |
| 3PL / warehouse fees | -$2,400 | 3.0% |
| Miscellaneous overhead | -$1,200 | 1.5% |
| Total Operating Expenses | -$44,900 | 56.1% |
| Net Profit | $12,700 | 15.9% |
$80,000 in revenue, $57,600 gross profit (72% gross margin), but only $12,700 net profit (15.9% net margin). The 56-point gap between gross and net is where your money actually goes.
This is a healthy DTC brand. Most stores at this scale are closer to 10-12% net margin. If this brand's CPA increases from $15 to $20 next month (which happens regularly as CPMs fluctuate), net margin drops to about 10.6%. One bad ad month can cut profit nearly in half.
5 Common Mistakes Founders Make With Gross vs Net Margin
Every one of these causes founders to overestimate their profitability:
- Reporting gross margin as "profit margin." When someone asks "what's your margin?" and you say "65%," that's almost certainly gross margin. Your actual profit margin (net) is probably 35-50 points lower. This isn't just misleading to investors — it misleads you.
- Including shipping in COGS. Outbound shipping to customers is a selling expense, not a product cost. If you lump it into COGS, your gross margin looks artificially low and you lose the signal that gross margin is supposed to give you — whether the product itself is priced correctly.
- Ignoring returns in the net margin calculation. Returns don't just cost you the refund. They cost you the product (if unsalvageable), outbound shipping, return shipping, restocking time, and the ad spend you already paid to acquire that customer. A markup calculation that ignores returns will always overstate your margins.
- Treating ad spend as optional or separate. Some founders calculate "margin before ads" as if ad spend is optional. If you're a DTC brand acquiring customers through paid media, ad spend is as essential as COGS. A margin that excludes your primary acquisition channel is fiction.
- Not recalculating as the business scales. Fixed costs (Shopify plan, software, warehouse minimums) get amortized over more orders as you grow. But variable costs can increase — CPAs tend to rise as you scale ad spend, and shipping rates may not improve. Net margin isn't static. Recalculate monthly.
When to Use Gross Margin vs Net Margin
Each metric answers a different question. Use the right one for the right decision:
- Evaluating a new product or supplier? Use gross margin. If gross margin is below 50%, the product will be hard to sell profitably through paid channels. You either need a lower cost or a higher price.
- Deciding whether to keep running ads? Use net margin (or at minimum, contribution margin — revenue minus all variable costs per order). If net margin is negative, every sale loses money.
- Talking to investors or evaluating business health? Use net margin. This is the number that tells you whether the business generates real profit. Investors see through gross margin presentations.
- Comparing yourself to industry benchmarks? Make sure you're comparing the same metric. If an industry report says "beauty brands average 65% margin," that's almost certainly gross margin. Net margin for beauty DTC brands is closer to 12-20%.
- Setting prices? Start with gross margin to ensure the product economics work, then validate with net margin to make sure the business can actually profit at that price point after all costs. Our profit margin calculator lets you model both.
How to Improve Your Net Margin
If your gross margin is healthy but net margin is thin, the problem is in the operating expense layer. Here are the highest-impact levers:
Reduce CPA. Ad spend is usually the biggest line item between gross and net. A $2 reduction in CPA on 1,000 monthly orders = $2,000 straight to the bottom line. Better creative, tighter targeting, and higher conversion rates all reduce CPA without cutting spend.
Increase AOV. Many costs are fixed per order (payment processing flat fee, shipping, pick-and-pack). A $50 AOV with a $5 shipping cost means 10% of revenue goes to shipping. A $100 AOV with the same $5 shipping cost means only 5%. Bundles, upsells, and post-purchase offers increase AOV without increasing per-order costs.
Lower return rate. Returns are a triple hit — you lose the revenue, eat the return shipping cost, and already paid to acquire that customer. Clearer product descriptions, better size guides, and accurate photography reduce returns at the source.
Negotiate shipping rates. Carriers offer volume discounts once you pass certain thresholds. Even saving $0.50 per order on 2,000 monthly orders adds $1,000 per month to net profit. If you want to model different Shopify profit scenarios or run the numbers for a dropshipping model, our free calculators handle the math.
Cut software bloat. Many Shopify stores run a handful or more paid apps. Audit your subscriptions quarterly. Kill anything that doesn't directly drive revenue or save meaningful time. $200/month in unused apps is $2,400/year off your bottom line.
The Formula Cheat Sheet
Quick reference for every margin-related formula you'll need:
| Formula | Equation | Example ($60 product, $18 COGS, $47 total costs) |
|---|---|---|
| Gross Margin % | (Revenue - COGS) / Revenue x 100 | ($60 - $18) / $60 = 70% |
| Net Margin % | (Revenue - All Costs) / Revenue x 100 | ($60 - $47) / $60 = 21.7% |
| Gross Profit $ | Revenue - COGS | $60 - $18 = $42 |
| Net Profit $ | Revenue - All Costs | $60 - $47 = $13 |
| Markup % | (Revenue - COGS) / COGS x 100 | ($60 - $18) / $18 = 233% |
| Price from Target Margin | Total Cost / (1 - Target Margin) | $47 / (1 - 0.25) = $62.67 for 25% net |
For a deeper walk-through on converting between markup and margin, we have a separate guide with conversion tables.
Frequently Asked Questions
What is the difference between gross margin and net margin?
Gross margin only subtracts COGS (the direct product cost) from revenue. Net margin subtracts ALL costs — COGS plus marketing, shipping, fees, returns, and overhead. Gross margin tells you if the product is priced well. Net margin tells you if the business is actually profitable after running it.
How do you calculate gross margin?
Gross Margin = (Revenue - COGS) / Revenue x 100. If you sell a product for $60 and COGS is $20, your gross margin is ($60 - $20) / $60 x 100 = 66.7%. COGS includes raw materials, manufacturing, packaging, and inbound freight — not marketing or shipping to customers.
How do you calculate net margin?
Net Margin = (Revenue - ALL Costs) / Revenue x 100. "ALL Costs" means COGS plus ad spend, outbound shipping, payment processing, platform fees, returns, software, and overhead. If revenue is $60 and total costs are $51, net margin is ($60 - $51) / $60 x 100 = 15%.
Why can a 60% gross margin still result in only 5% net margin?
Because operating expenses between gross and net are massive. Advertising alone can eat 20-30% of revenue. Shipping adds 5-10%. Payment processing takes 3-4%. Returns cost 2-5%. Platform fees, software, and overhead add another 5-10%. All together, these costs can consume 50+ percentage points of your gross margin.
What costs go into COGS vs operating expenses?
COGS covers everything directly tied to the product: raw materials, manufacturing, packaging, labeling, and inbound freight. Operating expenses cover everything else: advertising, outbound shipping, payment processing, Shopify fees, software, returns, warehouse costs, and payroll. Getting this distinction right is essential for meaningful gross margin tracking.
What is a good gross margin for ecommerce?
A good ecommerce gross margin is 50-70%. Private label and DTC brands typically hit 60-80%. Dropshipping runs 30-50%. If your gross margin is below 50%, scaling with paid ads becomes very difficult because there isn't enough room to absorb customer acquisition costs and still net a profit.

