Cost of goods sold is an expense, but it lives in its own zone on the income statement — above the gross profit line, separate from operating expenses. Where a cost lands on that line changes your gross margin, your contribution margin, and the maximum CAC your Shopify store can afford. That classification decision matters more than the definition.
Is Cost of Goods Sold an Expense or Something Else?
Cost of goods sold is an expense. It is the direct cost of the inventory a Shopify store sold during a period. COGS is reported on the income statement below revenue and above gross profit, which separates it from operating expenses like rent, salaries, and software. The placement matters more than the label.
A simplified DTC income statement follows this order: revenue, then COGS, then gross profit, then operating expenses, then operating income. That structure exists because investors, lenders, and operators need to see how profitable each unit is before overhead layers on. Mixing the two collapses that signal.
| P&L Line | What It Contains | Why It Sits There |
|---|---|---|
| Revenue | Gross sales less discounts and returns | Top of the P&L |
| COGS | Direct cost of goods sold this period | Scales per unit sold |
| Gross Profit | Revenue minus COGS | Shows unit-level profitability |
| Operating Expenses | Marketing, salaries, software, rent | Scales with the business, not units |
| Operating Income | Gross profit minus OpEx | The number a buyer or lender underwrites |
In our work with 100+ Shopify brands at Ottit, the single most common P&L cleanup task is moving costs across that gross profit line. A brand thinks it has a 68% gross margin. After we move 3PL fees, inbound freight, and merchant processing to the correct place, the real number is 54%. That 14-point gap changes every downstream decision.
COGS is not just an expense category. It is the dividing line between unit economics and business economics.
Takeaway: Treat the gross profit line as a boundary, not a formatting choice. Every cost decision comes down to: does this scale with units sold, or with the business overall?
What Costs Belong in COGS for a Shopify Brand?
COGS for a Shopify brand includes the landed cost of inventory sold — the product itself, inbound freight from the supplier, import duties, and direct fulfillment costs like 3PL pick-and-pack. It does not include marketing, software subscriptions, or overhead. The test is whether the cost scales one-to-one with units shipped.
The clean-cut COGS items
- Product cost — what you paid your supplier or manufacturer per unit
- Inbound freight — ocean, air, or ground freight from supplier to your warehouse or 3PL
- Import duties and tariffs — customs charges tied to specific inbound shipments
- 3PL receiving fees — the cost to unload and put away inventory at ShipBob, ShipHero, or a similar 3PL
- 3PL pick-and-pack fees — direct fulfillment cost per order shipped
- Packaging materials — branded boxes, poly mailers, tissue paper, inserts consumed per order
- Outbound shipping labels — carrier costs to send the product to the customer
A realistic landed cost example
When one of those 5,000 units sells at $28, the COGS entry moves $5.36 out of inventory and into COGS. Add pick-and-pack ($2.10), outbound shipping ($4.80), and packaging ($0.65), and the fully loaded COGS per order lands at $12.91. That leaves $15.09 of gross profit before any ad spend, merchant fees, or overhead.
Takeaway: Landed cost is what enters inventory. Fulfillment is what exits inventory. Both belong above the gross profit line, but they hit different sub-accounts so you can benchmark each lever separately.
Which Gray-Area Costs Do Shopify Brands Get Wrong?
The gray-area costs that Shopify brands most often misclassify are outbound shipping, returns processing, chargebacks, merchant processing fees, influencer seeding, and sampling. Each of these can defensibly land above or below the gross profit line, but the choice must be consistent and disclosed. The patterns we see repeatedly across 100+ stores follow a predictable playbook.
Outbound shipping and shipping income
Outbound shipping is the cost to send the product to the customer. When Shopify collects shipping revenue from the customer, that revenue and the corresponding carrier cost usually net inside COGS. If the store offers free shipping, the full outbound cost sits in COGS with no offsetting revenue. Both approaches are acceptable — the mistake is putting one in COGS and the other in OpEx.
Merchant processing fees
Shopify Payments and other processor fees usually run 2.4% to 2.9% plus $0.30 per transaction. The Shopify Help Center guide to payouts documents how these fees net out before payout, which matters for reconciliation — see the Shopify Help Center guide to payouts. Most GAAP-aligned P&Ls place merchant fees in operating expenses because they scale with revenue, not units. Some DTC operators pull them into COGS to see true contribution margin. Both work — pick one and hold the line.
Returns, refunds, and restocking
Returns are a revenue reduction, not a COGS item. When a customer returns a product, sales are reduced and inventory goes back on the balance sheet at its landed cost. The return shipping label the store paid for is a fulfillment cost in COGS. Restocking fees the store charges the customer reduce the refund, not COGS. See our full breakdown in Sales Returns and Allowances: The Shopify GL Playbook.
Chargebacks
Chargebacks have two components: the refunded sale (revenue reversal) and the chargeback fee ($15 to $25 per dispute on Shopify Payments). The refund reverses revenue and inventory the same way a return does. The chargeback fee is an operating expense, not COGS, because it does not scale with units shipped.
Influencer seeding and product sampling
This is the classification error we see most often. A brand ships 400 units of free product to influencers each month through Klaviyo flows or manual orders. Those units leave inventory but generate no sale. If the store leaves this in COGS, gross margin looks artificially low. The industry-standard treatment moves the inventory cost to marketing expense.
| Cost Type | COGS | OpEx | Contra-Revenue |
|---|---|---|---|
| Product landed cost | ✓ | ||
| Inbound freight & duty | ✓ | ||
| 3PL pick-and-pack | ✓ | ||
| Outbound shipping to customer | ✓ | ||
| Shopify payment processing fees | ✓ (typical) | Sometimes | |
| Customer returns (product) | ✓ | ||
| Return shipping labels paid by store | ✓ | ||
| Chargeback fees | ✓ | ||
| Influencer seeding product | ✓ (marketing) | ||
| Free samples in orders | ✓ | ||
| Recharge subscription fees | ✓ | ||
| Gorgias, Klaviyo, Triple Whale | ✓ |
Takeaway: The gray areas are where classification decisions actually move the needle. Document which side of the gross profit line each cost sits on, and apply it consistently across every month.
How Does Misclassifying COGS Change Your Ad Spend Ceiling?
Misclassifying COGS inflates or deflates gross margin, which directly changes the maximum CAC a Shopify store can afford. If gross margin looks 14 points higher than reality, the media buyer assumes there is 14 more points of room to spend on ads before hitting breakeven. That gap becomes real cash burn within one ad cycle.
The contribution margin math
A brand targeting a 3x MER (marketing efficiency ratio) with a 72% reported gross margin thinks it can spend up to $46.80 per order and still break even. In reality, it can spend $32.76 before the order is unprofitable. Every $14 gap gets multiplied across the entire ad budget. For a brand doing 1,000 orders a month, that is $14,000 of hidden monthly loss.
Attribution tools like Triple Whale pull gross margin directly from your accounting system or a manual input to calculate contribution margin and blended ROAS targets. Garbage in, garbage out. If the COGS feed is wrong, the ad-spend ceiling Triple Whale surfaces is wrong.
A 14-point gross margin misread is not a rounding error. It is the difference between profitable growth and burning cash on Meta.
Takeaway: Reconcile the gross margin on your P&L with the gross margin plugged into your attribution tool every month. If they diverge, the classification is wrong somewhere. For the full P&L view, see our Net Profit Margin for Shopify Brands: The Real Playbook.
How Do You Reclassify a Mislabeled Expense Mid-Year?
Reclassifying a mislabeled expense mid-year is standard practice. The industry approach is to restate every prior month in the current fiscal year using the new classification, so trend lines and year-over-year comparisons stay clean. Prior fiscal years are usually left alone unless the amount is material. The change gets documented in a memo so future readers of the books understand why the shape shifted.
The 5-step reclassification framework
- Confirm the correct classification. Document why the cost belongs on the new side of the gross profit line. Reference the pattern (scales per unit vs. scales with business).
- Quantify the impact. Pull the misclassified amount for every month in the current fiscal year. Calculate the dollar move and the resulting gross margin shift.
- Post reclassification journal entries. One entry per month, moving the accumulated total from the old account to the new account. Do not net multiple months into one entry — you lose the monthly trend.
- Restate prior-period reports. Regenerate the P&L for each affected month. Save a snapshot of the pre-reclass version in a locked folder for audit trail.
- Document in the close file. Write a one-paragraph memo explaining what moved, why, and the effective date. Attach it to the current month's close checklist.
A worked example — moving 3PL fees into COGS
A brand has been coding ShipBob invoices to "Fulfillment Expense" under OpEx for six months. The bookkeeper decides to move them into COGS to see true gross margin. The 3PL invoices totaled $34,200 across January through June. The reclassification entry for each month moves that month's portion.
Once posted for each month, the P&L shape changes. Gross profit drops, gross margin drops, and operating expenses drop by the same amount. Operating income is unchanged. That is the tell that a reclassification was done correctly — the bottom line does not move, only the shape above it.
For stores on QuickBooks or Xero, tools like Ramp let bookkeepers batch-recategorize vendor spend by rule, which speeds up multi-month reclassifications. See the Ramp corporate card and spend platform for how the categorization sync works.
Takeaway: Reclassifying is normal, but it must be systematic. Restate every prior month in the fiscal year, document the change, and confirm operating income is unchanged before you close.
COGS vs. Operating Expenses vs. Contra-Revenue: What Goes Where?
The three main P&L buckets for a Shopify brand are contra-revenue (reductions to gross sales), COGS (direct costs that scale per unit sold), and operating expenses (indirect costs that scale with the business). Getting the buckets right is what separates a P&L that tells the truth from one that just balances.
| Category | Definition | Common Shopify Examples |
|---|---|---|
| Contra-Revenue | Reductions to gross sales — netted against revenue | Discounts, returns, allowances, chargeback refunds |
| COGS | Direct costs to produce and deliver the product sold | Product cost, inbound freight, duty, 3PL pick-and-pack, outbound shipping, packaging |
| Operating Expenses | Costs to run the business — do not scale per unit | Meta ads, Klaviyo, Gorgias, Recharge fees, salaries, rent, Shopify subscription |
| Below the Line | Non-operating items | Interest expense on Wayflyer or Parker loans, gains/losses, taxes |
Software subscriptions are almost always OpEx. Klaviyo, Gorgias, Recharge, the Shopify Plus subscription, and Triple Whale do not scale one-to-one with units sold. They scale with the size of the business. This is why moving them into COGS to "look leaner" backfires — it distorts gross margin in a way any experienced buyer or investor will spot in five minutes.
Loan interest from working capital providers like Wayflyer or Parker sits below operating income as interest expense. It is neither COGS nor OpEx. For more on how these show up in cash flow, see Cash Flow Statement for Shopify Brands: The Real Playbook.
Takeaway: Build the chart of accounts around these four buckets. Every new vendor invoice gets mapped to one of them based on the scaling test — per unit, with revenue, with the business, or below the line.
How Should Shopify Brands Structure COGS in QuickBooks or Xero?
The industry-standard chart of accounts structure for a Shopify brand breaks COGS into 4-6 sub-accounts so gross margin can be decomposed by lever. Product, inbound freight, fulfillment, outbound shipping, packaging, and merchant fees (if included) each get their own line. This lets the operator see which lever moved when gross margin shifts month over month.
A working chart of accounts
- 5000 · COGS - Product — landed cost of goods sold from inventory
- 5010 · COGS - Inbound Freight — allocated freight and duty when not capitalized to inventory
- 5100 · COGS - 3PL Fulfillment — pick-and-pack, receiving, storage direct-attributable
- 5110 · COGS - Outbound Shipping — carrier costs to ship to customers
- 5200 · COGS - Packaging — mailers, boxes, tissue, inserts
- 5300 · COGS - Payment Processing (optional — only if you pull merchant fees into COGS)
- 5400 · COGS - Samples & Free Product (in-order samples only, not seeding)
The revenue side of the reconciliation flows in through the Shopify payout sync. For stores on QuickBooks or Xero, we use Bookkeep for revenue recognition across the 100+ Shopify stores Ottit closes books for monthly. It summarizes daily Shopify activity into a single journal entry that hits revenue, discounts, refunds, sales tax, and merchant fees on their correct lines.
Inventory reconciliation is the other half. Whether you use Cin7, Finale, or a custom process, the ending inventory on the balance sheet must tie to the physical count at the 3PL. If it drifts, the COGS number on the P&L is wrong. For deeper structure on the full accounting stack, see Shopify Accounting System: The Stack Architecture Guide.
Takeaway: Split COGS into sub-accounts from day one. It costs nothing to add sub-accounts, and it saves hours of forensic work the first time gross margin shifts and someone needs to know why.
What Are the Tax Implications of COGS for Ecommerce?
COGS reduces taxable income by lowering gross profit before operating expenses are subtracted. For US Shopify brands, COGS is reported on Schedule C (sole prop), Form 1120 (C-corp), or Form 1120-S (S-corp), with Form 1125-A providing the COGS detail. The IRS requires inventory tracking for most businesses selling physical goods, which means COGS gets calculated via beginning inventory + purchases − ending inventory.
The entity structure a brand chooses affects how COGS flows through to the owner's return. Sole props and S-corps pass through to personal returns; C-corps pay tax at the entity level. See the SBA guide to choosing a business structure for how each structure works.
One trap: capitalizing costs into inventory that should have been expensed, or expensing costs that should have been capitalized. Under IRS Section 263A (UNICAP), businesses over certain thresholds must capitalize additional indirect costs into inventory rather than deducting them currently. This is where a CPA matters — the rules are entity-specific and the thresholds change. Ottit does bookkeeping; we do not give tax advice. Talk to your CPA about how UNICAP and Section 471 apply to your setup.
For related P&L tax topics, see Tax for Ecommerce: The Shopify P&L Playbook.
Takeaway: COGS reduces taxable income, but only if inventory is tracked correctly. Beginning inventory, purchases, and ending inventory must reconcile to a physical count. Guessing here creates audit exposure.
Key Takeaways for Shopify Brands
- COGS is an expense, but it sits above the gross profit line — that placement is what makes it different from OpEx.
- The scaling test decides classification: per unit = COGS, with revenue or the business = OpEx.
- Gray-area costs (outbound shipping, merchant fees, seeding, chargebacks) are where 80% of P&L errors happen.
- A 14-point gross margin misread can hide five figures a month in ad losses.
- Reclassifying mid-year is standard — restate every prior month in the fiscal year to keep trend lines clean.
- Split COGS into 4-6 sub-accounts so gross margin can be decomposed by lever.
- Reconcile the gross margin on your P&L with the gross margin in Triple Whale or Northbeam every month.