What Is COGS in E-Commerce?
Cost of goods sold (COGS) represents the direct costs attributable to producing or acquiring the products you sell. In e-commerce, COGS is more nuanced than in traditional retail because it must capture not just the unit price paid to your supplier but the full chain of costs required to make that product available for sale. This includes raw material or wholesale costs, manufacturing fees, freight and shipping to your warehouse, customs duties and import taxes, inspection fees, and packaging costs.
The distinction between COGS and other operating expenses matters for both financial reporting and decision-making. COGS directly reduces your gross margin, which is the primary profitability metric investors, lenders, and acquirers examine. Operating expenses like rent, salaries, and software subscriptions sit below the gross margin line. Getting COGS wrong does not just distort your internal analytics; it misrepresents your business to anyone evaluating its financial health.
The Landed Cost Framework
Landed cost is the total cost of a product once it arrives at your warehouse or fulfillment center, ready to be shipped to a customer. It is the most accurate representation of COGS for e-commerce businesses and should be the basis for all margin calculations. The components of landed cost include:
- Unit cost: The price per unit charged by your supplier or manufacturer. This is the number on your purchase order and the starting point for landed cost calculation.
- Freight and shipping: The cost of transporting goods from your supplier to your warehouse. For international sourcing, this includes ocean freight or air freight charges, which can vary dramatically based on container availability and fuel surcharges.
- Customs duties and tariffs: Import taxes assessed by the destination country based on the product classification (HS code) and country of origin. These can range from 0% to 25% or more of the declared value.
- Insurance: Cargo insurance covering loss or damage during transit. Typically 0.5% to 2% of the shipment value but essential for high-value or fragile goods.
- Inspection and quality control: Pre-shipment inspection fees if you use third-party QC services to verify product quality before goods leave the factory.
- Packaging and labeling: Costs for retail-ready packaging, barcoding, FNSKU labels (for Amazon FBA), and any compliance labeling required by the destination market.
- Inbound shipping: The cost of getting goods from your port or freight forwarder to your warehouse or 3PL. This last-mile domestic freight is often overlooked but adds $0.20 to $1.00 per unit depending on shipment size and distance.
Tracking COGS Across Products
As your product catalog grows, maintaining accurate COGS per SKU becomes increasingly difficult. Each product may have different suppliers, different shipping costs based on weight and dimensions, and different duty rates based on classification. A store with 50 SKUs sourced from three suppliers across two countries has a surprisingly complex COGS matrix.
The key principle is to track COGS at the SKU level, not the product level. A product that comes in three sizes and four colors represents 12 SKUs, each potentially with a different unit cost, packaging cost, and shipping cost per unit. Rolling these up into a single average COGS per product introduces errors that compound as you make pricing and advertising decisions based on that average.
Every time you receive a new purchase order, you should update the COGS for the affected SKUs. Supplier prices change. Freight rates fluctuate. Duty rates are periodically revised. A COGS number that was accurate six months ago may be 10% to 20% off today. The discipline of updating COGS with each purchase order is what separates businesses with accurate financial data from those operating on outdated assumptions.
Tracking COGS Across Suppliers
Many e-commerce businesses source the same or similar products from multiple suppliers, either as a risk mitigation strategy or to meet demand spikes. When you have two suppliers for the same SKU, each with different pricing and shipping terms, your COGS for that SKU is effectively a blended rate that depends on the proportion of inventory sourced from each supplier.
This creates a tracking challenge. If Supplier A charges $4.00 per unit with $0.80 in freight and Supplier B charges $4.50 per unit with $0.50 in freight, your effective COGS per unit differs based on which supplier's inventory you are currently selling. The solution is to use your inventory costing method (FIFO, LIFO, or weighted average) to determine which cost layer applies to each unit sold. This is where COGS tracking and inventory costing intersect, and getting this intersection right is critical for accurate margin reporting.
Tracking COGS Across Channels
Multi-channel sellers face an additional layer of COGS complexity. The same product might be sold on Amazon, Shopify, Walmart Marketplace, and wholesale to a retailer. While the product cost is the same regardless of channel, the ancillary costs can differ significantly. Amazon FBA requires specific packaging and labeling that might add $0.30 per unit. Shipping to wholesale customers might involve pallet preparation costs. Each channel may require different packaging formats.
The best practice is to maintain a base COGS (the landed cost to your warehouse) and then add channel-specific preparation costs as a separate cost layer. This allows you to compare true margin by channel using a consistent base cost while still capturing the incremental costs associated with each sales channel. Combined with marketplace fee analysis, this channel-level COGS tracking gives you a complete picture of which channels are most profitable for each product.
Common COGS Tracking Mistakes
Even diligent operators make mistakes that undermine COGS accuracy. Here are the most frequent errors we see:
- Using supplier invoice price as total COGS. The invoice price is only the starting point. Freight, duties, and ancillary costs typically add 15% to 40% to the base unit cost. Ignoring these costs means your margins are overstated by the same percentage.
- Not updating COGS when costs change. If you set your COGS once when you launched a product and never update it, you are using stale data. Costs change with every purchase order, and the cumulative drift can be substantial.
- Allocating freight costs evenly across all SKUs. A shipment containing both lightweight and heavy products should not have freight allocated evenly per unit. Freight should be allocated based on weight, volume, or declared value to maintain per-SKU accuracy.
- Ignoring currency exchange rate impacts. If you pay suppliers in a foreign currency, your effective COGS in your home currency changes with every exchange rate movement. A 5% weakening of your home currency against the supplier's currency represents a 5% increase in your COGS.
- Not accounting for defective or damaged units. If 3% of each shipment arrives damaged or defective, those units represent wasted COGS that should be allocated across the remaining sellable units. Ignoring shrinkage understates your effective per-unit cost.
Building a COGS Tracking System
An effective COGS tracking system has three components: a purchase order database, a cost allocation engine, and a reconciliation process.
The purchase order database stores every PO with complete cost details including unit prices, freight invoices, duty assessments, and any other ancillary costs. Each PO is linked to the specific SKUs it contains and the quantities of each. This creates a historical record of cost changes over time and provides the raw data for inventory costing calculations.
The cost allocation engine takes the total costs from each PO and allocates them down to the per-unit level using appropriate methods: unit cost directly from the invoice, freight allocated by weight or volume, duties allocated by declared value, and fixed costs like inspection fees allocated evenly across units. The output is a precise landed cost per unit for each SKU in each purchase order.
The reconciliation process compares your calculated COGS against actual inventory movements and financial outcomes. Are the COGS values in your system consistent with the gross margins shown in your accounting software? Do the inventory quantities in your tracking system match physical counts? Regular reconciliation catches data entry errors, allocation mistakes, and system synchronization issues before they compound into significant financial reporting errors.
In e-commerce, the difference between a 35% gross margin and a 25% gross margin is often just the accuracy of your COGS tracking. The costs are the same either way. The question is whether you see them.
Next Steps
With accurate COGS tracking in place, you can confidently calculate true margins for every product in your catalog. Pair this with an understanding of inventory costing methods to ensure your stock valuation reflects reality, and review our margin calculator to model how COGS changes ripple through to your bottom line. For a complete overview of e-commerce financial management, return to our pillar guide.
Sources & References
- Cost of Goods Sold (COGS): Formula, Calculation & How to Reduce It — Shopify. Accessed March 2026.
- Cost of Goods Sold (COGS): Definition and How to Calculate It — NerdWallet. Accessed March 2026.
- Publication 334 (2025), Tax Guide for Small Business — IRS. Accessed March 2026.
Get Real-Time Financial Intelligence
Join the waitlist for AI-powered visibility into your business finances — built for e-commerce companies.
Join the Waitlist