What to Include (and Exclude) in COGS for Ecommerce

Written by: Elspeth Cordray

• 21 min read

For ecommerce businesses, getting COGS (Cost of Goods Sold) right is non-negotiable – it’s the foundation for understanding Gross Profit.

The calculation for Gross Profit is simple:

Gross profit = Net sales – Cost of Goods Sold

However, getting the COGS part of that equation correct can be complicated.

To cut through the confusion, we asked Phil Oakley, Managing Director at Outserve to explain exactly what belongs in ecommerce COGS, and what doesn’t – so you can get accurate, trustworthy financials.

Elspeth From A2X (00:00)
Hey everyone and welcome. Today we're diving into the world of COGS – that's Cost of Goods Sold – and we're going to talk about why it's such a crucial part of accurate accounting for ecommerce businesses. I'm joined by Phil Oakley from Outserve, one of the UK's top accounting integrators. Outserve works with many well-known Amazon and Shopify brands, some you might recognise, and they help them to streamline their accounting and get their inventory management sorted out.

Phil is a real expert in this space, so if you are an ecommerce brand looking to get a handle on your numbers, you're in the right place. So, Phil, great to have you here. Tell us a little bit about yourself.

Philip Oakley (00:43)
Thank you very much. Thank you for that great introduction. No pressure there at all, but yes. At Outserve, we have a specialist team working with scaling ecommerce businesses and brands, and because I think we have a real focus on inventory management and inventory accounting with some of the software and the tools, we do spend a lot of time looking at COGS and COGS calculations and all of those things. So really, really, really excited to get into a discussion about how we can help businesses understand.

Elspeth From A2X (01:14)
Great. So before we get into the nuts and bolts of Cost of Goods Sold, let's talk about why it's important to get it right in the first place. Why is close enough not good enough for ecommerce brands? Phil, you tell us a bit more about that.

Philip Oakley (01:30)
I think for us, we talk about COGS all the time, but what we're really talking about is margin and profit. And of course, hopefully that's what all the businesses are in this for, especially in these challenging times. If you don't know your COGS, then you don't know your profit margin. You can't calculate your profit. And I think when we think about strategy — and all businesses need to be thinking about their strategy so much at the moment — once you've decided what problem you're solving, what great product you've got, then your Cost of Goods Sold and your margin are really going to dictate so much of your strategy – from what channels you sell on to how you promote. It's really going to be the anchor of everything in your business to understand how you're going to make money, how you're going to be profitable, how you're going to be successful and deliver maximum value.

And it feels to me so many times that businesses without understanding COGS are really flying blind, flying by the seat of their pants and understandably giving themselves some sleepless nights, maybe.

Elspeth From A2X (02:39)
Yes, I can imagine so. Okay, so from the accounting side, just tell us to start with what exactly does Cost of Goods Sold cover and how would you go about calculating it?

Philip Oakley (02:52)
Yeah, and I think we could all say straight away, Elspeth, it's complicated. It's complex. It's not always straightforward. And for different businesses, it can be quite different. I think if we just try and focus at the moment on many of the types of businesses that we would have as A2X clients who are buying products in and selling products, we can touch on that. Obviously, if you're manufacturing, then your Cost of Goods Sold is going to have another layer and level to it.

But if we just sort of build it up and we think about a business that's buying in – in that Cost of Goods Sold, we're really thinking in that calculation of everything you've paid for that product up to the point that you've got it onto your shelf. Think from the supplier door onto your shelf, before it's sold. And that's thinking, okay, let's always start with: I've got to buy the product; there's a purchase price for that product. Hopefully we all know what that is. It might be, you know, sometimes even for some of our clients, that's not clear until it's later on. Prices fluctuate and change, especially in some commodity markets. Currencies change. But then of course the big ones we often think about are freight – the freight cost to bring that product in. So if you were bringing, say, a product in from China, which of course is very common and popular with some ecommerce businesses, you're probably going to have a container coming over by container; you're going to have that container cost, which is going to be included in the Cost of Goods Sold. And then of course, you're going to have to think about how you actually allocate that complete container cost to each product. Duties is another one that we spend a lot of time thinking about; there's a lot of discussion on tariffs at the moment.

Elspeth From A2X (04:44)
Tariffs, I was going to ask you.

Philip Oakley (04:45)
And that affects everybody. So tariff is the percentage of the import duty, and then the actual import duty is what you pay. And of course, for so many of the North American A2X users, there look like there could be some very interesting tariffs and calculations. All of that tariff, all of those import duties, are going to be included in the Cost of Goods Sold. So it's increasing that product cost.

Anything really to get it into your warehouse, onto your shelf, is going to be included in there. So I think that's really the starting point. But also it's not just, okay, what's in there then? How is it calculated? Because you might have those duties and that freight in sort of big lumps on invoices from different people, and then it's all got to be attributed across, essentially down to a unit-by-unit cost so you can see a total cost of the unit. Does that make sense?

Elspeth From A2X (05:48)
Yeah, so there's a few moving parts there. In reality, we do know that a lot of ecommerce sellers struggle with this. Tell us some of the common pitfalls that you see when businesses are trying to calculate their costs.

Philip Oakley (05:52)
Yeah, and I think, you know, obviously some really just do struggle to calculate it at all. And they're left with a sort of a Xero or a QuickBooks or a NetSuite without having clear figures in the tool. So maybe they've just put all of their purchase invoices in there and they're not even making a stock adjustment. But I think some of the common areas, as I've sort of touched on before, is that they're not actually allocating those costs to each unit or trying to understand how those costs would apply. I think there's some confusion on sort of, okay, I've got inbound freight, but actually I've got shipping costs out and those shipping costs in most cases are not included in Cost of Goods Sold. Maybe some people start to think that they've got to put their fees, their Amazon fees or their advertising. And it's really, we start to get into this conversation: what's above the line of gross profit?

Elspeth From A2X (06:50)
Yes.

Philip Oakley (07:03)
So what is really that gross profit margin and what's below the line? And below the line we're talking about what's an overhead. We might be thinking, you know, OPEX, what's an operating expense, and classifying that so you can really have some good comparison figures. I think shipping income as in outbound shipping, shipping income and shipping expenses, confuses people even, you know, to the point of packaging.

So if it's a box which is actually part of the product – so it's the product box with the picture on – that's part of your Cost of Goods Sold, as you would expect. If someone over here, you can see that Apple box, that box is part of the Cost of Goods Sold. But the brown box that it goes into when it actually leaves and gets delivered, that is not part of the Cost of Goods Sold. That's part of the shipping cost to go out. So suddenly you might have an invoice with product boxes and packing boxes on the same invoice, and then you've got to start splitting it down to go actually that is part of the product and that is not. And of course at every level we can get a little bit more complicated. We've got clients in fashion and apparel; they can have a lot of returns, and many businesses can have returns. And then when stuff comes back in, you've got to start understanding the cost there.

Elspeth From A2X (07:46)
Apple box, yeah.

Philip Oakley (08:04)
If the cost is actually to repackage that product maybe to make it sellable again, that could be part of the Cost of Goods Sold. If it's part of bringing it back in and then actually just getting it ready to ship it out again, then that's not. You know, there's that fine line between lots of costs going on and just really understanding which part of it is to get it ready up to that point to sell it and then it's a cost after sale. That's what you've got to think. Sometimes the shipping cost to send it out is after you've sold it. The brown box that goes in is a cost after you sold it. The product box was a cost before you sold it. Start to think about things as a few little rules that you can follow, as in: would you have incurred this cost anyway if you hadn't bought that item?

Elspeth From A2X (09:05)
Yes.

Philip Oakley (09:25)
So it's a bit like the rent of your warehouse. You would have incurred that cost whatever – even if you didn't buy that shipment, you would have still had that cost. Whereas the container, the duty, the freight, you would not have had that cost if you hadn't bought those products. One of the phrases is "all in until it's in." So all of the costs in until it's in. And then when it's in, things after that point are then expenses.

Elspeth From A2X (09:54)
Yeah, OK, that's a really good rule of thumb. OK, so I think we've got a little bit of a quick fire for you here.

We're going to ask you, we're going to give you a transaction type and you're going to tell us where it fits, okay?

Philip Oakley (10:10)
And yeah, and if I get it right, you'll leave it in the video. If I get it wrong, you just edit me out and make me look really good.

Elspeth From A2X (10:15)
Well, we'll just edit it out.

Philip Oakley (10:18)
Yeah.

Elspeth From A2X (10:19)
Okay, here we go. So first one: inbound shipping and duty?

Philip Oakley (10:24)
Yeah, so we've touched on this a bit. In every single case, that is included in your Cost of Goods Sold. All in until it's in – you wouldn't have had that cost till then. So inbound freight and duty is in your Cost of Goods Sold.

Elspeth From A2X (10:40)
Outbound shipping to customers?

Philip Oakley (10:43)
Okay, so I will go into a little bit of detail here. As a general rule – and as you know, there's no one thing that's 100% – as a general rule, it's an expense. There are a couple of scenarios you can think about where you can consider it as part of your COGS. That could be where it's actually included in the price – so you're not charging for it, it's actually free shipping – then that could be considered as part of your COGS. A slight nuance: if you're in drop shipping, and we know a few ecommerce businesses are drop shipping and your supplier is charging what is effectively outbound freight, that could also be considered a Cost of Goods Sold. So if we're not talking about drop shipping and we're not talking about a product which has free shipping included, then generally that is not in COGS; that's an expense.

Elspeth From A2X (11:38)
Good point on the drop shipping though, because we do have quite a few sellers that are doing that. Okay, next one: Amazon and Shopify fees?

Philip Oakley (11:47)
Amazon and Shopify fees are very important to the profitability of your business, very important that A2X is there doing that for you, but they're an expense, not part of the Cost of Goods Sold.

Elspeth From A2X (11:56)
Okay, advertising and coupons?

Philip Oakley (12:00)
So obviously if it's an advertising cost, it's going to be an expense. If it's actually a coupon which would reduce the price, then that could obviously reduce the sale price. So it's not in COGS; it could be reducing your revenue, your turnover, your sales. But anything in advertising or marketing – when we think about the pay-per-click fees on Amazon, anything they might do in marketing – that's all to do with overheads and expenses.

Elspeth From A2X (12:31)
Okay, and the next one we have touched on this already, but we'll do it again just quickly: packaging materials?

Philip Oakley (12:38)
Yeah, so the distinction in packaging materials: when you think of packaging materials, is this actually product packaging? So it's the nice pretty box or the inner packaging that actually makes up the product that you see and buy, or is it – and I know they're not always brown – the brown shipping box that's actually just there for shipping? If it's product packaging, it's part of the Cost of Goods Sold. Think of it sitting on the shelf looking pretty. If you were in a retail environment and that's where a lot of this stems from, even for ecommerce businesses, sitting on a shelf to make the product look pretty, that's Cost of Goods Sold. A brown box to actually get it there, or equivalent, is a shipping expense.

Elspeth From A2X (13:25)
Good distinction there. Okay, next one: warehouse rent or 3PL storage?

Philip Oakley (13:30)
Yeah, all overheads, all expenses. Again, falls into that category – you're going to have that expense regardless. If the 3PL is charging you to store or to ship again, that's an expense after it's got in. Again, all in until it's in – it's in now. If you've got warehouse rent, if you've got a 3PL who's charging, that's not in Cost of Goods Sold.

Elspeth From A2X (13:55)
That's a good one. Now this one is a little bit more of a grey area: supplier discounts or credits?

Philip Oakley (14:03)
Yeah, I think it depends. I'd say generally speaking, if a supplier has given you a discount on a product that you are buying, then that's in Cost of Goods Sold, so it reduces the cost. If they've given you a credit, it depends what the credit is for. It might be that you've given them the stock back, so we're going to have the stock movement anyway and there's a credit note for that. Generally speaking, we'd be looking at Cost of Goods Sold from those supplier costs.

Elspeth From A2X (14:31)
Last one on the list: customer returns?

Philip Oakley (14:34)
Customer returns are really interesting. I mentioned apparel, which obviously has very high returns, but so many ecommerce businesses need to expect that there'll be returns. Generally the cost of returning the item is an overhead. But if there's repackaging or again it needs a new box, then that can go into Cost of Goods Sold. Some of these things we're talking about strictly for maybe some statutory accounts or compliance accounts in many different countries. There is no doubt some interesting KPIs that different businesses can have. Definitely we see this in apparel businesses: they will look at slightly different margin figures as well as Cost of Goods Sold and gross profit margin. We can have contribution margin; we can have some really interesting stats on returns, understanding what its cost is.

But really, strictly speaking for statutory accounts, there is a distinction between the cost to return the goods in and anything you need to do to get the goods ready to sell them again.

Elspeth From A2X (15:42)
Yeah, and that's a really interesting piece because we're seeing some Shopify brands doing some clever things in Shopify to try and reduce that returns rate based on what they can see, which I think is where some of these Shopify stores are going right now.

Philip Oakley (15:57)
Yeah, I think there's a great opportunity to possibly offer a voucher or a discount or even a trade-up on the sale, and that can make the accounting even trickier to do – to try and understand what was actually sold, what was the margin, then you've got maybe a discount and a voucher. But there's great success we see in people actually encouraging customers to make a purchase when they're making the return and actually making sure that there is a sale.

Elspeth From A2X (16:21)
Yes.

Philip Oakley (16:25)
When people purchase an item, sometimes we see that they actually did want to purchase something, but that one wasn't quite right. So maybe offering them an alternative or an upsell or a discount can be a great thing to do.

Elspeth From A2X (16:37)
I've noticed a prepaid return where you get a slightly discounted rate if you prepay it as well, which is quite a nifty way to do it.

Philip Oakley (16:45)
Yeah, I think we're seeing it's harder and harder to offer free postage and free returns, which of course is cutting into your profits significantly. And this again is the key reporting everybody needs to know. COGS and margin are very important, but we need to consider all of the costs of doing business and how that affects profitability.

Elspeth From A2X (17:06)
Yeah, 100%. Okay, great. So that's been brilliant. There's one more question just to ask you around: what do you think the best practices are for ecommerce businesses trying to get a handle on their Cost of Goods Sold, Phil?

Philip Oakley (17:22)
Obviously I'm a little bit biased, but when we really need to ensure those businesses have the best calculations they can, it's probably having inventory management software. We know many of the A2X clients are starting to look at inventory management and really having that controlled process. It's about people and process before it is about systems and software, and really understanding: when I place a purchase order for goods, I'm going to be very clear on what price it is and checking that price, and then it comes through to the actual invoice that I get that goes into financials. But actually I'm going to start capturing freight and duty costs relevant to those products. What we've seen businesses do over time is have a pile of freight and duty invoices and then actually never quite work out what products they were for. Best practice is to capture those freight costs, those duty costs, and any other relevant costs at the right point, attributed to the right purchases. That can be challenging. You could definitely try and do that in a spreadsheet, but as the business scales and grows, you need software that's going to help you actually calculate the landed cost by giving you the system and the process to attribute those additional costs. Sometimes they need to be weighted across orders – if you ordered three or four things and that duty or the freight cost needs to be weighted or attributed differently across those – and that's where some of this great software can really help.

Elspeth From A2X (18:58)
Okay, that's really helpful. Thank you, Phil. So if you want to learn more about things like accrual accounting or calculating your landed costs, like we've been speaking about, or choosing a cost flow method, which we're going to talk about in another quick video, we have included links to some of that content down in the description. You'll also find a link there to get in touch with Phil and the Outserve team if you want to chat with them. So Phil, thank you for joining us today. It's always great to hear your insights on these types of topics. It's been brilliant having you. Thank you.

Philip Oakley (19:32)
Thank you for having me. It was very enjoyable. Thank you.

What is COGS (Cost of Goods Sold)?

COGS are the direct costs involved in getting the products you sell into a sellable state – everything required to purchase, produce, or prepare them for your customers. (We’ll cover exactly what types of costs this includes below.)

On the Profit and Loss (P&L) statement, COGS appears directly below net sales and is subtracted to calculate gross profit. This shows how much profit remains after accounting for the direct costs of the goods sold and before operating expenses are considered.

Under accrual accounting, COGS is recognized when the sale occurs – not when the goods are purchased. Until that point, inventory costs sit on the balance sheet as an asset. Once the item is sold, its cost is transferred to COGS on the P&L. This reflects the direct product costs used to generate that period’s revenue, and it directly impacts both gross and operating profit.

What to include in COGS

COGS generally includes everything you paid to get a product to the point of being ready to sell on your shelf or in your warehouse.

Think “all in, until it’s in” – every cost associated with getting the product into your warehouse. Costs incurred after that point are usually operating expenses.

A quick question you can ask when determining whether or not a cost belongs in COGS: Would you have incurred this cost if you hadn’t bought the item?
– If yes → usually overhead / OPEX.
– If no → usually belongs in COGS.

Here’s a general guide for what should be included in COGS. Chat with an expert ecommerce accountant or bookkeeper (such as the Outserve team) to better understand what costs should be included in your COGS calculation.

  • Purchase price of the goods – the invoice cost from your supplier
  • Inbound freight / shipping to you – sea freight, air freight, courier fees to bring goods to your location
  • Import duties, tariffs, customs clearance fees – any import taxes charged to bring products in
  • Product packaging that’s part of the product – branded boxes, inner cartons, printed packaging that sits with the product on a shelf
  • Allocation of bulk costs – portion of container/freight/duty allocated to each SKU when multiple SKUs share a shipment
  • Direct costs to make returned stock sellable again – e.g., repackaging or repair required to resell a returned item (when that work is to restore saleability)
  • Supplier credits/discounts tied to the purchase – supplier rebates or credits that reduce the purchase cost

What to exclude from COGS

Operating expenses (OPEX) are left out of COGS because they aren’t direct product costs – they’re ongoing period costs such as marketing, rent, and admin that are expensed when incurred.

Keeping them separate makes gross profit show just the product economics, not the cost of running the business.

With that mind, here’s what’s typically not included in COGS:

  • Outbound shipping to customers – shipping costs after sale are generally OPEX, unless free shipping is built into the product price or a dropshipper bills outbound shipping as part of the product cost
  • Marketplace fees (Amazon, Shopify transaction fees, platform fees) – OPEX
  • Advertising, marketing, PPC – OPEX
  • Warehouse rent and 3PL storage fees – overhead / OPEX
  • Unrelated overheads (utilities, office costs, salaries not tied to production) – OPEX

Common areas of confusion in ecommerce

In the video above, Phil shares a few common “grey areas” that ecommerce sellers often experience, such as:

  • Free outbound shipping included in the sale price → could be treated as part of COGS for margin analysis
  • Dropshipping where the supplier charges outbound freight → often treated as COGS because it’s part of the supplier’s product charge
  • Packaging split on the same invoice (product box + shipping box) → split line items: product packaging to COGS, shipping packaging to OPEX
  • Returns: the cost to receive is usually OPEX; the cost to restore to sellable condition can be COGS

If you’re unsure, consult an ecommerce accounting professional.

Take steps to get COGS right

COGS for ecommerce is about the true landed cost of each unit up to the point it’s ready to sell.

Nail that, and your margins, pricing, channel decisions, and strategic choices become far more reliable. Start with the rule “all in, until it’s in” – then use processes and software to allocate and record those costs precisely.

 

General - Newsletter subscribe

Subscribe to the A2X Newsletter

Subscribe to the A2X Newsletter for expert ecommerce accounting advice and practical resources delivered straight to your inbox.

Subscribe now