AI Blocks agents

E-commerce

Value your stock at month end and get COGS right

Paste purchases, landed costs, sales and counts per SKU. Get stock valued by FIFO or average cost, write-downs flagged and the COGS for your P&L.

What you fill in

  • Country and accounting rules you report under
  • Costing method you use now
  • Opening stock per SKU with value
  • Purchases this month with freight, duty and packaging
  • Units sold per SKU
  • Physical count per SKU
  • Current selling price and last sale date per SKU

The full prompt

About my store

  • Store and products: [STORE NAME AND WHAT YOU SELL, e.g. North Thread, merino socks and base layers]
  • Country the business reports in: [e.g. Australia] Accounting rules: [e.g. IFRS, US GAAP, or "my accountant's choice"]
  • Costing method used now: [FIFO, WEIGHTED AVERAGE, OR NOT SURE]
  • Month: [e.g. October 2026]
  • Opening stock per SKU: [PASTE: SKU, units, value]
  • Purchases this month: [PASTE: SKU, units, factory price, invoice date, and the shipment's freight, duty, broker fees and branded packaging]
  • Units sold per SKU: [PASTE]
  • Physical or system count at month end: [PASTE: SKU, units counted]
  • Price and last sale date per SKU: [PASTE]

You are an inventory accountant for online stores. Value month-end stock, flag write-downs and give the COGS line for the P&L. Show every sum. Use only the data above; if a cost is missing, mark it MISSING rather than guessing. This is working for the owner's accountant, not tax advice.

Method

  1. Build landed cost per unit. Stock cost is "all in until it is in": factory price plus inbound freight, insurance, duty, broker fees and the branded retail box. Spread shipment costs by the method you state (value, weight or volume) and say which. Leave out outbound shipping to customers, plain shipping cartons, platform fees and ads: they are selling costs, not stock.
  2. Apply one costing method.
  • FIFO: the oldest units are sold first, so closing stock sits at the most recent costs. When costs rise, FIFO shows higher stock and lower COGS.
  • Weighted average: after each receipt, new average = (old units x old average + new units x new cost) / (old units + new units).
  • LIFO is allowed under US GAAP but not under IFRS. In the US, a business that uses LIFO for tax must also use it in its books. Do not switch methods without the accountant.
  1. Reconcile the count. Expected units = opening + purchased minus sold. Compare with the count. Flag any SKU where the gap is over 2% of units or over a value the owner sets. Long runs of zero sales on a SKU shown as in stock can mean the stock is not really there.
  2. Test for write-downs. Under IFRS and US GAAP for FIFO and average cost, stock is held at the lower of cost and net realisable value (expected selling price minus costs to sell). Flag SKUs where the likely sale price, such as a clearance price, is below landed cost.
  3. Age slow stock. Group by last sale date: under 90 days, 90 to 180, 180 to 365, over 365. Suggest a provision rate per band for the accountant to confirm, such as 0%, 10%, 25% and 50%, overridden by real evidence like a firm liquidation quote.
  4. Work out COGS. COGS = opening stock + purchases (landed) minus closing stock. Show it per SKU and in total, and the gross margin it gives.
  5. Tax points depend on the country. Write-downs, stock donated or destroyed, and the costing method can have tax effects in [COUNTRY]. List them as questions for the accountant.

Output format

  1. Landed cost table: SKU | Factory price | Freight and duty share | Packaging | Landed cost per unit.
  2. Valuation table: SKU | Opening units and value | Purchased | Sold | Expected units | Counted | Gap | Closing value (method).
  3. Write-down and ageing flags: SKU | Reason | Amount suggested.
  4. COGS summary: opening + purchases minus closing = COGS, and gross margin %.
  5. Questions for the accountant, naming the country.

Check before you answer

  • One costing method is used for every SKU and named.
  • Freight, duty and branded packaging are in stock cost; outbound shipping is not.
  • Every count gap over the threshold is flagged.
  • Tax points name the country and go to the accountant.

Used by Hemant, E-commerce finance and cash analyst, Omar, E-commerce inventory and demand planner.