Skip to content
Vert

· 6 min read

Inventory and Cost of Goods Sold at Month-End for Shopify Brands

Gross margin is only as good as the cost of sales behind it. How to measure inventory under AASB 102, book COGS in Xero each month and check it against Shopify.

Gross margin is usually the first line a founder reads in the monthly pack, and for many Shopify brands it is the least reliable. Sales tend to be well tested, because they tie back to payouts and the bank. Cost of sales usually isn't. It moves with the purchasing cycle, a freight bill that arrived late, or a product that went live with no cost recorded against it.

This guide covers what the accounting standard asks for, why COGS drifts in a typical Shopify and Xero setup, and a month-end routine that leaves a number you can defend.

What the standard asks for

For a for-profit Australian entity, inventory is governed by AASB 102 Inventories. Four paragraphs do most of the work at month-end:

  • Measurement. Paragraph 9: "Inventories shall be measured at the lower of cost and net realisable value."
  • What counts as cost. Paragraphs 10 and 11 include the purchase price, import duties, transport and handling, and other costs of getting goods to their current location and condition. Trade discounts and rebates reduce cost, and taxes the business later recovers from the taxing authorities are excluded. For a GST-registered brand, that means GST claimed as an input tax credit.
  • Cost formula. Paragraph 25 requires either first-in, first-out (FIFO) or weighted average cost, applied consistently to inventories of a similar nature and use.
  • When it becomes an expense. Paragraph 34: when inventories are sold, their carrying amount is recognised as an expense in the period the related revenue is recognised.

That last point is what month-end is about. COGS for October should be the cost of the units sold in October. It shouldn't be the cost of whatever you happened to buy in October.

Why COGS drifts in a Shopify and Xero setup

The sale never touches an inventory item in Xero. According to Xero's inventory guide, Xero uses the weighted average cost method and "automatically records the COGS based on the average purchase cost of that item" when you invoice a tracked item. Most Shopify brands don't raise a Xero invoice per order. Sales arrive as a summary journal or a split bank line built from the payout. No tracked item is invoiced, so Xero has nothing that triggers a COGS entry, and the inventory asset stays at whatever the purchase bills put there.

Purchases are coded straight to COGS. The common workaround is to code supplier bills directly to cost of sales. That makes COGS equal purchases. In a month when you land a large container ahead of a sale period, margin looks terrible. The next month it looks excellent. Neither figure says anything about the goods you actually sold.

Shopify's cost data is a snapshot. Shopify's profit reports help page says profit is reported "only for products and variants that had cost recorded at the time they were sold". It also says the cost per item field "contains static data", so the reports are "only relevant to a specific point in time". Its example for resellers is the manufacturer price "excluding taxes, shipping, or other costs". Under paragraph 11, freight and duty belong in inventory cost, so a cost per item entered that way can understate it.

Landed costs arrive on different bills. The supplier invoice, the freight forwarder, the customs broker and the duty assessment often reach you weeks apart. If freight is booked straight to an expense line, part of the cost of the stock you still hold has already gone through the P&L.

Two ways to book it

  • How COGS is recorded
    Perpetual
    Per sale, at the item's current cost
    Periodic
    One journal at month-end
  • What it needs
    Perpetual
    Every sale reaching the ledger against an item, with accurate costs
    Periodic
    A reliable closing stock figure each month
  • Where it breaks
    Perpetual
    Sales posted as summaries, missing or stale costs
    Periodic
    No count or system report to rely on
  • Month-end check
    Perpetual
    Ledger inventory agrees to the stock system
    Periodic
    Roll-forward from opening to closing

Brands with an inventory system that posts COGS to Xero are running the perpetual method. Many smaller brands run a periodic method in practice, even if nobody has called it that. Either is acceptable if it is applied consistently and the balance is proven every month.

A worked periodic close

Code every inventory purchase, including freight and duty on inbound goods, to the inventory asset account, not to COGS. Then at month-end, derive COGS from the roll-forward.

Say October's figures are:

  • Opening inventory at 1 October: $84,000.00
  • Supplier invoices for goods received: $41,200.00
  • Inbound freight: $3,100.00
  • Import duty: $2,200.00
  • Closing inventory at 31 October, valued at cost: $79,200.00

Purchases at landed cost are $41,200.00 + $3,100.00 + $2,200.00 = $46,500.00. The GST on the import is left out, because it is recovered as a credit.

COGS is opening plus purchases less closing: $84,000.00 + $46,500.00 − $79,200.00 = $51,300.00.

The journal is a debit to cost of goods sold of $51,300.00 and a credit to inventory of $51,300.00. After posting, the inventory account in Xero should read exactly $79,200.00. If it doesn't, something was coded somewhere other than the inventory account, and you have found it before the pack goes out.

The closing figure needs to be something you can show. That could be a full count, a cycle count reconciled to the stock system, or a valuation report from your inventory app. It should be priced using the same cost formula every month. A closing number that is really an estimate makes COGS an estimate too.

Check the margin from the other side

Once the journal is posted, compare your ledger COGS as a percentage of net sales with Shopify's gross profit reports for the same dates. They will rarely agree to the cent, but the gap should be explainable:

  • Landed costs. Freight and duty in the ledger that aren't in Shopify's cost per item.
  • Missing costs. Products sold with no cost recorded, which Shopify leaves out of its profit figures.
  • Shrinkage and write-offs. Lost, damaged or sample stock that leaves inventory without a sale.
  • Timing. Goods in transit, or stock received before its bill.

If you can't explain the gap with items like these, investigate before you report the margin.

Net realisable value

Cost isn't the end of it. Paragraph 9 caps inventory at net realisable value, which is the estimated selling price less the costs to complete and sell. Paragraph 28 lists the usual triggers: damage, obsolescence and falling selling prices. Paragraph 29 says write-downs are usually made item by item.

For a Shopify brand, the obvious candidates are last season's colourways, short-dated consumables and anything you plan to sell below cost in a clearance. Note them each month, write down any whose expected net proceeds are below cost, and keep the working with the journal.

A month-end checklist

  1. Confirm every inventory bill for the month, including freight, duty and customs charges, is coded to the inventory asset account.
  2. Accrue for goods received but not yet billed.
  3. Obtain the closing stock figure from a count or a system report, priced on your chosen cost formula.
  4. Post the COGS journal and confirm the inventory balance agrees to the closing figure.
  5. Review slow-moving and damaged stock for net realisable value write-downs.
  6. Compare the ledger margin with Shopify's gross profit reports and explain the difference.
  7. File the roll-forward, the count and the journal together, so the number can be traced.

Where this fits in your close

Gross margin has two halves. The revenue half comes from payouts: sales, fees, refunds and chargebacks that need to be decomposed and proven to the deposit. The cost half comes from inventory, and it needs its own roll-forward. If either half is loose, the margin is loose.

Vert handles the revenue half. It decomposes each Shopify Payments, Stripe, PayPal and Afterpay payout and proves it to the cent before drafting the entry. If you'd like that half to arrive already reconciled, so the month-end time can go into the inventory side, you can join the pilot.

All posts

Agents that radically accelerate your close

Vert reconciles accounts, drafts the journals and explains every variance — with your approval and a complete audit trail.