By El Ghali Bennis · Published
Gross Margin vs Net Margin Ecommerce: What Each Tells You
Gross margin shows if your products are priced right. Net margin shows if your store actually makes money. Here's how to calculate both, with real examples.

Gross margin vs net margin in ecommerce comes down to what you subtract. Gross margin is revenue minus the direct cost of the products you sold, divided by revenue. Net margin subtracts every other cost too: ads, platform fees, payment fees, shipping, payroll and taxes. Gross margin tests your pricing. Net margin tests your whole business.
Plenty of stores post a 60% gross margin and still lose money every month. The gap between the two numbers is where ecommerce businesses either build wealth or quietly bleed out. This guide walks through both formulas, a full profit and loss example, the benchmarks worth aiming for, and the middle metric most operators skip: contribution margin.
What Is the Difference Between Gross Margin and Net Margin?
Gross margin measures profit after product costs only. Net margin measures profit after all costs. Gross margin always looks bigger, and the distance between them is your overhead, marketing and fees. If that distance is huge, your store has a cost problem, not a pricing problem.
Here's the side-by-side view:
| Metric | What it subtracts | What it answers | Typical ecommerce range |
|---|---|---|---|
| Gross margin | Cost of goods sold (COGS) | Are my products priced well? | 40%–70% |
| Contribution margin | COGS + variable costs (shipping, fees, ads) | Does each order make money? | 15%–35% |
| Net margin | Every cost, including overhead and taxes | Does the business make money? | 5%–20% |
These ranges are rules of thumb from operator experience, and they shift a lot by category. For niche-specific numbers, see our ecommerce profit margins by niche benchmarks.
Gross profit vs net profit for an online store
Gross profit and net profit are the dollar versions of the same idea. Gross profit is revenue minus COGS. Net profit is what's left after everything. Margins are those dollar figures expressed as a percentage of revenue, which lets you compare months, products and competitors on equal footing.
How to Calculate Gross Margin for an Online Store
To calculate gross margin, subtract cost of goods sold from revenue, then divide by revenue and multiply by 100. The result tells you how many cents of every sales dollar are left after paying for the product itself.
Gross margin % = (Revenue − COGS) ÷ Revenue × 100
What counts as cost of goods sold in ecommerce
Cost of goods sold ecommerce operators should track includes only the costs tied directly to the units you sold. The IRS describes COGS in its business guidance at irs.gov, and your accountant should confirm the treatment for your situation. In practice, include:
- The wholesale or manufacturing price of each unit
- Inbound freight and import duties to get stock to you
- Packaging that ships with the product (boxes, inserts, labels)
- Third-party fulfillment pick-and-pack fees, if you use a 3PL
Leave out ad spend, software subscriptions, your salary and outbound shipping you don't pass through. Those belong further down the statement. Mixing them into COGS makes your gross margin look worse than it is and hides what's really going on.
A quick worked example
Say you sell a ceramic mug for $32. The mug costs $9 from your supplier, $1.50 to ship to your warehouse, and $0.75 for packaging. COGS is $11.25. Gross profit is $20.75, so gross margin is 20.75 ÷ 32 = 64.8%.
Don't confuse margin with markup. A $11.25 cost sold at $32 is a 184% markup but a 64.8% margin. If you're setting prices, the formulas in our guide on pricing clothing for profit show how to move between the two.
Net Profit Margin Formula for Ecommerce
The net profit margin formula for ecommerce is net profit divided by revenue, times 100. Net profit is revenue minus all expenses: COGS, marketing, shipping, payment processing, platform and app fees, labor, rent, software and taxes.
Net margin % = (Revenue − All Expenses) ÷ Revenue × 100
It's the number that survives contact with reality. Gross margin can look healthy while payment fees, returns, discounts and customer acquisition eat everything underneath it.
Ecommerce profit and loss example
Here's a simplified monthly profit and loss example for a store doing $50,000 in revenue:
| Line item | Amount | % of revenue |
|---|---|---|
| Revenue | $50,000 | 100% |
| COGS | $20,000 | 40% |
| Gross profit | $30,000 | 60% |
| Shipping (net of what customers pay) | $3,500 | 7% |
| Payment processing | $1,600 | 3.2% |
| Returns and refunds | $2,000 | 4% |
| Ad spend | $10,000 | 20% |
| Contribution profit | $12,900 | 25.8% |
| Platform, apps and software | $900 | 1.8% |
| Contractors and salaries | $4,500 | 9% |
| Other overhead | $1,000 | 2% |
| Net profit (pre-tax) | $6,500 | 13% |
A 60% gross margin shrinks to 13% net. Nothing here is unusual, which is exactly the point. If you only watched gross margin, you'd think you were keeping $30,000. You're keeping $6,500 before income tax.
What Is a Good Net Profit Margin for Ecommerce?
A good net profit margin for ecommerce is typically 10% to 20%. Under 5% leaves no room for a bad month. Above 20% is excellent and usually means strong repeat purchasing, a premium brand or low ad dependence. Stores in low-margin categories can still thrive at 8% with high volume.
Context matters more than the headline number:
- Early-stage stores often run at 0–5% net because they're spending heavily on acquisition. That's fine if it's deliberate and cash lasts.
- High-AOV, low-return categories (home goods, supplements with subscriptions) tend to reach the top of the range. Our breakdown of supplement margins and costs shows how that plays out.
- Apparel loses a lot to returns. The numbers in clothing return rate benchmarks explain why a 65% gross margin can turn into a thin net.
For the broader picture of what owners actually take home, read how much ecommerce store owners make.
Contribution Margin: The Number in Between
Contribution margin in ecommerce is revenue minus all variable costs per order: COGS, shipping, payment fees, returns and the ad spend needed to win the order. It shows whether each sale adds money toward fixed costs, which makes it the best metric for scaling decisions.
Contribution margin % = (Revenue − COGS − Variable Costs) ÷ Revenue × 100
Run it at the order level. A $60 order with $24 COGS, $5 shipping, $2 payment fees, $2 expected returns and $18 in acquisition cost contributes $9, or 15%. That's positive, so scaling ad spend adds profit. If acquisition cost climbs to $30, contribution goes negative and every extra sale digs the hole deeper, no matter how good your gross margin looks.
Use it to set your ad ceiling
Calculate contribution margin before ad spend. In the example above that's $27 per order. Your break-even customer acquisition cost is $27. Anything below it makes money on the first order. Anything above it needs repeat purchases to pay back, so you need to know your repeat rate before you push harder.
How to Improve Both Margins
You raise gross margin by lowering COGS or raising prices. You raise net margin by cutting the costs below gross profit: fees, ads, returns and tools. Most stores find faster wins in the second group because pricing changes carry demand risk.
Levers for gross margin
- Renegotiate supplier pricing once you pass volume thresholds
- Test a 5% price increase on your top three sellers
- Bundle slow movers with best sellers to lift average order value
- Switch to lighter, cheaper packaging if it doesn't hurt unboxing
Levers for net margin
- Audit your software stack. Plenty of stores pay for a platform plus apps for abandoned cart, reviews, wishlist and loyalty. Check Shopify's pricing page for base plans, then add what your apps cost. Those fixed fees count against net margin every month.
- Recover abandoned carts. It's revenue you already paid to acquire, so it lifts margin without extra ad spend.
- Cut return rates with better size guides, photos and customer Q&A on product pages.
- Lean on email and repeat buyers. Retention costs far less than acquisition.
Rovela was built around that software-stack problem. Every store includes abandoned cart, wishlist, loyalty, reviews and Q&A by default on a flat subscription with no commission on sales, and Rovela reports merchants typically save $5,000+ per year versus their previous platform and plugin costs. That money drops straight to net margin. See Rovela's pricing for the plan details.
Ecommerce Margin Calculator: Build Your Own in 10 Minutes
You don't need special software for an ecommerce margin calculator. A spreadsheet with six rows does the job, and building it yourself forces you to find the costs you've been ignoring.
- Enter revenue for the month, net of discounts and refunds.
- Enter COGS from your supplier invoices, freight and packaging.
- Calculate gross margin: (revenue − COGS) ÷ revenue.
- Add variable costs: shipping, payment processing, returns, ad spend. Calculate contribution margin.
- Add fixed costs: platform, apps, contractors, software, rent.
- Calculate net margin and compare it against last month.
Track it monthly, not yearly. A margin that slides one point per month looks harmless until you're six months in. If you're still estimating what a new store could earn, our guide on profit per sale for an online store gives realistic starting figures.
Common mistakes that distort your margins
- Treating ad spend as COGS. It inflates COGS and makes products look unprofitable.
- Ignoring payment fees. Stripe and PayPal take roughly 3% per order, as listed on their public pricing pages.
- Forgetting returns. Refunded revenue plus lost shipping hits both margins.
- Skipping your own pay. If you do the work for free, your net margin is fiction.
- Using markup instead of margin. A 100% markup is only a 50% margin.
Which Margin Should You Watch?
Watch all three, but for different decisions. Use gross margin for pricing and sourcing, contribution margin for ad budgets and scaling, and net margin for the health of the business and what you can actually pay yourself. Looking at only one gives you a distorted picture.
If your gross margin is below 40%, fix pricing or sourcing first. If gross is healthy but net is under 5%, the leak is in ads, fees, returns or tools. Start with the biggest line item on your profit and loss statement, not the easiest one.
If you want fewer fixed costs eating into net margin, Rovela builds a complete store from a plain-language description, with 100+ features included and no plugin bills stacked on top. You can try it at rovela.ai and see how much of your current stack you actually need.
