Racklipedia
Racklify
​
Retail

Cost of Goods Sold vs Operating Expenses: How Ecommerce Businesses Should Classify Costs

Updated September 25, 2026
Published September 25, 2026
William Carlin

Cost of Goods Sold

Definition

The direct cost of products sold, including product cost and sometimes freight, packaging, or landed cost depending on accounting method.

Overview

Cost of Goods Sold The direct costs attributable to the products a business sells. Distinguishing this line from operating expenses is essential for accurate gross margin, pricing, and tax reporting.


Many ecommerce teams confuse direct product costs with overhead. The difference is straightforward: COGS are costs that vary with goods sold (materials, direct labor, inbound freight, tariffs) while operating expenses (rent, marketing, customer support) are incurred to run the business regardless of individual sales. Misclassification changes gross margin, misleads management decisions, and can cause tax problems.


Principal Differences


  • Timing: COGS is recognized when revenue is recognized; operating expenses are typically recognized as incurred.
  • Relationship To Sales: COGS scales with units sold; operating expenses do not necessarily vary directly with unit volume.
  • Financial Statement Impact: COGS affects gross profit; operating expenses affect operating income and EBITDA.


Common Ecommerce Costs And Classification


  • Supplier Purchase Price: COGS — core component of product cost.
  • Inbound Freight To Warehouse: COGS when capitalized to inventory; otherwise an operating expense if treated as period freight-out (rare).
  • Customs Duties/Import Fees: COGS if directly tied to acquisition and capitalized.
  • Fulfillment Fees (3PL): Usually operating expenses (cost per shipment) unless the merchant capitalizes fulfillment as cost of sale under specific accounting policies.
  • Packaging For Shipping: Operating expense if used for protection during carrier transit; COGS if the packaging is the retail presentation sold with the product.
  • Quality Control And Inspection: Direct manufacturing QC is COGS; general QA and returns handling often fall under operating expenses.


Why Proper Classification Matters


For pricing, overstating COGS understates gross margin and may lead to underpricing. For taxes, incorrect COGS shifts taxable income between periods. For KPI tracking, mixing the two lines hides unit economics — for example, high fulfillment fees driving down net margin look different if treated as COGS versus operating expenses.


How To Classify — Practical Rules


  • Direct Attribution: If a cost can be directly tied to bringing inventory to a saleable state, treat it as COGS.
  • Consistent Policy: Document and apply a written capitalization policy for inbound freight, duties, and packaging.
  • Use System Controls: Configure your ERP/WMS to tag inbound costs to SKU receipts so cost flows into inventory automatically.
  • Review With Tax Advisor: Confirm your approach with a CPA — treatments can differ for tax purposes (e.g., LIFO elections).


Example Journal Entries


Receipt of inventory with landed cost capitalized:


Debit Inventory (total landed cost); Credit Accounts Payable/Cash.


Sale of goods:


Debit Cost Of Goods Sold; Credit Inventory (cost of units sold).


Operational Tips For Ecommerce Teams


  • Integrate Systems: Connect purchasing, WMS, and accounting so purchase invoices and freight automatically allocate to SKU cost.
  • Define Packaging Categories: Separate retail packaging (COGS) from shipping packaging (operating expense) with SKU rules.
  • Track Fulfillment Costs Separately: Monitor 3PL fees per order and per SKU to decide if some fulfillment elements should be capitalized.
  • Reconcile Regularly: Monthly reconciliation of inventory and COGS prevents cost creep and tax misstatements.


In short, the Cost of Goods Sold line records direct product costs and must be kept distinct from operating expenses to produce reliable gross margins, comply with tax rules, and enable data‑driven pricing and product mix decisions for ecommerce businesses.


Sources And Additional Reading (3)

More from this term
Looking for a 3PL?

Compare warehouses on Racklify and find the right logistics partner for your business.