Guide

COGS Journal Entry: How to Prepare One You Can Defend

L

Landara Team

Import Operations Experts

||8 min read
THE ENTRY TAKES TEN SECONDS. THE AMOUNT TAKES A LEDGER.RECEIPTS OF STOCK12 March600 units, goods $6,000freight, duty, clearance $1,200$12.0028 April400 units, goods $4,800freight, duty, clearance $1,400$15.50MAY SALES, OLDEST LAYER FIRST450 units shipped150 x $12.00 = $1,800300 x $15.50 = $4,650$6,450the cost of the units that leftTHE JOURNALDr Cost of Goods Sold$6,450Cr Inventory$6,450A COST PER SKU WOULD HAVE SAID450 x $10.00 = $4,500$1,950 of margin you never hadEvery receipt of stock arrives at a different price, and your store keeps one.Cost of sales plus closing stock has to add back to what came in. A report never has to.

It is the eighth of June, and your bookkeeper has asked for one number.

Not a report. One number: what the stock you sold in May cost you. They need it because the entry will not balance without it, and until it is posted your May profit and loss shows a full month of revenue with nothing set against it, which makes May look like the best month you have ever had.

You have the pieces, sort of. Shopify knows you shipped 450 units in May, order by order, and it has never once been wrong about that. The supplier invoices are in a folder. The forwarder's invoice is in there too, the one that arrived on 4 April for goods that landed on 12 March. And there is a spreadsheet with a cost per SKU in column D, last updated in February.

So you export the Shopify sales report, multiply units by column D, and send the total. It takes eleven minutes. Your bookkeeper posts it, the entry balances, the month closes, and the journal gets a reference number.

Nobody in that chain can tell you whether the number was right.

A COGS journal entry is a debit to Cost of Goods Sold and a credit to Inventory, for the cost of the units you sold in the period.

The entry is two lines and it is the easy part. The amount is the hard part, and a stock report cannot give it to you, because the report knows how many units left and not what those particular units cost.

Here is the difference, in arithmetic you can check.

Why is the amount the hard part?

Take one product across three months. Round numbers, so you can follow them. This is a worked example, not a customer.

12 March. Six hundred units arrive. The supplier invoice is $6,000, so $10.00 a unit, and that is the number that goes into the spreadsheet and into Shopify's Cost per item field.

March sales: 250 units. You multiply, and you post $2,500 of COGS.

4 April. The forwarder invoices $840, and the customs broker invoices $300 of customs duty and $60 of clearance, all of it against the goods that landed on 12 March. That receipt cost $7,200, so each of those 600 units cost $12.00, not $10.00.

March was understated by $500, and March is closed.

The $500 does not evaporate. It is sitting in the value of the 350 units you had not sold yet, so it comes out of a later month instead. One late invoice makes two months wrong: the one that posted too little, and the one that quietly absorbs the difference.

28 April. A second shipment lands. Four hundred units, supplier invoice $4,800, freight $1,000, customs duty $360, clearance $40. Those units cost $15.50 each.

April sales: 200 units, drawn from what is left of the March receipt at $12.00: $2,400.

May sales: 450 units. A hundred and fifty units remain from March at $12.00, and the rest come out of the April receipt at $15.50.

  • 150 x $12.00 = $1,800
  • 300 x $15.50 = $4,650
  • May COGS: $6,450

So the journal is:

AccountDebitCredit
Cost of Goods Sold$6,450 
Inventory $6,450

Writing that entry takes ten seconds. Producing $6,450 takes a ledger.

Compare it with the eleven-minute version. Cost per item still says $10.00, because nothing ever changed it, so 450 units multiplies out to $4,500. May's cost is understated by $1,950 on one product, and gross profit is overstated by the same amount in the month you are about to use to decide whether the product is working.

There is a check worth doing on any COGS figure, and it is why this is a ledger rather than a report. The two receipts cost $13,400. March, April and May consumed $3,000, $2,400 and $6,450 of that, and the 100 units still on the shelf are worth $1,550. Those add back to exactly $13,400. Every dollar in has either gone out as cost of sales or is still in stock. A cost per SKU times a unit count cannot be checked that way, because it never had to add up to anything.

Averaging is the other shortcut, and it fails quietly, because the total still comes out right. At the end of April you hold 150 units that cost $12.00 and 400 that cost $15.50. Averaged, every unit costs about $14.55. FIFO says the next 150 you ship cost $12.00 and the ones after that cost $15.50. The average says $14.55, which is true of none of them, and it is the figure you would price your next order from. (FIFO or average, and when the gap matters.)

One line belongs in none of those numbers. If your border charges a recoverable import tax (GST, VAT, or whatever your border charges), you pay it on the way in and claim it back on your next return. It is cash tied up, not cost, and putting it in a unit cost inflates your inventory, your COGS and your reported margin at once. On the March shipment it would have been $714 in Australia, 10% on the goods, freight and duty together, and not a cent of it belongs in the $12.00. Customs duty is the opposite: you never get it back, so it capitalises. If you import into the United States there is no recoverable line at all. Duty and fees are paid and kept, and there is nothing to strip out. (What landed cost includes.)

What has to be behind each line?

A journal that balances is not the same as a journal you can defend. The test is short: when your accountant asks where the number came from, can you open it?

The lineWhat has to be behind it
The amountEvery unit that shipped in the period, each priced out of the specific receipt it came from. Not one cost per SKU, and not a cost that was current in February
The periodFulfilment dates, bucketed in the timezone you actually report in. An order placed on 31 May and shipped on 2 June is June's cost, not May's
The debitCost of goods sold. Stock adjustments, write-downs and transfers move inventory value too, and none of them is a sale. They belong in their own entries
The creditAn Inventory account that was genuinely debited when the stock was capitalised, freight and duty included. You cannot credit value out of an account that nothing ever put value into
The referenceA movement-level list you can open: which order, which unit, out of which receipt, at what cost
The restatementWhat has changed since you last posted, and whether it has already been journalled

The last two are what separate a costing ledger from a costing report, and the last one is the one people meet late. Once a period is posted, the fix for a cost that turns out to be wrong is a correcting journal, never a second version of the old one. Your books say what they said on the day. The ledger says what is true now. The difference between them is the correction, and if you cannot see that difference you cannot raise it.

A reference number tells you a journal exists. It does not tell you what is inside it, and it will not survive the first person who asks.

What people try first, and who each one is actually right for

A spreadsheet. Genuinely right for a store with one supplier, one shipment a year, and freight small enough to ignore. Past that it has three problems and only one of them is effort. It cannot see a sale. It arrives after the freight invoice does. And it holds one cost per SKU where the journal needs a cost per receipt.

Typing a better number into Cost per item. Worth doing, because it is what Shopify's own profit reporting reads. It cannot produce the journal, and Shopify says why in its own documentation: Cost per item is "the price that you paid the manufacturer, excluding taxes, shipping, or other costs", and the post-Stocky migration guide calls it a "single static Cost per item field" that stays fixed when you receive a purchase order (Shopify Help Center, checked August 2026). One field, one number, no history.

Reading it off a profit dashboard. Right for watching ad spend against revenue this week, which is a real job that a costing ledger does not do. It is not a sub-ledger. Profit reporting is only as good as the cost recorded at the time of each sale, and a dashboard total cannot be reconciled to the Inventory balance in your books, which is what the credit side of this journal has to agree with. (Why that reconciliation matters.)

Buying a full inventory system. Right if you need multi-warehouse allocation, manufacturing, or demand forecasting. If that is you, buy one, and do not buy a costing tool instead. They are built and priced for businesses considerably larger than a store doing its own month-end, and a small importer usually ends up paying for a forecasting engine to get at a cost ledger.

What a defensible COGS journal looks like

Described as capabilities rather than as a product, the fix has four parts, and none of them is a better spreadsheet.

Something has to see the sale, because the store is where units actually leave. Something has to hold a cost per receipt rather than a cost per SKU, so the second shipment does not overwrite the first. Freight, duty and clearance have to land inside the unit cost, which means waiting for an invoice that shows up three weeks late and restating what is already known. And the output has to be an entry a person reviews and posts, with the movements behind it open for inspection.

That is what Landara does. It connects to a Shopify store, attaches a dated cost layer to every receipt of stock, draws those layers down oldest first as orders ship, and produces a ready-to-post Dr COGS / Cr Inventory journal for Xero or QuickBooks Online. Shopify stays in charge of quantity. Landara owns the cost side, and it never writes to your ledger by itself: you approve the entry, or your accountant does. On an existing accounting file there is one opening journal to make first, because you cannot credit stock out of an Inventory account nothing has debited yet. (What has to sit behind each line once it reaches Xero or QuickBooks.)

The journal review page in Landara: the entry, and the movements behind it, before anyone posts
The journal review page in Landara: the entry, and the movements behind it, before anyone posts

It is the wrong tool for some stores. If you manufacture what you sell, run several warehouses, or need demand forecasting, buy an inventory system. And if you sell a handful of domestically bought products at a stable price and never see a freight invoice, a spreadsheet is genuinely fine, and this article was about a problem you do not have.

The Journal, Prepared. You Decide When It Posts.

Connect Xero or QuickBooks Online and Landara prepares the Dr COGS / Cr Inventory journal, with the movements behind it open for inspection.

See the integration
L

Written by Landara Team

Import Operations Experts

The Landara team is dedicated to helping Shopify merchants and importers get finance-grade cost of goods sold without running an inventory system.

Related Articles

THE FORMULA DOES NOT COMPUTE COGS. IT BACK-SOLVES IT.TWO VERY DIFFERENT QUARTERSQuarter A750 units sold to customersnothing lostQuarter B700 units sold to customers50 units gone, nobody knows howTHE SAME THREE INPUTSBeginning inventory$4,800+ Purchases$9,600- Ending inventory$4,000COUNTED, NOT CALCULATED250 units on the shelf, either waybecause the 50 are not there to countONE ANSWERCost of goods sold$10,400Quarter A revenue $24,000Quarter B revenue $22,400$800 of loss, filed as cost of salesWhatever is missing from the count becomes cost of goods sold, by definition.And every receipt of stock arrives at a different price, so all three inputs are valuations.
Guide

COGS Formula: What It Calculates, and What It Hides

11 min read

ONE FIELD, FOUR DEFENSIBLE ANSWERSWHAT ARRIVEDMARCH300 units @ $10.40JUNE500 units @ $12.90Same barcode. Same bin.Two genuinely different costs.400 sold in JulySHOPIFYCost per itemone valueChanges only whensomebody changes it.COGS ON THOSE 400 UNITSMarch cost, $10.40$4,160June cost, $12.90$5,160Weighted average, $11.96$4,785Oldest first, per receipt$4,410A $1,000 spread, on one product, in one month.Only the last one ties back to the $9,570 you spent.Accuracy was never the missing ingredient. Room was.
Guide

How to Manage Costs in Shopify When Stock Arrives at Several Prices

9 min read