Skip to article
Analytics & Business

How to Calculate and Track Your Ecommerce Profit Margins (With Formulas)

Margin formulas: gross margin, contribution margin, net margin. Track per SKU, per channel, per customer. Know which products are actually profitable and make informed pricing decisions.

SW

StoreWiz Team

Dec 25, 2025 · 11 min read

How to Calculate and Track Your Ecommerce Profit Margins (With Formulas)

TL;DR

Ecommerce profit margins have three layers: Gross margin (revenue minus COGS, target 50–70%), Operating margin (after ad spend, software, and payroll, target 15–30%), and Net margin (after taxes and everything else, target 10–20%). The average ecommerce net profit margin is 10%. Use the formula: Net Profit Margin = (Revenue − All Costs) ÷ Revenue × 100. This guide includes formulas, benchmarks by industry, and a step-by-step margin calculator for every SKU in your store.

Profit margin is the single number that determines whether your ecommerce business is a real business or an expensive hobby. Yet most sellers cannot tell you their actual margin within 10 percentage points. They know revenue, they vaguely know COGS, and everything in between is a blur.

This guide gives you the exact formulas, industry benchmarks, and a step-by-step process for calculating profit margins at every level — per SKU, per channel, and for your business as a whole.

The Three Types of Ecommerce Profit Margin

Not all margins measure the same thing. Each layer reveals different information about your business health:

Margin TypeFormulaWhat It Tells YouHealthy Range
Gross Margin(Revenue − COGS) ÷ RevenueProduct-level profitability50–70%
Operating Margin(Revenue − COGS − OpEx) ÷ RevenueBusiness-level profitability before taxes15–30%
Net Margin(Revenue − All Costs) ÷ RevenueWhat you actually keep10–20%

How to Calculate Gross Profit Margin

The Formula

Gross Margin = (Revenue − COGS) ÷ Revenue × 100

Gross margin tells you how much money you keep after producing and delivering the product. It is the foundation of your pricing strategy. If your gross margin is too low, no amount of sales volume will make the business profitable.

What to Include in COGS

Example: Gross Margin Calculation

Product sells for: $45.00

Product cost: $12.00

Inbound freight: $2.40

Packaging: $1.20

Shipping label: $5.80

Payment processing (2.9% + $0.30): $1.61

Total COGS: $23.01

Gross Profit: $21.99 (48.9% margin)

How to Calculate Operating Margin

Operating margin subtracts all the costs of running your business from gross profit. This is where most sellers discover their margins are far thinner than expected.

The Formula

Operating Margin = (Revenue − COGS − Operating Expenses) ÷ Revenue × 100

Operating Expenses for Ecommerce

Ecommerce Profit Margin Benchmarks by Industry

Your target margin depends heavily on your product category. Here are industry benchmarks for 2026:

CategoryAvg Gross MarginAvg Net MarginAvg Return Rate
Beauty & Skincare60–80%15–25%5–8%
Apparel & Fashion50–65%8–15%20–30%
Home & Garden45–60%10–18%8–12%
Electronics20–40%5–10%10–15%
Food & Beverage40–60%5–12%2–5%
Health & Supplements60–80%15–25%5–10%
Pet Products40–55%10–15%5–8%
Jewelry & Accessories60–75%15–25%10–15%

Key Insight

Notice how apparel has high gross margins but low net margins. That is the return rate effect. A 25% return rate with two-way shipping costs can erase 10+ percentage points of margin. If you sell apparel, your return management strategy IS your profit strategy.

Per-SKU Margin Calculator: Step by Step

Knowing your blended margin is not enough. You need to calculate margin per SKU to identify your winners and your profit-draining losers. Here is the step-by-step process:

  1. 1.
    Start with the selling price — the actual amount charged after discounts (not the list price)
  2. 2.
    Subtract landed cost — product cost + freight + duties + packaging
  3. 3.
    Subtract fulfillment cost — pick, pack, and shipping label
  4. 4.
    Subtract transaction fees — payment processing + marketplace referral fees
  5. 5.
    Apply return rate adjustment — multiply result by (1 − return rate) and add back return shipping costs
  6. 6.
    Allocate ad spend per SKU — divide total ad spend by units sold (or use attribution data if available)
  7. 7.
    The result is your true per-SKU contribution margin

8 Strategies to Improve Your Ecommerce Profit Margins

  1. 1.
    Negotiate supplier pricing. Order larger quantities, pay upfront, or find alternative suppliers. A 10% reduction in COGS on a 50% gross margin business drops straight to profit.
  2. 2.
    Increase average order value (AOV). Bundles, upsells, and free shipping thresholds spread fixed costs across more revenue. A $60 AOV with $8 shipping cost is far more profitable than $30 AOV with the same $8 shipping cost.
  3. 3.
    Reduce return rates. Better product photos, sizing guides, detailed descriptions, and quality control. Every return costs $10–$20 in shipping and processing.
  4. 4.
    Optimize ad spend. Kill campaigns with ROAS below your break-even point. Shift budget to high-margin products. Use AI bid optimization to eliminate waste.
  5. 5.
    Consolidate your SaaS stack. The average Shopify seller pays $300–$1,200/month in app subscriptions. Platforms that combine multiple functions (analytics, email, support, ads) can cut this by 50–70%.
  6. 6.
    Shift to DTC from marketplace. Amazon takes 15% referral fees plus FBA costs. Your own Shopify store margins are 10–15 percentage points higher per order.
  7. 7.
    Introduce high-margin products. Add digital products, premium tiers, or subscription options that have near-zero COGS.
  8. 8.
    Optimize shipping costs. Negotiate rates with carriers, use poly mailers instead of boxes where possible, and ship from locations closer to your customers.

Tools like StoreWiz track per-SKU margins in real time, automatically factoring in ad spend, returns, and shipping — so you can identify margin problems before they compound over weeks of sales.

Profit Margin vs. Markup: Know the Difference

These two terms are often confused, but they produce very different numbers:

MetricFormulaExample ($10 cost, $25 price)
Margin(Price − Cost) ÷ Price($25 − $10) ÷ $25 = 60%
Markup(Price − Cost) ÷ Cost($25 − $10) ÷ $10 = 150%

A 2x markup (100%) equals a 50% margin. A 3x markup (200%) equals a 67% margin. Always use margin for financial reporting and markup for pricing decisions.

Key Takeaways

  • Track three margin layers: gross (product profitability), operating (business profitability), and net (what you keep)
  • Average ecommerce net margin is 10% — beauty and supplements lead at 15–25%, electronics trail at 5–10%
  • Calculate margin per SKU to find hidden losers dragging down your blended numbers
  • Include ALL costs in COGS: landed cost, fulfillment, payment processing, and marketplace fees
  • Return rates destroy apparel margins — a 25% return rate can erase 10+ points of net margin
  • Margin and markup are different calculations — use margin for reporting, markup for pricing
  • The fastest margin wins are supplier negotiation, AOV optimization, and SaaS stack consolidation

Frequently Asked Questions

What is a good profit margin for a Shopify store?

A healthy Shopify store should target a gross margin of 50–70% and a net margin of 10–20%. If your net margin is below 10%, your business is fragile — one bad month of ad performance or a supplier price increase can push you into losses. If you are above 20% net, you are performing well above industry average.

Should I include ad spend in my margin calculations?

Yes, for operating and net margin calculations. Some sellers calculate a “contribution margin” that includes ad spend in COGS because it is a direct cost of acquiring each sale. The key is consistency — pick a method and use it every month so you can track trends accurately.

How often should I review my margins?

Review blended margins weekly and per-SKU margins monthly. Costs change constantly — shipping rates adjust quarterly, supplier costs fluctuate with exchange rates, and ad costs shift with competition. A margin that was healthy in January can be underwater by March if you are not monitoring.

My gross margin is high but net margin is low. What is wrong?

This is almost always an ad spend or overhead problem. If your gross margin is 60% but net margin is 5%, the gap is consumed by advertising, SaaS subscriptions, payroll, or returns. Start by auditing your ad spend efficiency (what is your blended ROAS?) and your monthly SaaS bill. Most sellers in this position are spending 25–35% of revenue on ads and another 5–10% on software.

How do I calculate margins for Amazon FBA products?

Amazon margins must include: referral fees (typically 15%), FBA fulfillment fees ($3–$8 per unit depending on size and weight), monthly storage fees, and any advertising costs from Amazon PPC. Download your Settlement Report from Amazon Seller Central and use it as the definitive source for all fees. Most FBA sellers find their true margins are 10–15 percentage points lower than they assumed.

SW

Written by StoreWiz Team

Financial Analysis

The StoreWiz team writes about ecommerce automation, AI operations, and growth strategies for modern online sellers. Our insights come from building technology that helps brands scale without scaling headcount.

Stay Ahead

Get pricing & growth strategies in your inbox

Join 2,000+ ecommerce operators getting weekly insights on autonomous commerce, pricing tactics, and AI growth.

No spam. Unsubscribe anytime.