Learn · COGS & inventory

how is cost of goods sold calculated

Short answer

Cost of Goods Sold (COGS) = Beginning Inventory + Purchases (or Production Costs) − Ending Inventory. For Amazon sellers, this means unit cost, inbound freight, duties, and prep/labeling fees rolled into inventory value, expensed only when the unit actually sells.

Marcus Brandt, Head of Seller Accounting at BeanHawk

By Marcus Brandt · Head of Seller Accounting

Updated July 16, 2026

Cost of Goods Sold looks like a simple formula until you try to apply it to a real Amazon business with FBA fees, returns, damaged units, and inventory sitting across multiple warehouses. Getting it right matters — COGS drives your gross margin, your tax bill, and whether you actually know if a SKU is profitable.

The Core COGS Formula

At its foundation, COGS is calculated with one equation: Beginning Inventory + Purchases − Ending Inventory = COGS. This tells you the cost of everything that left inventory and was sold during the period, as opposed to what you spent on inventory or what's still sitting on shelves.

For a private-label Amazon seller, 'Purchases' isn't just the unit cost from your factory invoice. It should include everything required to get that inventory into a sellable state: manufacturing cost, inbound freight and customs duties, and any prep, labeling, or poly-bagging fees paid before the unit is available for sale. FBA storage fees, referral fees, and advertising spend are NOT part of COGS — those are operating expenses that show up further down the P&L.

  • Beginning Inventory: value of stock on hand at period start
  • + Purchases: unit cost + freight + duties + prep fees
  • − Ending Inventory: value of stock still on hand at period end
  • = Cost of Goods Sold

Why Per-Unit Costing Matters More Than the Formula

The formula above works at the aggregate level, but real accounting happens per SKU. You need a landed cost per unit — total cost to get one unit sellable, divided into cost per unit — so that every sale recognizes the correct expense, and every unsold unit stays correctly valued as an asset on the balance sheet.

This is where most seller books break down. Freight bills arrive separately from PO invoices, prep fees get missed, and multi-SKU shipments don't automatically allocate landed cost by unit. If landed cost is wrong, COGS is wrong for every single sale of that batch — which quietly distorts margin reporting for months.

It also matters for reimbursements. Since 2025, Amazon reimburses lost or damaged FBA inventory based on the seller's manufacturing/sourcing cost rather than retail price — and Amazon will use its own cost estimate unless you've supplied your actual cost. If your books don't have an accurate per-unit landed cost on file, you're at the mercy of Amazon's estimate, which is frequently lower than what you actually paid.

See it in BeanHawk

True COGS and live inventory value

BeanHawk keeps a perpetual, landed-cost valuation of every SKU — so your COGS is real, your margins are honest, and your balance sheet reflects what's actually on the shelf.

  • Landed cost per unit — freight, duties, prep — not just the invoice price
  • COGS recognized as units sell, not when you pay a supplier
  • Inventory value and 30-day COGS per SKU, exportable to your ledger
See inventory accounting →
app.beanhawk.com/inventory/valuationBeanHawkDashboardReimbursementsBooksInventoryChannelsJRJordan R.Owner · Pro planInventory & true COGSSTOCK VALUE$20,030landed-cost basisUNITS ON HAND3,037across 42 SKUsCOGS (30d)$29.2kfrom units soldValuation by SKUExport →SKUON HANDLANDEDVALUECOGS 30dWireless earbuds1,240$8.10$10,044$14.9kYoga mat — teal612$6.40$3,917$5.2kSteel water bottle980$3.85$3,773$6.1kLED desk lamp205$11.20$2,296$3.0k

COGS Methods: FIFO, Weighted Average, and Why It Matters

There are a few accepted methods for valuing inventory and calculating COGS, and the one you choose affects both your reported margin and your tax liability, especially when unit costs change over time.

FIFO (first-in, first-out) assumes the oldest inventory sells first — common for sellers whose product costs rise over time, since it keeps older, cheaper costs in COGS and newer costs in ending inventory. Weighted average smooths cost fluctuations across all units in stock, which is simpler to manage across frequent restocks but less precise when input costs swing.

Whichever method you use, the IRS expects consistency and documentation — inventory costing isn't something you can switch quarter to quarter without a real reason. The IRS instructions for Form 1125-A lay out the accepted inventory valuation methods and what supporting detail is expected if you're ever asked to substantiate COGS on a tax return.

Where Amazon Sellers Get COGS Wrong

Three mistakes show up constantly in seller books. First, treating Amazon fees as part of COGS — referral fees and FBA fulfillment fees are operating expenses, not inventory cost, and mixing them in inflates your reported COGS while understating true gross margin.

Second, ignoring inventory adjustments from lost, damaged, or destroyed units. When Amazon loses inventory, the units need to come out of your inventory asset account and the reimbursement needs to be recorded separately — not netted directly against COGS, which hides both the loss and the recovery.

Third, forgetting returns and refurb costs. A returned unit that gets relisted, discounted, or liquidated needs its cost basis adjusted, not left at original landed cost. This is exactly the kind of reconciliation that's hard to do manually across thousands of SKUs and monthly settlement reports — which is why purpose-built Amazon accounting software exists to automate landed cost tracking, reimbursement matching, and COGS posting instead of relying on spreadsheets.

Frequently asked questions

Does COGS include Amazon FBA fees?
No. COGS covers what it costs to acquire or produce the inventory — unit cost, inbound freight, duties, and prep fees. FBA storage, fulfillment, and referral fees are operating expenses reported separately on your income statement.
How do I calculate COGS if I don't track inventory by unit?
You can still use Beginning Inventory + Purchases − Ending Inventory at a portfolio level, but you'll lose SKU-level profitability, which makes pricing and ad spend decisions much harder. Per-unit landed costing is strongly recommended once you have more than a handful of SKUs.
What do I do with COGS when Amazon reimburses a lost unit?
Record the inventory loss at your actual landed cost (removing it from inventory), and record the reimbursement as separate income or a recovery, not a direct offset to COGS. Since Amazon now bases reimbursements on your sourcing cost rather than retail price, having documented landed cost on file directly affects how much you get paid.
Should I use FIFO or weighted average for my Amazon business?
FIFO is common when unit costs are rising, since it keeps older, cheaper costs in COGS and improves reported margin. Weighted average is simpler to maintain with frequent reorders at fluctuating costs. Pick one, apply it consistently, and keep documentation in case of an audit.
Why does my COGS look different from my Amazon settlement report?
Settlement reports show cash movements — fees, refunds, reimbursements — not accrual-based inventory expense. COGS should be recognized when a unit sells based on its landed cost, independent of when Amazon pays you or deducts fees, which is why the two numbers rarely match without a proper accounting layer in between.

See what Amazon owes you — free

Connect your seller account and get a free reimbursement audit. No credit card, keep 100% of what you recover.