COGS (cost of goods sold) is the cost of the units you sold in a period. For a month it is beginning inventory plus purchases minus ending inventory. Each unit should be valued at landed cost: the supplier price plus packaging, inbound freight, duties, customs brokerage, inspection and prep. Amazon referral fees, FBA fulfillment fees, storage and ad spend are channel costs, not COGS.
To calculate COGS (cost of goods sold) for a month, take beginning inventory, add purchases, and subtract ending inventory. Value every unit at its landed cost. Landed cost per unit is the supplier price plus that unit’s share of packaging, inbound freight, duties, customs brokerage, inspection and prep.
You need both parts. The monthly formula is only as good as the unit cost you value inventory at.
The two formulas
The periodic formula
For any period:
COGS = beginning inventory + purchases − ending inventory
This is the same structure as the cost of goods sold lines on IRS Schedule C, a US business tax form, explained in IRS Publication 334. It works by subtraction. Any inventory value that left and did not come back counts as sold. That is why it quietly pulls samples, damaged units and lost stock into COGS unless you take them out. More on that below.
Landed cost per unit
The formula needs each unit valued at a cost. US GAAP is the standard set of US accounting rules. Its inventory standard (ASC 330) defines cost as the money spent to bring an item to its existing condition and location. The IRS says it more plainly in Publication 538. Cost is the invoice price minus discounts, plus transportation and other charges to buy the goods.
For a brand that imports finished goods, landed cost usually includes:
- Unit cost from the manufacturer, net of any discounts
- Packaging bought separately: retail box, insert, pouch
- Inbound freight to your warehouse or prep center, including ocean or air freight, drayage (the truck from port to warehouse) and freight insurance
- Duties and tariffs, charged by tariff line (the product’s category code) on the Harmonized Tariff Schedule
- Customs brokerage, the fee a broker charges to clear goods through customs, and entry fees
- Inspection before the goods leave the factory
- Prep and labeling, such as FNSKU labels (Amazon’s own barcode) and poly bags
- Freight to the Amazon fulfillment center for units you send to FBA (Fulfillment by Amazon)
Two edge cases. GAAP and the IRS both treat inbound freight as inventory cost. Some small brands still book it as a separate expense for simplicity. That makes COGS look lower than it is, so we recommend including it.
Amazon’s inbound placement service fee is the second. Amazon charges it per unit to spread your inventory across its fulfillment centers. The rate depends on how many locations you ship to. It sits close to inbound freight. Practice varies on where brands put it. Pick one place and keep it there.
What is not COGS
These costs happen when a unit sells, ships or sits. They are real, but they are not the cost of the product:
- Amazon referral fees, the category percentage Amazon takes on each sale (Amazon’s selling fees)
- FBA fulfillment fees, paid per unit shipped to a customer
- Monthly and aged inventory storage fees
- Ad spend on any platform
- 3PL pick-and-pack and outbound shipping for your Shopify orders. A 3PL is a third-party logistics warehouse. Its receiving fee when a purchase order arrives is arguably inventory cost. Picking, packing and postage are fulfillment.
- Payment processing and marketplace subscription fees
- Returns processing
Practice varies here. Some brands, and some public companies, report fulfillment and shipping inside cost of sales. That is a presentation choice, not an error. We recommend keeping COGS to product cost. Put channel fees in contribution margin, the profit left after every cost that rises with each order. A unit then has one cost whether it sells on Amazon, Shopify or at a retailer. You can compare channels on the fees they actually charge. The contribution margin guide walks through that layer.
A worked example
Illustrative numbers. One product, one purchase order (PO) of 10,000 units, all bound for FBA.
| Cost line | PO total | Per unit |
|---|---|---|
| Manufacturer unit cost | $24,000 | $2.40 |
| Retail packaging | $3,000 | $0.30 |
| Pre-shipment inspection | $300 | $0.03 |
| Ocean freight and drayage to prep center (allocated share) | $4,500 | $0.45 |
| Duties | $1,500 | $0.15 |
| Customs brokerage and entry | $400 | $0.04 |
| Prep and FNSKU labeling | $1,500 | $0.15 |
| Freight to Amazon fulfillment centers | $1,800 | $0.18 |
| Landed cost | $37,000 | $3.70 |
The supplier invoice says $2.40. The unit actually costs $3.70, 54% more. A margin built on $2.40 is fiction.
If only part of a PO goes to Amazon, put the prep and the freight to the fulfillment center (FC) on those units only. A unit held for Shopify orders would carry $3.37 in this example, and an Amazon unit $3.70.
Now the month. The brand started September with 3,000 units from an older PO landed at $3.10, before a supplier price increase. The new PO arrived mid-month. On September 30 it counted 4,000 units across the prep center, Amazon and in transit. So 9,000 units sold, assuming none were samples, removals or losses.
| FIFO | Weighted average | |
|---|---|---|
| Beginning inventory (3,000 units) | $9,300 | $9,300 |
| Purchases (10,000 units at $3.70) | $37,000 | $37,000 |
| Goods available (13,000 units) | $46,300 | $46,300 |
| Ending inventory (4,000 units) | $14,800 | $14,246 |
| COGS for September | $31,500 | $32,054 |
| COGS per unit sold | $3.50 | $3.56 |
FIFO (first in, first out) assumes the older, cheaper units sold first, so the 4,000 left are all at $3.70. Weighted average pools all 13,000 units at one cost: $46,300 ÷ 13,000, about $3.56. Both are allowed under GAAP. The gap here is $554 for the month.
Allocating shared costs across SKUs
Freight, brokerage and inspection are usually billed for a whole shipment, not per SKU (your code for each product version). How you split them changes each SKU’s margin, sometimes by a lot.
Illustrative: a $9,000 container with three SKUs.
| SKU | Units | Cubic feet | Goods value | Freight by units | By volume | By value |
|---|---|---|---|---|---|---|
| A | 10,000 | 500 | $24,000 | $0.45 | $0.45 | $0.27 |
| B | 5,000 | 400 | $30,000 | $0.45 | $0.72 | $0.68 |
| C | 5,000 | 100 | $26,000 | $0.45 | $0.18 | $0.59 |
SKU B’s freight per unit is four times SKU C’s by volume, and identical by units. Splitting by units flatters bulky products and punishes compact ones.
What we recommend:
- Ocean freight by cubic volume, because containers are priced by space.
- Air and parcel freight by weight, or by the weight the carrier actually bills.
- Duties directly to the SKU they were charged on. The customs entry lists duty by tariff line, so most of it needs no splitting. If several SKUs share one line, split that line by each SKU’s value declared at customs.
- Insurance and brokerage by goods value.
Whatever basis you choose, write it down and use it every time.
When a new PO changes your unit cost
Unit cost is not a constant. It changes when the supplier raises prices, a tariff rate changes, freight rates move, or you switch packaging.
How fast it shows up in COGS depends on the method:
- FIFO: the new cost fully reaches COGS only after the older units sell through. In the example, September COGS per unit is $3.50. October will be $3.70 even if nothing changed in October. Expect a step, and expect it to lag the invoice.
- Weighted average: the new cost blends into the pool as soon as the PO is counted. With a running average, that happens when the goods arrive. With a monthly average, it happens at month end. In the example September averages about $3.56. The 4,000 units carried into October stay at that cost. The average moves toward $3.70 only as later POs at the new price are blended in.
Either way, record the landed cost of each PO with the date it was received. That date is the effective date of the new cost.
Bundles and multipacks
A 3-pack’s COGS is three times the unit’s landed cost, plus the costs that exist only because it is a pack.
Illustrative, using the unit before Amazon prep and FC freight ($3.37):
- 3 units × $3.37 = $10.11
- Outer sleeve: $0.40
- Kitting labor to assemble: $0.25
- Prep and label for the pack: $0.15
- Freight to FC, three units’ worth: $0.54
- 3-pack landed cost: $11.45
The common mistake is starting from the fully landed single ($3.70 × 3). That charges FBA prep three times for units that were never labeled as singles.
Where it goes wrong
COGS missing for some SKUs
A new product, a bundle or a variant created in a hurry often has no cost on file. Many reports treat a blank cost as zero. Illustrative: sales for the month are $180,000. SKUs with a cost on file show $30,000 of COGS. One new SKU sold $30,000 and really cost $6,000, but its cost is blank. Overall gross margin reads 83% instead of 80%. Nothing errors. The margin just looks better. Every month, list SKUs with sales and no cost.
A stale unit cost after a price or tariff change
In the example, keeping $3.10 on the books after the new PO landed would put September COGS at $27,900 instead of $31,500. That is $3,600 of cost missing. If September sales were $180,000, that is 2 points of gross margin. The same thing happens when a tariff rate changes and nobody updates the cost file.
Counting FBA fees twice
A brand puts FBA fulfillment fees into a “fully loaded” unit cost. Then a profit report subtracts Amazon’s fees from the settlement, Amazon’s payout statement, again. Every Amazon unit is charged its fees twice. Amazon margin looks worse than Shopify for the wrong reason. Decide once where fees live. If they are in contribution margin, strip them from the cost file.
Samples, giveaways, removals and lost units
The periodic formula treats every unit that left inventory as sold. Some units are sent to creators or given away at events. Others are removed or disposed of by Amazon, damaged in a warehouse or lost in transit. They all fall into COGS, and COGS per unit sold rises for no visible reason. Record them on their own lines. Samples and giveaways usually belong in marketing. Removals, disposals and shrink (stock that goes missing) go on an inventory write-off or shrink line, net of any Amazon reimbursement. Practice varies on whether that line sits inside cost of sales. Either way, keep it out of COGS per unit sold.
Counting only one warehouse
Ending inventory has to include units at Amazon fulfillment centers, at the 3PL, at a prep center and in transit between them. Leave out 2,000 units at Amazon and ending inventory is too low. Then COGS is too high by those units’ full cost.
How to set it up
- List every sellable item, including bundles and multipacks, with what each contains.
- Collect every invoice for each PO: supplier, packaging, freight, the customs entry with duties and brokerage, inspection, prep, and freight to Amazon.
- Allocate shared costs with the basis you chose above, and write the basis down.
- Compute landed cost per unit per PO, dated to when the goods were received.
- Choose FIFO or weighted average with your accountant, and keep it.
- Count inventory in every location at month end, including in transit.
- Pull out non-sale units: samples, giveaways, removals, damage, loss.
- Run the periodic formula and check COGS per unit sold against your landed costs. A big gap means a missing cost, a miscount or unrecorded non-sale units.
- Tie it to the books. Your month-end COGS should match the accounting system, give or take a small agreed amount.
Why the number has to be written down once
When someone asks an AI tool “what was our Amazon margin last month”, the answer is only as good as the unit cost it uses. Say cost lives in a spreadsheet tab, an old export and someone’s memory. You will get a different margin depending on which one the tool found. A stale $3.10 and a current $3.70 produce two confident answers, and neither says which cost it used.
The fix is to record each SKU’s landed cost once, as an approved figure with the date it takes effect. Every margin answer then uses the same number. A new PO adds a new dated cost instead of overwriting the old one. In Synthesis, business facts such as COGS per unit are proposed, approved and attached to the answers that use them. Metrics are not stored as facts. They are computed fresh each time.
Questions people ask
What is the formula for COGS for an Amazon FBA seller?
Beginning inventory plus purchases minus ending inventory, all valued at landed cost. Ending inventory must include units at Amazon fulfillment centers and in transit, not just what sits in your own warehouse.
Are Amazon FBA fees part of COGS?
For most brands, no. FBA fulfillment fees, referral fees and storage fees are charged when a unit sells or sits, not to make or bring in the product. Some sellers do put them in cost of sales, so practice varies. We recommend keeping them in contribution margin so product cost stays comparable across channels.
What is the landed cost formula?
Landed cost per unit equals the supplier unit price plus that unit’s share of the extra costs. Those are packaging, freight to your warehouse, duties and tariffs, customs brokerage, inspection, prep and labeling, and freight to the Amazon fulfillment center. Divide each shared cost by the units it covers. Write down the rule you use to split it.
Should I use FIFO or weighted average cost?
Both are allowed under US GAAP. Weighted average moves more smoothly when supplier prices or tariffs change. FIFO assumes stock sells in the order you bought it. Pick one and use it every month. Ask your accountant before changing it, because changing a method for tax generally needs IRS consent.
How do I calculate COGS for a bundle or multipack?
Add the landed cost of each unit inside it. Then add the costs that belong only to the pack, such as the outer box, the labor to put it together and the pack’s own label. Do not count single-unit prep for units that were never prepped as singles.
Is this tax advice?
No. This covers management and US GAAP conventions. Tax rules on inventory differ in places, including which costs larger businesses must add to inventory value. Confirm your treatment with a CPA (a licensed accountant).