Ecommerce Cost of Goods Sold in 2026: COGS for Online Stores and Dropshipping

Illustration of product boxes, a cargo container, delivery truck, price tag and calculator representing ecommerce cost of goods sold and landed cost

Cost of goods sold is the number that tells you if your online store actually makes money. Not revenue. Not ROAS. COGS. If it’s wrong, your gross margin is wrong, your pricing decisions are wrong and your ad budget is built on a guess.

This guide breaks down ecommerce cost of goods sold for Shopify stores, Amazon sellers, inventory brands and dropshippers. You’ll learn what goes into COGS, how landed cost works, which inventory methods exist, and how the IRS frames the calculation. I’ll walk through hypothetical worked examples so you can see the math.

I’m Trevor Fenner. I’ve been selling online since 2005, and I built and ran high-ticket dropshipping stores before selling a multi-store portfolio in 2022. These days I build and scale stores for clients through Ecommerce Paradise. Product cost has always been the first thing I check when a store’s numbers feel off.

This is general education, not tax, legal or accounting advice. COGS treatment depends on your entity, your accounting method and your inventory setup, so review the decisions here with a qualified accountant. You can read how we approach accuracy in our editorial standards.

Some links on this page are affiliate links. If you sign up through them I may earn a commission at no extra cost to you. Read the affiliate disclosure.

Ecommerce COGS at a glance

QuestionShort answer
What is COGS?The direct cost of the products you sold in a period
Basic formulaBeginning inventory + purchases + other inventory costs, minus ending inventory
Usually includedProduct cost, inbound freight, duties, some packaging and fulfillment costs (confirm with your accountant)
Usually not includedAds, apps, software, payment processing fees, general overhead
DropshippingSupplier cost per order plus drop fees, recorded when the order ships
IRS referencesPublication 334, Schedule C Part III, Form 1125-A, Publication 538

What cost of goods sold means for an online store

COGS is the cost of the products you actually sold during a period. If you bought 100 units this month but sold 60, only the cost of those 60 hits COGS this month. The other 40 sit on your balance sheet as inventory until they sell.

Revenue minus COGS gives you gross profit. Gross profit divided by revenue gives you gross margin. That margin has to cover ads, apps, staff, fees and your own pay. If it’s thin, no amount of extra traffic fixes the business.

Why ecommerce sellers get it wrong

Most COGS mistakes I see come from 3 places. People expense inventory purchases the day they pay for them. People forget inbound freight and duties. And dropshippers record supplier invoices in random months that don’t match the sale. Each one distorts margin month to month.

The COGS formula, the IRS way

The IRS Publication 334 tax guide for small business has a section called How To Figure Cost of Goods Sold. For sole proprietors, it walks through Schedule C lines 35 through 42.

  • Line 35: inventory at beginning of year
  • Line 36: purchases less cost of items withdrawn for personal use
  • Line 37: cost of labor
  • Line 38: materials and supplies
  • Line 39: other costs, which the publication says include items like containers, freight-in and overhead expenses
  • Line 40: add lines 35 through 39
  • Line 41: inventory at end of year
  • Line 42: cost of goods sold

Publication 334 also covers trade discounts, cash discounts and purchase returns and allowances under purchases. Read the current edition, since line numbers and rules can change, and check with your accountant on how each item applies to you.

Corporations and partnerships

If your store is a corporation or partnership, the forms are different. The IRS explains that Form 1125-A is used to report cost of goods sold by filers of Form 1120, 1120-S, 1065 and certain other returns when they claim a COGS deduction. Your tax preparer handles the form, but your books need to supply the numbers.

What goes into ecommerce COGS

Here is a practical breakdown. Treat it as a starting point for the conversation with your accountant, because some items depend on your method and your business.

Usually included

  • Product cost from your supplier or manufacturer, net of trade discounts
  • Inbound freight to get inventory to your warehouse or 3PL
  • Import duties, tariffs and customs brokerage on inventory
  • Packaging that becomes part of the product sold, if your accountant agrees
  • For dropshipping, the supplier cost and drop-ship fees for each order

Sometimes included

  • Outbound shipping to customers. Some sellers include it in COGS, others treat it as an operating expense. Pick one with your accountant and stay consistent.
  • Fulfillment and 3PL pick and pack fees
  • Inventory write-offs for damaged or lost stock

Usually not included

  • Advertising on Google, Meta and other platforms
  • Shopify plan, apps and software
  • Payment processing and marketplace fees
  • Contractors, office costs and general overhead not tied to inventory

Payment fees deserve a quick note. Shopify’s help article on getting paid with Shopify Payments explains how fees and refunds affect your payouts. Those fees are real costs, but most setups track them as operating expenses rather than product cost. My sample ecommerce chart of accounts shows one way to separate them.

Landed cost: the true cost of a product

Landed cost is the total cost to get one unit into your hands and ready to sell. It’s the supplier price plus everything it took to bring that product to you. For imported products, landed cost can be much higher than the factory price.

Hypothetical landed cost example

Say you import 500 units of a product. These numbers are hypothetical, just to show the math.

Cost itemTotalPer unit
Supplier invoice (500 units at $20)$10,000$20.00
Ocean freight and port fees$1,500$3.00
Import duties$1,000$2.00
Customs broker$250$0.50
Domestic freight to your 3PL$500$1.00
Landed cost$13,250$26.50

If you price based on the $20 supplier cost, you think each unit has $6.50 more margin than it really does. Across 500 units, that’s $3,250 of profit that never existed. This is the most common pricing mistake I see with brands that import.

How to allocate landed costs

When one shipment holds several products, you need a way to split freight and duties across them. Common approaches split by unit count, weight, volume or product value. Duties are often tied to the specific product’s tariff classification, so they may need item-level allocation. Pick a method with your accountant and apply it the same way every time.

Get Landed Cost and COGS Tracked for You

Finaloop calculates landed cost automatically and tracks COGS per SKU and channel, based on its pricing page. Starter is listed at $245 per month for brands up to $1M in revenue (pricing checked November 2026).

See Finaloop’s Inventory Tracking →

Inventory methods: FIFO, LIFO and specific identification

When you buy the same product at different prices over time, you need a rule for which cost goes to COGS when a unit sells. That’s your inventory cost method.

The IRS’s Publication 538 on accounting periods and methods describes how to identify cost. It says you can use specific identification when you can match actual costs to items, and FIFO or LIFO when items can’t be specifically identified. FIFO assumes the first items you bought are the first sold. LIFO assumes the last items bought are the first sold.

Hypothetical FIFO vs LIFO example

Hypothetical example. You buy the same product in 2 batches.

  • Batch 1: 100 units at $30 each
  • Batch 2: 100 units at $36 each
  • You sell 120 units this month

Under FIFO, COGS is 100 units at $30 plus 20 units at $36, which is $3,720. Ending inventory is 80 units at $36, or $2,880.

Under LIFO, COGS is 100 units at $36 plus 20 units at $30, which is $4,200. Ending inventory is 80 units at $30, or $2,400.

Same sales, same purchases, a $480 difference in COGS for the month. Publication 538 notes that when prices are rising, LIFO produces a higher cost of goods sold and lower closing inventory than FIFO. LIFO has extra tax rules, so don’t switch methods without your accountant.

Weighted average cost

Many inventory and accounting apps also offer weighted average cost. Using the same hypothetical batches, the average cost is $33 per unit, so 120 units sold would give $3,960 in COGS. Ask your accountant whether the method your software uses is acceptable for your tax reporting, and whether book and tax methods need to match.

Valuing inventory

Publication 538 also lists methods for valuing inventory, including cost and lower of cost or market. Under lower of cost or market, each item is compared individually, not the inventory as a whole. Your accountant will decide which valuation method fits, especially if you hold slow-moving or obsolete stock.

Small business inventory rules

Publication 538 says that if you must keep inventory, you generally need to use the accrual method for purchases and sales. But it also describes an exception for small business taxpayers that meet a gross receipts test, which the January 2022 revision lists as $26 million or less in average annual gross receipts, indexed for inflation.

Qualifying small businesses can choose not to keep an inventory in the traditional sense. Publication 538 describes options like treating inventory as non-incidental materials and supplies, or following the method in an applicable financial statement or the business’s books and records. The threshold has been adjusted for inflation since, so confirm the current number and the right choice for you with your accountant.

The SBA’s guide to managing your business finances gives a plain-English overview of cash and accrual methods if you want a simpler starting point before that conversation.

Even if you qualify, I’d still track inventory and COGS in your books for management purposes. You can’t make good pricing or ad decisions without knowing true product cost.

COGS for dropshipping stores

Dropshipping simplifies COGS because you don’t hold inventory. Your supplier ships direct to your customer and invoices you for the product, plus any drop fee and sometimes shipping.

Hypothetical dropshipping example

Here is a hypothetical high-ticket order to show the math.

Line itemAmount
Sale price charged to customer$2,400
Supplier cost (dealer price)$1,680
Supplier drop fee$25
Freight charged by supplier$95
COGS for this order$1,800
Gross profit$600
Gross margin25%

From there, payment fees and the ad cost to win the order come out of that $600. On a high-ticket store, that’s where you find out whether an order made money or quietly lost it.

Match supplier bills to the right month

The biggest dropshipping COGS problem is timing. A sale lands in March, but the supplier invoice arrives in April. If you record the bill when it shows up, March looks amazing and April looks terrible. Match the supplier cost to the order and the period where the sale is recorded, following the method your accountant approves.

My Order Processing P&L

For every store I’ve run, I keep an Order Processing P&L sheet. Each row is one order with the sale price, supplier cost, shipping, merchant fees, ad cost and profit. I’ve used it for my own stores and I give it to my clients.

It isn’t a replacement for real bookkeeping. But it catches missing supplier bills and odd freight charges the same week, instead of months later. At month-end, the total supplier cost on the sheet should line up with COGS in the books.

Tracking COGS in your bookkeeping software

How you track COGS depends on your volume and model. Pricing below was checked November 2026, so confirm current plans on each vendor’s site.

ToolHow it helps with COGSBest for
FinaloopAutomated landed cost, COGS per SKU and channel, purchase ordersInventory brands that want ecommerce books handled
QuickBooks OnlineInventory tracking on certain plans, COGS accounts, reportsStores working with a US accountant
XeroInventory items and COGS accountsSellers wanting a clean interface
A2XCan post COGS with payout entries if you set up product costsShopify and Amazon sellers on QuickBooks or Xero

All-in-one ecommerce bookkeeping

Finaloop is the ecommerce bookkeeping option I point store owners to most often, and COGS is a big reason why. Based on its pricing page, its inventory module covers real-time stock per warehouse, purchase orders, automated landed cost and COGS per SKU and channel. Finaloop’s ecommerce accounting fits brands that don’t want to build this themselves. I cover it in depth in my Finaloop review.

Ledger plus connector

If you use a standard ledger, A2X can record COGS alongside each payout when you load product costs, which saves manual journal entries each month. Its Shopify and Amazon plans start at $29 per month based on A2X’s pricing page. Check its docs for current COGS setup steps. QuickBooks Online is widely used by US accountants, and some of its plans include inventory tracking.

For the full software rundown, see my guide to ecommerce bookkeeping software. Shopify sellers can also read the Shopify QuickBooks integration guide.

Month-end COGS checklist

Add these to your monthly close. The full routine lives in my monthly bookkeeping checklist.

  1. Record all inventory purchases and supplier invoices for the month.
  2. Add inbound freight, duties and broker fees to inventory cost.
  3. Update landed cost per unit for new shipments.
  4. Record COGS for units sold using your approved method.
  5. Match dropship supplier bills to the orders they belong to.
  6. Record damaged, lost or written-off stock.
  7. Compare gross margin to last month and investigate big swings.

At year end, add a physical count or a reconciliation with your 3PL’s inventory report. The ending inventory number drives COGS on your tax return, so it needs to be right.

Put COGS on Autopilot for Your Store

A2X can post cost of goods sold with each Shopify or Amazon payout when you load product costs, so your margin is visible every month. Plans start at $29 per month (pricing checked November 2026).

Try A2X for COGS →

Common COGS mistakes

  • Expensing all inventory purchases when paid instead of when sold.
  • Leaving out inbound freight and duties.
  • Using the supplier’s list price instead of the actual invoice price.
  • Recording dropship supplier bills in the wrong month.
  • Putting ad spend or app fees into COGS.
  • Skipping the year-end inventory count.
  • Switching inventory methods without talking to an accountant.

Each one makes your margin look better or worse than it really is. Fixing them is usually a one-time setup job plus a consistent monthly habit. My ecommerce bookkeeping guide covers how COGS fits into the bigger picture.

Ecommerce COGS FAQ

What is included in COGS for an ecommerce business?

Typically the product cost from your supplier plus costs to get inventory to you, like inbound freight and duties. Some businesses also include packaging, fulfillment and outbound shipping. Ads, software and payment fees are usually operating expenses. Confirm the treatment with your accountant.

How do dropshippers calculate COGS?

Add the supplier cost, drop fees and any supplier-charged freight for each order. Record it in the same period as the sale. Since you don’t hold inventory, there’s usually no beginning or ending inventory to track.

Is shipping part of cost of goods sold?

Inbound freight on inventory is listed as an other cost in the IRS Publication 334 COGS section. Outbound shipping to customers is handled differently by different businesses. Ask your accountant and be consistent.

Which inventory method should I use?

Publication 538 describes specific identification, FIFO and LIFO for identifying cost. FIFO is common for online stores, and many apps offer weighted average. Your accountant should choose based on your tax situation and records.

Do I need Form 1125-A?

Form 1125-A is for corporations and partnerships that file Form 1120, 1120-S, 1065 and certain other returns and claim a COGS deduction. Sole proprietors usually report COGS in Part III of Schedule C instead. Your tax preparer will confirm.

Know your true product cost

If you take one thing from this guide, make it this. Know your landed cost per unit, record COGS in the period you sell, and keep ads and fees out of product cost. Those 3 habits make your gross margin trustworthy.

Then review it every month. When margin moves, find out why. A freight spike, a supplier price increase or a pile of returns all show up there first. Get a qualified accountant to sign off on your method, and let your books do the rest.

Related guides

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top