Explainer New
Inventory Management Ecommerce Management Multi Channel Ecommerce Management Multi Channel Inventory
Ecommerce COGS is the cost assigned to the products sold during a specific period. The basic calculation is beginning inventory plus purchases, minus ending inventory, although the exact accounting treatment can vary by business and jurisdiction.
On this page
- What Is Ecommerce COGS?
- Why COGS Matters for Ecommerce Profitability
- What Is Included in COGS?
- Ecommerce COGS Example
- How Inventory Valuation Affects COGS
- The Role of Inventory Data in COGS
- COGS vs Operating Expenses
- Why Multi Channel Ecommerce Makes COGS Harder
- Product and Inventory Management for Better COGS Accuracy
- Common COGS Mistakes Ecommerce Sellers Make
- Using the Retail Selling Price Instead of Product Cost
- Ignoring Purchase Cost Changes
- Mixing Inventory Across Channels
- Forgetting Returns and Adjustments
- Treating Every Fulfillment Cost as COGS
- How to Track COGS Across Multiple Warehouses
- COGS and the Fulfillment Workflow
- What Software Can Do to Improve COGS Visibility
- A Practical COGS Checklist for Ecommerce Sellers
- How to Use COGS to Make Better Ecommerce Decisions
- Conclusion
Understanding ecommerce COGS starts with accurate product and inventory management. Your sales dashboard can show $50,000 in revenue, but that number alone does not tell you how much profit your products actually generated.
COGS, or cost of goods sold, measures the cost associated with the inventory you sold during a specific period. When you sell through Shopify, Amazon, eBay, or several other channels, keeping product costs and inventory movements accurate becomes much harder to manage manually.
That is why COGS is not just an accounting metric. It is closely connected to how you purchase products, receive stock, manage warehouses, process returns, and track sales across multiple accounts.
What Is Ecommerce COGS?
Ecommerce COGS is the cost attributed to the products your business actually sold.
For a straightforward retail operation, imagine you bought 500 units of a product and sold 300 of them. The full amount you originally paid for all 500 units is not automatically your COGS for the month. The cost assigned to the 300 units sold is what generally moves into COGS, while the unsold units remain in inventory.
The basic formula is:
COGS = Beginning Inventory + Purchases − Ending Inventory
The IRS uses this same inventory based structure when explaining how businesses calculate cost of goods sold, with inventory at the beginning and end of the period playing an important role.
For an ecommerce seller, this matters because inventory is an asset while it remains unsold. Once those goods are sold, their cost is recognized as COGS.
Why COGS Matters for Ecommerce Profitability
Revenue tells you how much customers paid. COGS tells you what the sold products cost you.
Suppose your store generated $25,000 in sales and the COGS was $15,000.
Your gross profit would be:
$25,000 − $15,000 = $10,000
Your gross margin would therefore be:
$10,000 ÷ $25,000 × 100 = 40%
That 40% is much more useful for pricing and product decisions than revenue alone.
A product can generate a lot of sales and still deliver weak margins if supplier prices have increased, discounts are too aggressive, or shipping and other directly attributable costs have not been considered correctly under your accounting policy.
This is why product and inventory management is closely connected to ecommerce profitability.
What Is Included in COGS?
The exact treatment depends on your accounting method, business structure, and jurisdiction, but common direct inventory costs can include the purchase price of merchandise and certain costs required to bring inventory into sellable condition or into your business.
For example, the IRS notes that freight in associated with merchandise purchased for resale can be part of the cost of goods sold. Manufacturing businesses can also have direct labor and certain production overhead in COGS.
Retail ecommerce businesses often need to distinguish direct product acquisition costs from broader operating expenses.
Typical COGS related items may include:
• Product purchase cost
• Certain inbound freight or shipping costs
• Manufacturing materials
• Direct production labor, where applicable
• Certain customs or import related costs, depending on accounting treatment
Costs such as advertising, office rent, software subscriptions, and many general administrative expenses are normally treated separately from COGS.
The key point is simple: do not assume every expense connected with fulfilling an order is automatically COGS. Accounting treatment varies, so your bookkeeping policy should stay consistent.
Ecommerce COGS Example
Consider an online clothing seller with:
Beginning inventory: $8,000
Purchases during the month: $22,000
Ending inventory: $6,000
Using the basic formula:
$8,000 + $22,000 − $6,000 = $24,000 COGS
Now assume the store generated $40,000 in product sales.
Gross profit:
$40,000 − $24,000 = $16,000
Gross margin:
$16,000 ÷ $40,000 × 100 = 40%
This example looks simple on paper. In a real multi channel business, however, the difficult part is usually getting the inventory and purchase data right.
When products are sold through several Shopify stores, Amazon accounts, eBay listings, or regional channels, inventory can move between warehouses and sales accounts while purchase costs change over time.
That is where manual spreadsheets can start breaking down.
How Inventory Valuation Affects COGS
Your COGS figure depends partly on how inventory costs are assigned to the units sold.
Common inventory costing approaches include FIFO and weighted average cost, while the availability and tax treatment of specific methods can depend on the applicable accounting rules. Shopify also notes that businesses may use different inventory costing methods and that those choices can affect profitability and tax reporting.
Consider a product purchased at different prices:
First purchase: 100 units at $10
Second purchase: 100 units at $14
If prices keep changing, the cost assigned to sold units can differ depending on the inventory valuation method.
That means your product margin can move even when your selling price stays exactly the same.
For growing ecommerce businesses, this is one reason inventory data should not be treated as a simple quantity count. Your records also need to preserve the cost information behind that stock.
The Role of Inventory Data in COGS
Accurate COGS depends on accurate inventory data. This is where inventory database management becomes important because every SKU needs reliable information about its cost, quantity, location, and movement history.
For example, if a product has been purchased three times at different prices, your inventory records need to preserve those cost changes rather than treating every unit as having the same historical cost.
A well organized stock system can also help connect purchasing, receiving, transfers, sales, and returns. When those transactions are recorded consistently, it becomes much easier to reconcile inventory with your financial records.
For ecommerce businesses with several warehouses or sales channels, inventory location software adds another layer of visibility by showing where stock is physically stored and how it moves between locations.
COGS vs Operating Expenses
One of the most common ecommerce accounting mistakes is mixing COGS with operating expenses.
COGS is primarily tied to the products sold. Operating expenses support the broader operation of the business.
For example:
COGS
Product purchase costs
Eligible inbound freight
Direct production costs
Operating expenses
Advertising
Office rent
General software subscriptions
Administrative salaries
Professional services
Banking and other general business expenses
There can be grey areas, especially around fulfillment, warehouse labor, shipping, payment processing, and marketplace charges. Shopify, for example, distinguishes COGS from broader cost of revenue categories that can include fulfillment and payment processing.
So rather than copying someone else's chart of accounts, ecommerce businesses should establish a consistent accounting policy that fits their operation.
Why Multi Channel Ecommerce Makes COGS Harder
COGS becomes more challenging when the same SKU is sold through multiple channels.
Imagine you have 1,000 units in total:
400 units are allocated to Amazon
350 units are available for Shopify
250 units are in a second warehouse
Now a customer buys 25 units from Amazon, another customer buys 20 through Shopify, and 30 units are transferred between warehouses.
Your COGS calculation now depends on more than sales data. You need accurate inventory movements, purchase costs, returns, adjustments, and SKU matching.
This is where online inventory control becomes part of the financial picture.
An inventory system should ideally give you one consistent view of product quantities and costs while still keeping individual marketplace activity visible.
For businesses running Shopify and Amazon together, this is especially important because product, inventory orders, purchasing, and stock data can become fragmented across separate accounts. A dedicated workflow for [managing Shopify and Amazon inventory together] can help reduce that fragmentation.
Manage Shopify and Amazon Inventory Together
Product and Inventory Management for Better COGS Accuracy
Good product and inventory management does not replace accounting software, but it can make the underlying data much more reliable.
Think about what needs to happen before COGS can be trusted.
A purchase order is created.
The inventory arrives.
The received quantities are confirmed.
The product cost is recorded.
Stock is assigned to the correct SKU and location.
A customer order is placed.
Inventory is reduced.
A return is processed.
The returned stock is either resellable, damaged, or written off.
The accounting system then uses those transactions to produce financial reports.
When these events are disconnected, COGS reporting becomes harder to reconcile.
For businesses handling large product catalogs, [best multi channel inventory management software apps] can also be useful when evaluating ways to centralize inventory operations.
Best Multi Channel Inventory Management Software Apps
Common COGS Mistakes Ecommerce Sellers Make
Using the Retail Selling Price Instead of Product Cost
COGS is based on the cost assigned to inventory, not the price charged to the customer.
If you sell a product for $50 and your recorded product cost is $18, your COGS for that unit is based on the applicable inventory cost, not $50.
Ignoring Purchase Cost Changes
Supplier prices do not always stay fixed.
If Product A costs $8 this month and $11 next month, assuming that its cost is permanently $8 can distort margin reporting.
Mixing Inventory Across Channels
When each marketplace has its own stock count, manual reconciliation creates opportunities for errors.
A centralized inventory workflow makes it easier to understand which units were purchased, sold, returned, transferred, or adjusted.
Forgetting Returns and Adjustments
A returned product can change both inventory and COGS treatment.
For inventory based accounting systems, returning a product to sellable inventory may reverse part of the original inventory and COGS impact. QuickBooks, for example, documents inventory increases and COGS decreases when inventory is returned.
Treating Every Fulfillment Cost as COGS
Picking, packing, outbound shipping, warehouse fees, payment processing, and marketplace commissions may require separate treatment depending on your accounting policy.
Do not force every operational cost into one bucket just because it happened during an order.
How to Track COGS Across Multiple Warehouses
If your business stores products in several warehouses, location level inventory tracking becomes increasingly important.
You should be able to answer questions such as:
How many units are available at each location?
What did those units cost?
Which location fulfilled the order?
How many units were returned?
Which products are moving slowly?
Which SKUs have large cost increases?
An organized [ecommerce fulfillment complete guide] can help you understand the operational side of these workflows, while inventory controls help ensure the resulting stock movements are reflected accurately.
Ecommerce Fulfillment Complete Guide
For warehouse operations, [inventory location software] and structured stock records can be especially useful because the same SKU may exist in different physical locations at different times.
COGS and the Fulfillment Workflow
COGS accuracy is not only an accounting problem. It starts with operational discipline.
If receiving is wrong, inventory can be wrong.
If inventory is wrong, available stock can be wrong.
If stock movements are wrong, the units attributed to sales can be wrong.
And if the cost associated with those units is wrong, gross profit can be wrong.
That is why ecommerce businesses should connect purchasing, inventory, orders, fulfillment, and accounting into a coherent workflow.
You can also see how the operational side fits together in this guide to the [order fulfillment process in e commerce and packing workflow].
Order Fulfillment Process in E Commerce and Packing Workflow
For a broader look at how orders move from purchase to dispatch, see the [order fulfillment workflow] guide as well.
What Software Can Do to Improve COGS Visibility
Many ecommerce businesses start with spreadsheets, which can work when there are only a few SKUs, one sales channel, and limited order volume.
The challenge grows when you add multiple accounts, warehouses, supplier orders, returns, transfers, and frequent cost changes.
A connected inventory platform can help centralize:
Product and SKU records
Purchase and receiving data
Inventory quantities
Warehouse locations
Sales channel activity
Returns and adjustments
Cost information
The goal is not to make accounting unnecessarily complicated. It is to create a clean operational data trail that accounting systems can use more effectively.
QuickBooks explains that inventory systems can track inventory as an asset and recognize COGS as inventory is sold, while also using the product's cost information in the calculation.
That is a useful model for ecommerce operators to understand: inventory has value while it is sitting on the shelf, and that cost moves into COGS as the related products are sold.
For more operational context, you can also review this broader [order and fulfillment guide] covering the movement from order creation through fulfillment.
A Practical COGS Checklist for Ecommerce Sellers
Before relying on your gross margin reports, check that:
• Every active SKU has a reliable cost value.
• Purchase quantities match received quantities.
• Inventory transfers are recorded.
• Returns are processed consistently.
• Damaged or written off stock is handled correctly.
• Multiple marketplaces use consistent SKU mapping.
• Warehouse stock counts are reconciled regularly.
• Your accounting method is documented and applied consistently.
• Discounts, freight, customs, and other costs are classified according to your accounting policy.
• Your inventory system and accounting system agree on major stock movements.
For businesses managing multiple marketplace accounts, this last point matters a lot. You should not have one version of inventory in Amazon, another in Shopify, another in a warehouse spreadsheet, and another in accounting.
A single operational view can dramatically reduce reconciliation work.
How to Use COGS to Make Better Ecommerce Decisions
Once your COGS data is reliable, it becomes much more useful than a line on a financial report.
You can compare gross margins by:
Product
SKU
Brand
Supplier
Sales channel
Warehouse
Month
Customer segment
This can reveal useful patterns.
Maybe Amazon generates more revenue but produces lower gross margins.
Maybe one supplier has quietly increased costs.
Maybe a certain product sells quickly but has almost no margin.
Maybe a bundle looks profitable until the component costs are included correctly.
That is when COGS becomes a decision making tool instead of just an accounting metric.
Conclusion
Ecommerce COGS is one of the clearest ways to understand what your products actually cost and how much gross profit remains after those costs. Accurate reporting starts with consistent product and inventory management, from purchasing and receiving stock to tracking sales, returns, transfers, and warehouse movements.
This becomes even more important when you manage multiple marketplaces and sales accounts. Keeping inventory, product costs, and order activity connected in one place gives you cleaner data and makes it easier to identify profitable products, pricing problems, and unnecessary inventory costs.
The next step is to review your SKU costs, inventory valuation method, warehouse movements, and sales channels together. Once those foundations are accurate, your COGS reporting becomes a much more useful tool for purchasing, pricing, and growth decisions.
FAQ
Questions about this
See it running on your orders.
Book a 20-minute walk-through with the RASCODEX team, or start the 7-day free trial.
Request a Demo WhatsApp Us
Comments
No comments yet.