Steph's Books
Services
Industries
Pricing
About
Tools
Contact Us
Get a Quote
Steph's Books

Expert outsourced bookkeeping for professional services firms with $1MM-$10MM revenue.

Stay in the loop

Bookkeeping tips and fraud prevention insights. No spam.

Services

  • Bookkeeping
  • Payroll
  • AR/AP Services
  • Bank Reconciliation
  • Tax Prep
  • Catch-Up Bookkeeping
  • QuickBooks Training

Company

  • Home
  • All Services
  • Industries Served
  • Pricing
  • Meet the Team
  • Blog
  • Contact Us
  • Get Started

Areas Served

ChicagoNapervilleSchaumburgArlington HeightsBarringtonBuffalo GroveVernon HillsLake ZurichWaukeganElginMcHenryWoodstockMarengoLake ForestWaucondaFox LakeLakemoorGreen Oaks

Contact

  • (815) 271-5646
  • steph@stephsbooks.com
  • 4318 W Crystal Lake Rd
    Suite J
    McHenry, IL 60050

Mon – Fri: 9am – 5pm CST

© 2026 Steph's Books. All rights reserved.

Privacy PolicyTerms of ServiceEULA
Back to Blog

COGS and Inventory Accounting for Online Sellers

April 9, 2026

You sold 12,000 units last year at an average price of $28. Your supplier invoices total $96,000, so your COGS is $8.00 per unit and your gross margin is 71%. Except it is not, because you also spent $14,400 on ocean freight, $7,200 on customs duties, $3,600 on FBA prep fees, and $4,800 on inbound shipping to Amazon warehouses. Your actual COGS is $10.50 per unit, your gross margin is 62.5%, and every pricing and purchasing decision you made last year was based on numbers that were wrong by 24%.

This is the most common financial mistake in e-commerce: understating Cost of Goods Sold. Inventory accounting and COGS calculation are the foundation of every profit metric you rely on — gross margin, contribution margin, SKU-level profitability, and ultimately your taxable income. Get COGS wrong, and everything downstream is wrong.

This guide covers the mechanics of inventory accounting for online sellers: what COGS actually includes, how to calculate landed cost, the three inventory valuation methods, when and how to write down inventory, physical counting versus perpetual systems, year-end tax implications, and software setup in QuickBooks Online. For the broader e-commerce bookkeeping framework, see our complete e-commerce seller bookkeeping guide.

What COGS Includes for E-commerce Sellers

COGS (Cost of Goods Sold) represents the direct costs of producing or acquiring the products you sell. For manufacturers, this includes raw materials, direct labor, and factory overhead. For e-commerce resellers — the majority of Amazon, Shopify, and Etsy sellers — COGS includes every cost required to get inventory from the supplier to the point of sale.

The Full COGS Picture

Cost Component Included in COGS? Where Sellers Typically Miss It
Product purchase price Yes Usually tracked correctly
International freight (ocean, air) Yes Often expensed as “Shipping” instead of capitalized
Customs duties & tariffs Yes Often expensed separately or missed entirely
Customs broker fees Yes Small per-shipment cost, often ignored
Domestic freight (port to warehouse) Yes Lumped with outbound shipping
Inspection fees (pre-shipment QC) Yes Classified as “professional services”
FBA prep & labeling Yes Classified as “fulfillment” expense
Inbound shipping to FBA Yes Classified as “shipping” expense
Packaging materials (poly bags, boxes) Yes Classified as “supplies” expense
Insurance on shipments Yes Classified as “insurance” expense

What is NOT included in COGS:

  • Marketplace fees (referral fees, FBA fulfillment fees) — these are selling expenses
  • Advertising costs — these are marketing expenses
  • Outbound shipping to customers — this is a fulfillment expense (some accountants include it in COGS for FBM sellers, but the standard treatment is a separate expense)
  • Storage fees — these are warehouse/occupancy expenses
  • Returns processing costs — these are operational expenses

The IRS standard: Under IRS Publication 334, COGS for merchants includes “the cost of products or raw materials, including freight” and “storage costs” (for goods not yet sold). The key test is whether the cost is directly attributable to getting the product into sellable condition. If it is, it belongs in COGS. If it is a cost of selling or delivering the product, it is an operating expense.

Landed Cost Calculation: A Worked Example

Landed cost is the total cost to acquire one unit of inventory, fully loaded with all costs required to make it available for sale. Here is a detailed worked example for a product sourced from China and sold on Amazon FBA:

Scenario

You purchase 5,000 units of a kitchen gadget from a supplier in Shenzhen, China.

Cost Component Total Cost Per-Unit Cost
Supplier invoice (FOB Shenzhen) $40,000 $8.00
Ocean freight (Shenzhen to LA) $3,200 $0.64
Marine cargo insurance (0.5% of goods value) $200 $0.04
US customs duties (HTS rate: 7.5% of declared value) $3,000 $0.60
Customs broker fee $350 $0.07
Drayage (port to prep center) $800 $0.16
FBA prep (poly bagging + labeling at prep center) $1,500 $0.30
Inbound shipping (prep center to Amazon FBA) $1,250 $0.25
Total Landed Cost $50,300 $10.06

The gap: Your supplier invoice says $8.00/unit. Your actual landed cost is $10.06/unit — a 25.8% difference. On 5,000 units, that is $10,300 in costs that belong in COGS but that many sellers expense as separate line items scattered across their P&L.

Impact on Profitability Metrics

This product sells for $24.99 on Amazon:

Metric Using Supplier Cost Only ($8.00) Using Full Landed Cost ($10.06)
Unit Revenue $24.99 $24.99
COGS $8.00 $10.06
Gross Profit $16.99 $14.93
Gross Margin 68.0% 59.7%
After Amazon Fees (~32%) $8.99 $6.93
After Advertising (~$3.00/unit) $5.99 $3.93
Net Contribution per Unit $5.99 (24.0%) $3.93 (15.7%)

The difference between a 24% and a 15.7% contribution margin is the difference between a product worth scaling and a product that barely breaks even at volume. And the only variable that changed is the accuracy of your COGS.

Inventory Valuation Methods: FIFO, Weighted Average, and Specific Identification

Your inventory valuation method determines how the cost of goods is assigned to units sold (COGS) and units remaining in stock (ending inventory). The method you choose affects your gross margin, your taxable income, and your balance sheet.

FIFO (First In, First Out)

FIFO assumes that the oldest inventory is sold first. The cost of the oldest units in stock is assigned to COGS, and the newest units remain in ending inventory.

Worked example:

Purchase Units Cost Per Unit Total Cost
January (Batch 1) 1,000 $9.50 $9,500
April (Batch 2) 1,000 $10.25 $10,250
July (Batch 3) 1,000 $10.75 $10,750
Total Available 3,000 $30,500

You sell 2,200 units during the year. Under FIFO:

  • COGS: 1,000 units at $9.50 ($9,500) + 1,000 units at $10.25 ($10,250) + 200 units at $10.75 ($2,150) = $21,900
  • Ending inventory: 800 units at $10.75 = $8,600
  • COGS per unit sold: $21,900 / 2,200 = $9.95

When FIFO works best: Rising costs. FIFO assigns older, cheaper costs to COGS, resulting in higher gross margins and higher taxable income. This is the most commonly used method for e-commerce sellers and is the default in QuickBooks Online.

Weighted Average Cost

Weighted average recalculates the cost per unit after each purchase by dividing total inventory cost by total inventory units.

Using the same example:

After January: Average cost = $9,500 / 1,000 = $9.50/unit

After April: Average cost = ($9,500 + $10,250) / 2,000 = $9.875/unit

After July: Average cost = ($9,500 + $10,250 + $10,750) / 3,000 = $10.167/unit

  • COGS: 2,200 units at $10.167 = $22,367
  • Ending inventory: 800 units at $10.167 = $8,133
  • COGS per unit sold: $10.17

When weighted average works best: High-volume sellers with frequent, smaller purchase orders. The averaging smooths out cost spikes and simplifies bookkeeping (no need to track which batch each unit came from). Commonly used with inventory management systems that automatically recalculate average cost on receipt.

Specific Identification

Specific identification tracks the actual cost of each individual unit sold. Used when each unit is unique or high-value (handmade jewelry, custom products, vintage items, refurbished electronics).

When specific identification works best: Etsy sellers with handmade goods, sellers of unique or one-of-a-kind items, or sellers with a small number of high-value SKUs where the per-unit cost varies significantly.

Choosing Your Method

Factor FIFO Weighted Average Specific ID
Best for Most e-commerce sellers High-volume commodity sellers Unique/handmade items
QuickBooks support Native (default) Not native — requires manual tracking Manual or specialized software
Complexity Low Medium High
Tax impact (rising costs) Lower COGS, higher taxable income Middle ground Depends on units sold
IRS compliance Always accepted Accepted if applied consistently Accepted if properly documented

Critical: Once you choose a method, you must apply it consistently. The IRS requires sellers to file Form 3115 (Application for Change in Accounting Method) to switch between FIFO, weighted average, or any other valuation method. This is not a casual decision — consult your CPA before choosing, and do not switch without formal approval.

When to Write Down Inventory

Inventory on your balance sheet must be valued at the lower of cost or net realizable value (NRV). This is called the Lower of Cost or Market (LCM) rule, and it requires you to write down inventory when its value has declined below what you paid for it.

Common Write-Down Triggers for E-commerce

  • Slow-moving inventory — products that have not sold in 6+ months. If market demand has dropped, the inventory is likely worth less than your cost.
  • Damaged inventory — units damaged in your warehouse, in transit, or at Amazon FBA centers.
  • Obsolete inventory — products replaced by a new model, discontinued by the manufacturer, or no longer relevant (seasonal products, trend-based items).
  • Price decline — competitive pressure or market changes have driven the selling price below your landed cost.
  • Amazon-liquidated inventory — if you use Amazon’s FBA Liquidation program, you receive a fraction (typically 5-10%) of the selling price.

How to Calculate Write-Down Amount

Net Realizable Value (NRV) = Expected selling price minus expected costs to sell (fees, shipping, advertising).

If NRV is below your recorded cost, write down the inventory to NRV.

Example: You have 500 units of a product with a landed cost of $12.00/unit ($6,000 total). The product now sells for $14.99, but after Amazon fees (32%) and advertising ($2/unit), your net realization is $8.19/unit.

  • Current inventory value on books: 500 x $12.00 = $6,000
  • NRV: 500 x $8.19 = $4,095
  • Write-down amount: $1,905

Journal entry:

Account Debit Credit
Inventory Write-Down Expense (5600) $1,905
Inventory Asset $1,905

The write-down reduces your inventory asset on the balance sheet and increases your COGS/expenses on the P&L. This hurts current-period profitability but gives you accurate inventory valuation going forward.

Write-Down Timing

Assess inventory for write-down at least quarterly. Many e-commerce sellers do a monthly review of:

  • Aged inventory report — products over 90, 180, and 365 days old
  • Price compression analysis — products where the current selling price (net of fees) is approaching or below landed cost
  • Amazon Inventory Health report — shows aging, sell-through rate, and recommended removals

Physical Inventory Counts vs. Perpetual Systems

Inventory accounting requires knowing how many units you have and what they cost. There are two systems for tracking quantity:

Perpetual Inventory System

A perpetual system updates inventory in real time as purchases are received and sales are made. Every transaction adjusts the inventory count and value.

How it works for e-commerce:

  • Purchase order received → inventory quantity and value increase
  • Customer order shipped → inventory quantity decreases, COGS increases
  • Return received → inventory quantity increases (at original cost or reduced value)

QuickBooks Online uses a perpetual system natively. When integrated with A2X or a Shopify connection, sales automatically reduce inventory and post to COGS. This is the standard approach for e-commerce sellers.

Limitation: The perpetual system is only accurate if every transaction is recorded. Unrecorded adjustments — units lost at Amazon, shrinkage in your warehouse, miscounted returns — cause the system count to drift from physical reality.

Periodic Inventory Count

A periodic count involves physically counting inventory at regular intervals (monthly, quarterly, or annually) and adjusting the books to match the physical count.

The formula:

Beginning Inventory + Purchases – Ending Inventory = COGS

Example: You start the year with $50,000 in inventory, purchase $200,000 in new inventory during the year, and count $62,000 in ending inventory.

COGS = $50,000 + $200,000 – $62,000 = $188,000

When to use: Periodic counting is required as a check on the perpetual system, even if you use perpetual tracking. Annual physical counts are standard. Quarterly cycle counts (counting a portion of inventory each quarter) are better for catching discrepancies early.

The FBA Complication

You cannot physically count inventory at Amazon FBA warehouses. Instead, you rely on Amazon’s Inventory Adjustments and Inventory Event Detail reports to reconcile. Pull these reports monthly and compare to your accounting system:

  • Amazon’s “sellable” quantity should match your QuickBooks inventory on hand for FBA locations
  • Discrepancies (Amazon showing fewer units than your books) require investigation — are the units lost, damaged, in transfer, or misreported?
  • Reimbursement claims should be filed for units Amazon lost or damaged

For sellers with both FBA and warehouse inventory, the reconciliation is:

FBA inventory (Amazon’s report) + Warehouse inventory (physical count) + In-transit inventory (PO receipts not yet received) = Total inventory (should match QuickBooks)

Year-End Inventory Valuation for Taxes

Your December 31 ending inventory value directly impacts your taxable income. Here is the year-end checklist:

Step 1: Physical Count (or Amazon Report Reconciliation)

Conduct a physical count of warehouse inventory on or as close to December 31 as possible. Pull Amazon’s FBA Inventory Report for December 31. Document both.

Step 2: Valuation

Apply your chosen method (FIFO, weighted average, or specific ID) to the ending inventory quantities.

For FIFO: assign the most recent purchase costs to ending inventory units.

For weighted average: use the blended average cost per unit as of December 31.

Step 3: Lower of Cost or Market Test

Compare the calculated cost to net realizable value for any slow-moving, damaged, or declining-value inventory. Write down any inventory where NRV is below cost.

Step 4: Documentation

Maintain documentation for:

  • Physical count sheets or Amazon inventory reports
  • Purchase invoices supporting unit costs
  • Freight, duty, and prep cost allocation calculations
  • Write-down calculations and justifications
  • Valuation method disclosure (must match prior year unless Form 3115 was filed)

Step 5: Tax Impact

Your ending inventory value determines your COGS and therefore your taxable income:

Higher ending inventory → Lower COGS → Higher taxable income

Lower ending inventory → Higher COGS → Lower taxable income

This is why accurate inventory valuation matters for taxes. Overstating ending inventory (by failing to write down slow-moving stock or by understating landed cost) means you pay more taxes than necessary. Understating ending inventory (by including costs that do not belong in COGS) triggers audit risk.

Pro Tip: Complete your year-end inventory count and valuation by January 15. Your CPA needs the ending inventory number to prepare your tax return, and January is when 1099-K forms arrive from Amazon, Shopify, and Etsy. Having your inventory valuation ready allows your CPA to reconcile COGS, revenue, and the 1099-K in a single pass instead of going back and forth.

Setting Up Inventory Tracking in QuickBooks Online

QuickBooks Online (Plus or Advanced tier) has native inventory tracking that works well for e-commerce sellers when configured correctly.

Initial Setup

  1. Enable inventory tracking in Settings > Account and Settings > Sales > Products and Services
  2. Create inventory items for each product (or product variant). Enter the SKU, description, and initial cost (landed cost per unit, not supplier cost)
  3. Set the income account to the appropriate channel-specific revenue account (e.g., 4100 Product Sales — Amazon)
  4. Set the COGS account to your primary COGS account (5100 Product Cost)
  5. Set the asset account to your Inventory Asset account

Recording Inventory Purchases

When you receive a purchase order:

  1. Create a Bill in QuickBooks for the supplier invoice amount
  2. Assign the Bill to the Inventory Asset account for the quantity received
  3. Create additional Bills or Expenses for freight, duties, and prep fees — assigned to the same Inventory Asset account and allocated across the units received

This capitalizes all landed cost components into the inventory value, ensuring COGS reflects the true all-in cost when units are sold.

A2X Integration

When A2X posts a settlement journal entry, it debits COGS and credits Inventory Asset for the cost of units sold during that settlement period. This keeps the perpetual inventory system in sync with actual sales.

Critical configuration: Ensure A2X uses the correct cost basis. If A2X defaults to supplier cost instead of landed cost, your COGS will be understated. Verify by comparing a week of A2X COGS entries to your expected COGS (units sold x landed cost per unit).

Common QBO Inventory Pitfalls

  • Starting quantity at zero cost — if you set up inventory items without entering a cost, QBO records COGS at $0 for all existing stock. Always enter the current landed cost when creating items.
  • Not updating cost when it changes — if your supplier raises prices or freight costs increase, update the cost in QBO when you receive the new batch. FIFO handles the transition automatically.
  • Ignoring negative inventory — QBO allows selling more units than are in stock (negative inventory). This creates COGS errors because QBO assigns $0 cost to units sold below zero. Fix negative inventory immediately by entering purchase receipts for unrecorded stock.

When to Get Professional Help

Inventory accounting and COGS calculation are the most technically demanding areas of e-commerce bookkeeping. The signs you need a specialized bookkeeper:

  • Your gross margin fluctuates more than 5 points month-to-month without clear explanation
  • You do not know your landed cost per unit for your top 10 products
  • Your QuickBooks inventory balance has not been reconciled to a physical count in 6+ months
  • Your CPA has asked questions about your inventory valuation that you cannot answer
  • You are using the supplier cost (not landed cost) as your COGS basis

Need accurate inventory accounting? We set up and manage COGS tracking, landed cost allocation, and inventory reconciliation for Amazon, Shopify, and multi-channel sellers. Get an instant quote or visit our bookkeeping services page to learn more.

Related Reading

  • E-commerce & Marketplace Seller Bookkeeping Guide (pillar)
  • Amazon FBA Bookkeeping: Fees, Inventory & Sales Tax
  • Multi-Channel Seller Reconciliation: Amazon + Shopify + Etsy
  • E-commerce Sales Tax Compliance: A State-by-State Guide

Need help with your bookkeeping?

Get a free quote and see how Steph's Books can save you 40-60% vs hiring in-house.

Get a Free QuoteCall (815) 271-5646