All playbooks

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

The three layers of ecommerce margin, what belongs in each formula, and a step-by-step way to calculate true profitability per SKU.

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

Profit margin is the single number that decides whether an ecommerce business is a real business or an expensive hobby. Yet most sellers cannot tell you their actual margin within ten points. They know revenue, they vaguely know cost of goods, and everything in between is a blur.

This guide gives you the formulas, the industry benchmarks, and a step-by-step process for calculating margin at every level: per SKU, per channel and for the business as a whole.

The three layers of ecommerce margin

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

  • Gross margin. (Revenue minus COGS) divided by revenue. Product-level profitability. Healthy range is roughly 50 to 70 percent.
  • Operating margin. (Revenue minus COGS minus operating expenses) divided by revenue. Business-level profitability before taxes. Healthy range is roughly 15 to 30 percent.
  • Net margin. (Revenue minus all costs) divided by revenue. What you actually keep. Healthy range is roughly 10 to 20 percent, with the ecommerce average around 10.

How to calculate gross profit margin

Gross margin formula

Gross margin = (revenue minus COGS) divided by revenue, times 100

Gross margin tells you how much you keep after producing and delivering the product. It is the foundation of pricing: if gross margin is too low, no amount of sales volume makes the business profitable. The catch is what belongs in COGS, which is more than the product cost.

  • Product purchase or manufacturing cost.
  • Inbound freight, duties and customs fees.
  • Packaging materials, such as boxes, inserts and labels.
  • Outbound shipping, the label cost, not what the customer paid.
  • Fulfillment and pick-and-pack fees, whether FBA or 3PL.
  • Payment processing fees, commonly around 2.9 percent plus a fixed amount per transaction.
  • Marketplace referral fees, such as Amazon's roughly 15 percent.
Worked example: gross margin

Product sells for: $45.00

Product cost: $12.00

Inbound freight: $2.40

Packaging: $1.20

Shipping label: $5.80

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

Total COGS: $23.01

Gross profit: $21.99, a 48.9 percent margin

Illustrative only. Not real store data.

How to calculate operating margin

Operating margin subtracts every cost of running the business from gross profit. This is where most sellers discover their margins are far thinner than they assumed.

Operating margin formula

Operating margin = (revenue minus COGS minus operating expenses) divided by revenue, times 100

The operating expenses that matter for ecommerce:

  • Advertising spend, usually the largest line, often 15 to 30 percent of revenue for growth-stage brands.
  • Software and SaaS, from the storefront platform to email, analytics and support tools.
  • Payroll and contractors, including assistants, designers and support agents.
  • Returns and refunds, which run high for apparel and low for most other categories.
  • Warehousing and storage.
  • Insurance and legal.

Margin benchmarks by industry

Your target margin depends heavily on category. Treat the ranges below as rough industry benchmarks, not targets set in stone; they vary a lot by business, sourcing and channel.

  • Beauty and skincare: gross around 60 to 80 percent, net around 15 to 25, low return rates.
  • Apparel and fashion: gross around 50 to 65 percent, net around 8 to 15, high return rates of 20 to 30.
  • Home and garden: gross around 45 to 60 percent, net around 10 to 18.
  • Electronics: gross around 20 to 40 percent, net around 5 to 10.
  • Food and beverage: gross around 40 to 60 percent, net around 5 to 12, very low returns.
  • Health and supplements: gross around 60 to 80 percent, net around 15 to 25.
  • Jewelry and accessories: gross around 60 to 75 percent, net around 15 to 25.

Notice how apparel pairs high gross margins with low net margins. That is the return-rate effect: a high return rate with two-way shipping can erase ten or more 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 margin per SKU to separate your winners from the profit-draining losers hiding inside the average.

  1. Start with the selling price, the amount actually charged after discounts, not the list price.
  2. Subtract landed cost, meaning product cost plus freight, duties and packaging.
  3. Subtract fulfillment cost, the pick, pack and shipping label.
  4. Subtract transaction fees, payment processing plus any marketplace referral fees.
  5. Apply a return-rate adjustment, spreading return shipping and lost units across everything sold, not just the returned ones.
  6. Allocate ad spend per SKU, dividing spend by units sold, or using attribution data where you have it.
  7. The result is your true per-SKU contribution margin.

Eight ways to improve your margins

  1. Negotiate supplier pricing. Order larger quantities, pay upfront, or find alternative suppliers. On a 50 percent gross-margin business, a ten percent cut in COGS drops straight to profit.
  2. Increase average order value. Bundles, upsells and free-shipping thresholds spread fixed shipping and handling across more revenue per order.
  3. Reduce return rates. Better photos, sizing guides, detailed descriptions and quality control. Every return carries real shipping and processing cost.
  4. Optimize ad spend. Kill campaigns below your break-even ROAS, shift budget to high-margin products, and use bid optimization to cut waste.
  5. Consolidate your SaaS stack. App subscriptions quietly add up to several hundred dollars a month or more. Tools that combine functions can cut that meaningfully.
  6. Shift toward DTC. Marketplace referral and fulfillment fees are real; your own storefront margins are typically higher per order.
  7. Introduce high-margin products. Digital products, premium tiers or subscriptions with near-zero cost of goods lift the blended number.
  8. Optimize shipping. Negotiate carrier rates, use poly mailers instead of boxes where you can, and ship from closer to your customers.

The reason this is hard to keep current is that per-SKU margin depends on ad spend, returns and shipping that live in different systems and move every week. Tracking true margin per SKU in real time, factoring all of that in, is the kind of work an autonomous operating-system approach is designed to do. What is live today from StoreWiz is the free store audit; the autonomous platform is in active development.

Profit margin vs. markup

These two are often confused, but they produce very different numbers from the same cost and price.

Margin vs. markup on a $10 cost, $25 price

Margin = (price minus cost) divided by price = (25 minus 10) / 25 = 60 percent

Markup = (price minus cost) divided by cost = (25 minus 10) / 10 = 150 percent

Illustrative only. Not real store data.

A 2x markup equals a 50 percent margin; a 3x markup equals a 67 percent margin. Use margin for financial reporting and markup for pricing decisions.

Track all three layers, calculate margin per SKU to find the hidden losers, and include every real cost, landed cost, fulfillment, processing and marketplace fees, in COGS. For apparel especially, the return rate is the number that decides net margin.

Frequently asked questions

What is a good profit margin for a storefront? Aim for a gross margin around 50 to 70 percent and a net margin around 10 to 20. Below 10 percent net the business is fragile, since one bad month of ad performance can push it into losses. Above 20 percent net is well above average.

Should I include ad spend in margin? Yes, for operating and net margin. Some sellers fold ad spend into a contribution margin because it is a direct cost of each sale. The key is consistency: pick a method and use it every month so trends stay comparable.

How often should I review margins? Review blended margins weekly and per-SKU margins monthly. Costs change constantly, so a margin that was healthy in January can be underwater by March if nobody is watching.

My gross margin is high but net margin is low. What is wrong? Almost always ad spend or overhead. If gross is 60 percent and net is 5, the gap went to advertising, software, payroll or returns. Start by auditing blended ROAS and the monthly software bill.

How do I calculate margins for Amazon FBA products? Include the referral fee (typically around 15 percent), FBA fulfillment fees, monthly storage and any Amazon advertising. Use your Amazon settlement report as the definitive source; most FBA sellers find their true margins are ten to fifteen points lower than they assumed.

See where your own store stands.

The free audit scores 15 categories against your competitors and quantifies the leak in dollars. No card, no call.

Run your free audit

Keep reading

PlaybookHow to Scale a Shopify Store to $1M a Year: A Phase-by-Phase RoadmapPlaybookThe Shopify App Stack Problem: Why 10+ Apps Quietly Erode Your MarginsPlaybook$50K to $1M a Month Without Adding Headcount: An Automation-First Growth Model
How to Calculate and Track Your Ecommerce Profit Margins (With Formulas) | StoreWiz