Most Shopify guides stop at the formula and a couple of made-up examples. That is the easy part. The hard part is knowing which costs actually belong above the gross-margin line, and why a store with a "good" gross margin can still end the month with almost nothing in the bank. This walkthrough covers both, with a real POD example and the profit angle the other pages skip.
Gross margin vs. gross profit vs. gross margin percent
These three get used interchangeably, so pin them down first.
- Gross profit is a dollar figure:
net sales − COGS. - Gross margin (or gross margin percent) is that figure as a share of revenue:
gross profit ÷ net sales. - Net sales is your top line after discounts and refunds, not gross order value.
Shopify's own help docs write the calculation as net sales minus cost of goods sold, then divided by net sales, and this is the version you want to use — not gross sales. Starting from gross sales overstates your margin because it ignores the coupon codes and refunds that already left the building.
How to calculate gross margin on Shopify
The formula is short. Getting the inputs right is where stores go wrong.
Gross margin % = (Net sales − COGS) ÷ Net sales × 100
Net sales is straightforward: gross sales, minus discounts, minus returns and refunds. Shopify's finance reports give you each of these lines. The trap is COGS — the "cost of goods sold" — because Shopify's profit report only knows the per-unit cost you typed into each product, and the real cost of fulfilling an order is bigger than that.
What actually belongs in COGS
COGS is the direct, per-order cost of the units you sold — not the units you bought, and not the cost of running the business. For a print-on-demand or dropship store, that means:
- Supplier production charge — the blank item plus printing (what Printify or Printful bills you).
- Supplier shipping to the customer — usually folded into the production charge.
- Payment processing fees — a judgment call, but many operators put them here because they scale with each sale. Shopify Payments commonly charges around 2.9% plus 30¢ per online transaction on lower-tier plans, though the exact rate falls on higher plans, according to A2X's breakdown of Shopify fees. Verify your own plan's rate before quoting it.
- Packaging inserts, if you add any.
What does not belong in COGS: ad spend, your Shopify subscription, apps, design tools, contractors, and owner pay. Those are operating expenses, and burying them in COGS is the single most common way stores fool themselves — it inflates gross margin and hides that customer acquisition cost is the real risk. The ecommerce P&L guide walks the full statement top to bottom if you want the complete structure.
One more gotcha: when you refund a customer, the original payment processing fee is generally not returned to you (A2X covers this). A refunded order still costs you the fee even though you kept none of the sale.
A worked example: a small POD t-shirt store
Say you run a t-shirt store on Shopify. In one month you take 300 orders at roughly $32 each. All figures below are illustrative — plug in your own.
Start with revenue and work down to gross profit:
- Gross sales: 300 × $32 = $9,600
- Less a 10%-off code: −$480
- Less 9 refunded orders: −$290
- Net sales: $8,830
Now COGS:
- Production (300 units × ~$12 each): $3,600
- Payment processing at ~2.9% + 30¢: (0.029 × $9,600) + (300 × $0.30) = $278 + $90 = $368
- Total COGS: $3,968
So gross profit is $8,830 − $3,968 = $4,862, and gross margin is $4,862 ÷ $8,830 = 55.1%.
That is a strong product margin. If you stopped reading your P&L here, you would feel great. But you have not paid for the ads yet.
Why a 55% gross margin can still lose money
Everything that makes the business run sits below the gross-profit line. Keep going with the same month:
- Ad spend (Meta + Google): −$3,000
- Shopify plan + apps: −$180
- Email and design tools: −$90
- Owner draw / contractor: −$500
- Total operating expenses: $3,770
Operating profit = $4,862 − $3,770 = $1,092, an operating margin of $1,092 ÷ $8,830 = 12.4%.
The product is healthy at 55% gross margin, but ad spend alone ate more than 60% of the gross profit. If your ad costs rise 20% next month — an extra $600 — operating profit nearly halves. This is exactly why paid acquisition must sit visibly in operating expenses, not COGS: the P&L should scream that CAC is your risk, and it cannot if that cost is hidden higher up. The same logic applies whether you are measuring gross profit on your Facebook ads or the net profit margin on Shopify after everything clears.
Gross margin tells you whether the product works. Net and operating margin tell you whether the business works. You need both.
What is a good gross margin for a Shopify store?
There is no universal target — it depends entirely on what you sell. For context, apparel businesses run around a 54% gross margin, while the total market averages closer to 45.76%, and net profit margins across the market land between roughly 9% and 10%, according to Shopify's gross margin vs. operating margin guide. Software sits near 72% and grocery near 1–5% in the same data, so comparing yourself to "ecommerce in general" is close to meaningless — compare against your own category.
The bigger lesson from those numbers is the gap between the gross line and the net line. A market gross margin in the mid-forties collapsing to single-digit net margins is the ad-spend-and-overhead squeeze from the example above, playing out at scale.
From gross margin to true per-order profit
Gross margin is a monthly average. It hides the fact that some SKUs and some orders lose money while others carry the store. A blended 55% can contain a discounted, heavily shipped order that netted you a few cents — or a loss — once its share of ad spend is counted.
That per-order view is hard to build by hand because the costs live in different places: production in Printify or Printful, the sale and fees in Shopify, the acquisition cost in Meta and Google Ads. PodVector connects those sources and computes true per-order profit, so gross margin stops being a guess you reconstruct from four tabs. Victor, its AI operator, analyzes that live data and can act on the Shopify side with your approval — he reads your ad data to find where margin leaks but does not touch your ad account. PodVector is not a dashboard you have to babysit; it is the profit math running underneath your store.
If you would rather nail the bookkeeping foundation first, the guide to the best ecommerce bookkeeping tools for accuracy is the right next step, and the net profit margin on Facebook ads breakdown shows how acquisition cost reshapes the final number.
FAQs
Is gross margin the same as gross profit?
No. Gross profit is a dollar amount — net sales minus COGS. Gross margin is that amount expressed as a percentage of net sales. A store can have high gross profit in dollars but a thin gross margin, or vice versa, so always be clear which one you mean.
Does Shopify calculate gross margin for me?
Shopify's profit reports estimate it using the per-unit cost you enter for each product, plus the sale price. That is a useful start, but it only reflects the cost you typed in — it will miss anything you did not enter and can miss processing fees depending on setup. Treat the built-in number as a draft, not the final word.
Should payment processing fees go in COGS or operating expenses?
Either can be defensible, but pick one and stay consistent. Many operators put processing fees in COGS because they scale directly with each sale, which keeps them close to the product economics. What matters more is that you never move them month to month, or your margin trend becomes noise.
Why is my gross margin high but my bank account low?
Because gross margin sits above ad spend, subscriptions, and owner pay — and above the timing of your cash. Paid acquisition can consume most of your gross profit, and Shopify payouts arrive on a delay while ad platforms bill you daily. A profitable P&L and a tight bank balance routinely coexist in growing, ad-driven stores.
What gross margin do I need to be profitable?
Enough to cover all your operating costs and still leave a net profit — which depends on your ad efficiency, not a fixed percentage. A store spending little on ads can thrive at a 35% gross margin, while one burning heavily on paid acquisition can lose money at 60%. Work backward from your real operating expenses instead of chasing a benchmark.