<- Back

How to Calculate COGS for eCommerce Brands

Jones Bepi
11 Jan 2022
5 min read

How to Calculate COGS for eCommerce Brands

Stock is the balance we see eCommerce brands get wrong most often.

Not slightly wrong. Materially wrong.

And once stock is wrong, the problem spreads through the rest of your numbers. Your gross margin is
wrong. Your contribution margin is wrong. Your ROAS is wrong. Your LTV is wrong. You end up
making decisions from a set of accounts that look precise, but are built on a stock balance no one has
properly reconciled.

For a £10m eCommerce business, this is not an accounting admin issue. It affects pricing, marketing
spend, cash flow, fundraising, board reporting and how much confidence you can have in your own
numbers.

This article explains how to calculate COGS for eCommerce properly, where it usually goes wrong, and
how to check whether your books are materially accurate.

The basic COGS formula does not change with size

Whether you turn over £1m or £100m, the core COGS calculation is the same:

FORMULA / CALLOUT

Opening stock + purchases - closing stock = cost of goods sold

That is the proper accounting method.

If you started the month with £500k of stock, bought another £300k, and ended the month with £450k of
stock, your COGS for the month is £350k.

Simple enough.

The complexity is not the formula. The complexity is making sure the numbers inside the formula are
right.

What exactly is included in purchases? Have you included freight? Have you included customs duty?
Have you excluded recoverable import VAT? Are supplier deposits sitting in stock when they should not
be? Are goods invoiced but not received being treated properly?

That is where most eCommerce accounts start to drift away from reality.

The “second method” for calculating COGS is not really a second method

You will often hear people say there are two ways to calculate COGS.

The first is the stock movement method:

FORMULA / CALLOUT

Opening stock + purchases - closing stock

The second is the unit cost method:

FORMULA / CALLOUT

Units sold x cost per unit

There is some truth in that, but it needs to be understood properly.
The unit cost method is very useful for management reporting, especially when you want to split
product COGS by sales channel, SKU, geography or customer group. But it is not a substitute for
reconciling your stock movement through the balance sheet.

In theory, both methods should get to the same answer.

In real life, they rarely do.

Why? Because stock does not only move when you make a sale.

You may have:

  • Influencer gifting
  • Marketing samples
  • Damaged stock
  • Wastage
  • Warehouse errors
  • Replacements
  • Returns that are not added back to sellable stock
  • Stock adjustments inside your inventory system

If your COGS calculation only looks at units sold, it will miss those movements unless you have a
process to capture them separately.
That is why the unit cost method is useful, but it has to be checked back to the balance sheet.

How to calculate COGS by channel

For a serious eCommerce business turning over seven figures or more, I would strongly recommend
using an inventory management system.


The usual options we see are:

  • Unleashed
  • Cin7
  • Katana

None of these systems solve the problem on their own. A badly implemented inventory system can be
worse than no system because it creates a false sense of accuracy. But if the system is set up properly,
it gives you much better control over stock on hand, landed costs, product movements and channel
profitability.

If you do not have an inventory system, you can still calculate product COGS by channel using the unit
cost method.

For each SKU, take:
FORMULA / CALLOUT

Landed cost per unit x units sold by channel

That gives you product COGS by channel.

For example, if you sold 2,000 units of SKU A on Shopify and the landed cost is £4.20 per unit, your
Shopify product COGS for that SKU is £8,400.

Repeat that across each SKU and each channel, then compare the total back to your accounting
COGS figure based on:

FORMULA / CALLOUT

Opening stock + purchases - closing stock

If the two numbers do not materially align, do not ignore the difference. The difference is telling you
something.

It could be gifting. It could be wastage. It could be returns. It could be a timing issue. It could be the
wrong landed cost. It could be that your closing stock figure is simply wrong.

The mistake is treating the channel COGS report as correct because it looks detailed. Detail does not
equal accuracy.

The biggest COGS issue is usually timing

The most common issue we see is a timing mismatch between sales and stock movement.

Most consumer brands take sales data from Shopify. I understand why. Shopify is usually the
commercial source of truth across the business. Marketing teams use it. Founders use it. Operations
teams use it.

But Shopify recognises the order when the customer places it, not necessarily when the product is
shipped.

That creates a potential mismatch.

If you recognise the sale on the order date, but the stock does not leave the warehouse until two days
later, your sales and product cost may fall into different periods.

In many months this will be immaterial because the mismatch at the start of the month is offset by the
mismatch at the end of the month. But not always.

If you have a large sales spike near month end, a product launch, a delayed fulfilment window or a
preorder campaign, the timing difference can be material.

The fix is not complicated, but it does need discipline.

You need to compare order date against fulfilment date and decide whether a deferred income
adjustment is needed. If the sale has been booked but the product has not shipped, you need to
consider whether the revenue and COGS are being recognised in the right month.

This is one of those adjustments that can look small until it is not.

Wrong cost data destroys your margins

The second common issue is using the wrong product cost.

In my experience, people tend to pick the most flattering cost number available. Usually that means the
raw supplier cost.

That is not enough.

For stock valuation, you need to use a consistent method such as FIFO or average cost, and the cost
should be based on landed cost.

Landed cost usually includes:

  • Supplier product cost
  • Inbound freight
  • Customs duty
  • Other directly attributable costs of getting the product ready for sale

It should not include recoverable import VAT because that is not a cost to the business if you can
reclaim it.

This matters because the difference between supplier cost and landed cost can be significant.

If your supplier cost is £5.00 per unit, but freight and duty add another £0.80, your true product cost is
£5.80. On 100,000 units, that is an £80,000 difference.

If you are using £5.00 in your channel profitability report, your margins are overstated. Your ROAS
targets are too aggressive. Your LTV calculation is too optimistic.

This is how brands end up scaling products that are less profitable than they think.

Returns need proper treatment

Returns are another area where COGS can go wrong.

Many businesses calculate units sold on a net basis, so sales less returns. That can be correct, but only
if the stock returned is added back into inventory.

That is not always what happens.

If a customer returns a damaged item, you may not be able to resell it. If you sell hygiene products,
cosmetics, supplements or certain personal care items, returned products may not go back into sellable
stock at all.

In that case, reducing units sold without adjusting for the stock write-off will understate COGS.

You need to split returns into categories:

  • Returned and resellable
  • Returned and written off
  • Replaced but not returned
  • Refunded without stock coming back

Each category has a different accounting treatment.

If all returns are treated the same, your stock balance will almost certainly be wrong.

COGS is not just sales

A weak COGS process usually starts with the same mistake: looking only at sales data.

Sales data tells you what customers bought. It does not tell you everything that happened to stock.

You need to capture the full stock movement, including:

  • Sales
  • Refunds and returns
  • Gifting
  • Samples
  • Damaged stock
  • Lost stock
  • Warehouse adjustments
  • Stock transfers
  • Bundles
  • Replacements
  • Write-offs

This is why a monthly stock reconciliation matters.

If your accounting team only posts COGS from Shopify sales data, they are not calculating COGS
properly. They are estimating it.

That may be acceptable for a very small business. It is not good enough for an eCommerce brand
doing £10m in revenue.

How to tell whether your COGS is accurate

The best way to tell whether COGS is accurate is to look at the balance sheet.

If your balance sheet does not reconcile to source data, your P&L cannot be trusted.

At month end, you should be able to prove the following.

Stock on hand agrees to source data

Your stock on hand balance in Xero should agree to your inventory system or stock report.

If your inventory system says stock on hand is £600k, Xero should not say £480k unless there is a clear
reconciling difference.

And “timing” is not a good enough explanation unless someone can show the actual timing difference.

Supplier deposits are split out

Supplier deposits should not sit inside stock on hand.

If you have paid a manufacturer before the goods are produced or shipped, that is normally a supplier
deposit or prepayment. It should sit separately on the balance sheet.

Otherwise, you inflate stock on hand with products you do not physically hold and may not even have
been invoiced for properly yet.

For eCommerce brands placing large production orders, this can be a major balance.

Goods invoiced but not received are treated separately

Sometimes you receive the supplier invoice before the goods arrive.

If the goods are not in your stock on hand report yet, they should not be treated as normal stock on
hand in Xero without a clear adjustment.

This is where a separate “goods invoiced not received” balance can help.

The key is to separate:

  • Stock physically held
  • Deposits paid to suppliers
  • Goods invoiced but not received
  • Goods received but not invoiced

If those are all mixed together in one stock account, the balance becomes very hard to reconcile.

The practical test for a £10m eCommerce brand

If you are doing £10m in revenue, you should be able to answer these questions every month:

  • Does stock on hand in Xero agree to the inventory system?
  • Are supplier deposits split out?
  • Are goods invoiced but not received split out?
  • Are landed costs being used rather than raw supplier costs?
  • Are returns treated correctly?
  • Are gifting, samples, damage and write-offs captured?
  • Does channel-level COGS reconcile back to total accounting COGS?
  • Are major timing differences between order date and fulfilment date adjusted?

If the answer to any of those is no, your COGS may still be directionally useful. But it is not reliable
enough to make serious decisions from.

Final takeaway

COGS is not just an accounting line. It is the foundation of your gross margin, contribution margin,
ROAS targets, LTV and cash flow planning.

The correct calculation is simple:

FORMULA / CALLOUT

Opening stock + purchases - closing stock

But the work is in proving that each part of that calculation is right.

For a £10m eCommerce brand, the minimum standard is a monthly balance sheet reconciliation that
agrees back to source data. Your inventory system, Xero and channel profitability reports should all tell
the same story.

If they do not, keep going until you understand the difference.

That difference is where the problem is.

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Block quote

Ordered list

  1. Item 1
  2. Item 2
  3. Item 3

Unordered list

  • Item A
  • Item B
  • Item C

Text link

Bold text

Emphasis

Superscript

Subscript

Frequently Asked Questions

Everything you need to know about working with Abacai, from scope and pricing to timelines and compliance.

How much does it cost?

Pricing depends on size, complexity, and reporting requirements. We scope the work properly before quoting. Fees typically start from around £2,000 per month and can scale to £10,000+ for larger, more complex businesses.

Are you accountants?

Yes. We are an ICAEW-chartered firm. The difference is how we work. We operate like an in-house finance team, not a traditional practice. 

Do you specialise in ecommerce, retail, and consumer brands?

Yes. This is the only sector we work in. That focus lets us go much deeper than generalist firms. We do not spread ourselves across multiple industries.

How quickly can you close month-end?

It depends on what you need. Some clients close in one to two working days as part of a premium service. Most choose structured closes of 5, 10, or 15 working days.

Can you work alongside our in-house finance team?

Yes. That is a common setup. We remove day-to-day workload so your internal team can focus on leadership, planning, and decision-making.

Is your pricing fixed?

Yes. Our core service is priced on a fixed monthly fee, scoped carefully upfront. Most clients see no pricing changes for at least 12 months. Anything outside the agreed scope is discussed and priced separately in advance.

What if ecommerce is only part of our business?

That is normal. Many clients also sell wholesale or through retailers. Multi-channel complexity comes with growth, and it is something we handle every day.

Are you the same as a fractional CFO?

No. We do not position ourselves as a CFO replacement. We run the execution and financial foundations that finance leaders and CFOs rely on.

Do we still need an in-house finance team?

It depends on scale. Up to around £5m revenue, we can act as the full finance team. Beyond that, many clients add a fractional FD or CFO alongside us.

Do you bring your own processes?

Yes. We bring proven finance processes built from working with 50+ scaling businesses. We are not process consultants, but we run robust, repeatable setups that work.

Will you handle compliance filings?

Yes. VAT returns, statutory accounts, corporation tax, and confirmation statements are all included in the monthly fee.

Do you run payroll?

Yes. Full UK payroll, including RTI and pension reporting.

Do you pay suppliers?

We offer an optional payments service. We prepare and schedule payments, you review and approve.

Do you charge for extras?

Most services are included. Anything outside scope is discussed and agreed before work starts.

How long is the contract?

Typically 12 months, reflecting annual compliance services. Shorter break clauses can be agreed if needed.