Gross margin

Also known as: Gross profit margin

Gross margin is the share of revenue left after subtracting the cost of goods sold, expressed as a percentage: (revenue − COGS) ÷ revenue.

Formula

Gross profit = net revenue − COGS
Gross margin % = gross profit ÷ net revenue × 100

Worked example

A store has $50,000 in net revenue (after refunds, excluding tax) and $20,000 in COGS.

  1. Gross profit = $50,000 − $20,000 = $30,000.
  2. Gross margin = $30,000 ÷ $50,000 = 60%.
  3. If shipping, payment fees and refunds take another 15% of revenue, margin before ads is 45%, and break-even ROAS = 1 ÷ 0.45 ≈ 2.22.

Gross margin is the start of the profit stack, not the end.

Why it matters for a Shopify store running ads

Gross margin tells you how much room each sale leaves for everything else: shipping, fees, marketing and overheads. It is the quickest way to compare product lines and to set pricing.

For stores running paid social, gross margin alone is misleading because shipping, payment processing and returns are also variable per order. Using gross margin to calculate break-even ROAS will understate it. Use contribution margin for ad decisions and gross margin for pricing and product selection.

Common mistakes

  • Confusing margin with markup: a 100% markup is a 50% margin.
  • Calculating on revenue that still includes VAT or sales tax.
  • Using gross margin to set ROAS targets instead of contribution margin.
Work it out with your own numbers: Profit margin calculator

FAQ

What is a good gross margin for ecommerce?

It depends on category, price point and business model. What matters is whether gross margin leaves enough room for shipping, fees, refunds and acquisition costs. Work out your contribution margin before deciding a margin is good.

What is the difference between gross margin and net margin?

Gross margin subtracts only COGS from revenue. Net margin subtracts every cost, including shipping, fees, ads, software, salaries and other overheads.

Related terms

Want this number for your own store without a spreadsheet? ProfitFly connects Shopify, Meta and TikTok and shows your real profit every day, free up to 50 orders a month.

Start free