How to Calculate COGS for Ecommerce Across Multiple Channels

Shopify shows one sales figure, Seller Central shows a different one, and the deposit in your bank matches neither. When one pool of stock feeds several sales channels, working out what your products really cost you each month gets messy fast.

This guide explains how to calculate COGS for ecommerce in a way that holds up across every channel you sell on. You will learn what cost of goods sold includes, the formula behind it, how to handle shared inventory, and how to avoid the mistakes that quietly shrink your margins.

What Is COGS in Ecommerce?

COGS, short for cost of goods sold, is what the products you actually sold cost you over a set period. For an online store, that usually means the price you paid suppliers for stock, plus the costs of getting that stock ready to sell, such as inbound freight and import duties.

COGS only counts products that actually sold. Stock still sitting in your warehouse or in an Amazon fulfillment center stays on your balance sheet as inventory until it leaves through a sale.

Why Ecommerce COGS Matters

Sales minus COGS gives you gross profit, the number that shows whether your products earn money before overheads. If COGS is too low, your profit looks better than it is. If it is too high, you might cut prices or drop products that are doing well.

COGS also shapes your tax bill, because it is deducted from revenue before taxable profit is worked out. That is why COGS deserves a close look in any tax planning for small businesses, not just at year end.

The COGS Formula Explained

The standard COGS formula looks like this:

Starting Inventory + Purchases – Ending Inventory = COGS

  • Starting inventory is what your unsold stock was worth on the first day of the period.
  • Purchases are the cost of new stock added during the period, including inbound shipping and duties.
  • Ending inventory is the value of stock still unsold at the end of the period.

The logic is simple. Whatever you had available to sell, minus whatever is left, must have gone out the door as sales. The hard part for online sellers is getting accurate numbers for each piece, especially ending inventory. US sellers can see the same calculation laid out in the IRS Tax Guide for Small Business.

What Goes Into Cost of Goods Sold for Ecommerce

Not every ecommerce expense belongs in COGS.

Costs Usually Included

  • Product purchase price paid to suppliers or manufacturers
  • Inbound freight to bring stock to your warehouse, 3PL or fulfillment center
  • Import duties and customs fees on the goods you sell
  • Packaging that forms part of the product itself
  • Direct production costs if you make your own products

Together, the product price and the cost of getting it to you are often called landed cost, which deserves careful tracking of its own.

Costs Usually Kept Out

  • Marketplace selling and referral fees
  • Advertising and promotion spend
  • Outbound shipping to customers
  • Payment processing fees
  • Software subscriptions, rent and salaries

Some sellers treat fulfillment fees differently. Whatever approach you choose, apply it the same way on every channel and every month so your margins stay comparable.

Why COGS Gets Harder With Multiple Channels

Selling on one platform from one warehouse is fairly simple. Add a second or third channel and the picture changes quickly, which is why growing brands often look for ecommerce accounting services built around multichannel selling.

Shared Inventory

When Shopify, Amazon and Etsy all draw from the same stock, each sale reduces one inventory pool. If your channels are not synced, the same unit can be counted twice or not at all.

Stock in Different Locations

Many sellers keep some units in their own warehouse or with a 3PL and send others to Amazon FBA. Every location needs to be counted at period end, including stock in transit between them.

Returns From Different Platforms

A returned item that can be resold goes back into inventory and reduces COGS. A damaged return becomes a write-off. Each platform reports returns in its own format, so they are easy to miss.

Different Payout Reports

Every channel bundles sales, fees and refunds into its own payout report. That is why an Amazon payout is not the same as your sales, and the same goes for Shopify and Etsy. Without a clear process, matching units sold to the right cost turns into guesswork.

How to Calculate COGS for Ecommerce Step by Step

If you have ever wondered how to calculate cost of goods sold when stock sits in several places, this monthly process keeps it manageable.

  1. Pick a period. Monthly works well for most online sellers because it catches problems early.
  2. Record starting inventory. Use the ending inventory value from the previous period across all locations.
  3. Add purchases. Include every stock order received during the period, along with inbound freight and duties.
  4. Count ending inventory everywhere. Combine your warehouse or 3PL count, your FBA inventory report and any stock in transit.
  5. Adjust for returns and write-offs. Put resaleable returns back into stock and remove damaged or lost units.
  6. Apply the formula. Add purchases to starting inventory, then take away ending inventory. What remains is your COGS for the month.
  7. Split by channel. Take the units each channel sold and multiply them by your unit cost. Now you can compare which channel actually makes you more money.

A Quick Note on Inventory Valuation

When unit costs change between orders, you need a method for valuing what is left. FIFO, short for first in, first out, assumes the oldest stock sells first. Weighted average spreads cost evenly across all units. Both are common, so pick one and stick with it.

A Worked Example With Willow & Pine

Here is how to calculate COGS for ecommerce in practice. Picture a small skincare brand called Willow & Pine, made up for this example, that sells a single face serum through Shopify and Amazon. Each unit costs $8 once the product price, inbound freight and duties are included, and it sells for $28.

Shopify orders ship from a 3PL, while Amazon orders ship through FBA. The brand started October with 700 units at the 3PL and 500 at FBA. During the month it received 1,000 new units, sending 400 to the 3PL and 600 to FBA.

ItemUnitsValue
Starting inventory1,200$9,600
Purchases received1,000$8,000
Ending inventory820$6,560
COGS for October1,380$11,040

Willow & Pine sold 650 units on Shopify and 780 on Amazon. Customers returned 20 Shopify units and 30 Amazon units in resaleable condition, so net units sold were 630 on Shopify and 750 on Amazon. The month-end count found 470 units at the 3PL and 350 at FBA.

COGS = $9,600 + $8,000 – $6,560 = $11,040

Split by channel, Shopify COGS was $5,040 and Amazon COGS was $6,000. Net revenue of $38,640 leaves a gross profit of $27,600. Amazon fees, ad spend and outbound shipping still come out before net profit, which is why multichannel ecommerce accounting gives each channel its own view.

Common Ecommerce COGS Mistakes

Most COGS errors start as small habits that grow over time. Watch out for these five.

  • Counting only one location. Forgetting FBA or 3PL stock makes ending inventory too low and COGS too high.
  • Booking stock as an expense too early. Stock only becomes COGS when it sells, so booking whole orders on day one distorts every month.
  • Leaving out inbound costs. Freight and duties sitting in general expenses make products look cheaper than they are.
  • Ignoring returns. Resaleable returns that never go back into inventory inflate COGS.
  • Mixing in selling fees. Putting marketplace fees into COGS hides what each channel really costs to run.

Tools That Make COGS Easier

Spreadsheets work for a handful of products, but they struggle once SKUs and channels grow. Xero and QuickBooks both have inventory features, and once those are switched on, each sale pulls its product cost through to COGS without manual work. With the right setup, every sale carries its matching product cost into your reports.

Connector tools such as A2X sit between your sales channels and your accounting software. They break each payout into sales, fees and refunds, and some can post COGS entries too, which cuts down manual matching at month end.

An inventory management system that syncs stock levels across channels completes the setup. If Shopify is your main store, make sure you sync your Shopify store with QuickBooks or Xero correctly so sales and costs land in the right accounts.

Conclusion

Learning how to calculate COGS for ecommerce is one of the most useful habits a multichannel seller can build. Start with the formula, decide which costs belong in it, and count stock in every location at the end of each period. Handle returns carefully, keep selling fees out, and split the result by channel so you can see where your profit really comes from. Small fixes here lead to sharper pricing and fewer surprises at tax time.

Want a clear COGS number every month without the spreadsheet stress? Book a call with Accountsly and talk it through with our team.

Frequently Asked Questions

What is the difference between COGS and operating expenses?

Think of COGS as what you paid to get the products you sold, like the supplier price, inbound freight and duties. Operating expenses are everything else it takes to keep the store running, such as ads, marketplace fees, software and rent.

How do I work out gross margin for my online store?

Gross margin equals net sales minus COGS, divided by net sales and shown as a percentage. In the Willow & Pine example, $27,600 divided by $38,640 gives a gross margin of about 71%.

How do you calculate COGS for a dropshipping store?

Dropshipping COGS is the wholesale price you pay the supplier for each order, plus any shipping the supplier charges you. Since you hold no stock, there is usually no starting or ending inventory to count.

How often should an ecommerce business calculate COGS?

Most online sellers calculate COGS every month so pricing, stock and margin problems show up early. At a minimum, it needs to be worked out at year end for the tax return.

Is COGS tax deductible?

COGS is generally subtracted from revenue when taxable business profit is worked out, which lowers the tax you pay. Accurate inventory records are needed to support the figure.

Start your Free 1-Week Trial and get a free Accounts Health Check Free 1-Week Trial + Accounts Health Check Get Started