Skip to main content
True MarginTrue Margin
What Is Cost of Goods Sold (COGS)?
← Back to blog

What Is Cost of Goods Sold (COGS)?

By Jack·March 12, 2026·10 min read

Cost of goods sold (COGS) is the total direct cost of producing or acquiring the products your business sells. It includes the raw materials, manufacturing labor, inbound freight, customs duties, and packaging that go into every unit — but not advertising, rent, or any other overhead. COGS is the single most important number for understanding whether your product is actually profitable, because it determines your gross margin before any other expense is considered.

If you sell a candle for $35 and the wax, wick, jar, fragrance, label, and inbound shipping cost you $9 per unit, your COGS is $9. Your gross profit on that candle is $26. Everything else — ads, Shopify fees, outbound shipping — comes out of that $26.

This guide breaks down exactly what COGS includes for ecommerce, the formula, a worked calculation, how it differs from operating expenses, how it varies by business model, why it matters for pricing, and how to reduce it. If you already know your COGS and want to see how it affects your margins, plug your numbers into our free profit margin calculator.

What's Included in COGS for Ecommerce

The line between COGS and other expenses is simple in theory: if the cost is directly tied to producing or acquiring the product, it's COGS. If you'd still pay the cost even with zero sales, it's not COGS. In practice, founders miss costs constantly. Here's the full breakdown.

Costs That Are COGS

  • Product cost — the wholesale price, raw materials, or per-unit manufacturing cost from your supplier
  • Inbound shipping and freight — sea freight, air freight, or trucking from the supplier or factory to your warehouse
  • Customs duties and tariffs — import taxes you pay to bring product into your country
  • Packaging materials — boxes, poly mailers, inserts, labels, tissue paper, branded stickers
  • Manufacturing labor — direct labor costs if you produce the product yourself
  • Quality inspection fees — third-party inspection at the factory, prorated across the order
  • Pick and pack fees — if your 3PL charges per unit to pick and pack (most accountants include this)

Costs That Are NOT COGS

  • Advertising — Facebook Ads, Google Ads, TikTok Ads, influencer fees (selling expenses)
  • Outbound shipping — delivery from you or your 3PL to the customer (fulfillment expense)
  • Platform fees — Shopify subscription, Amazon referral fees, marketplace commissions
  • Payment processing — Stripe or Shopify Payments transaction fees
  • Software and tools — Klaviyo, helpdesk, analytics (overhead)
  • Rent, salaries, insurance — general and administrative overhead
  • Returns and refunds — these reduce revenue, they don't increase COGS

The key distinction: COGS represents the cost baked into the product itself. If you removed the cost and couldn't produce or acquire the product, it's COGS. Everything else is an operating expense. For a deeper dive into what goes into a complete ecommerce profit and loss statement, see our full guide.

The COGS Formula

The standard COGS formula used by accountants and the IRS is:

COGS = Beginning Inventory + Purchases During the Period − Ending Inventory

This formula captures the cost of products that actually left your warehouse as fulfilled orders. You start with what you had, add what you bought, and subtract what's left. The difference is what you sold.

It's important to understand that COGS is not a cash flow number. You may have paid for inventory months ago. COGS captures when the product was sold, not when you paid for it. This matters for accurate profit margin calculations.

How to Calculate COGS (Worked Example)

Say you run a private label skincare brand. Here's a worked example for the month of January.

ComponentAmountWhat It Represents
Beginning inventory (Jan 1)$18,000Value of unsold product at start of month (landed cost basis)
+ Purchases during January$32,000New inventory received — includes product cost, freight, duties, packaging
− Ending inventory (Jan 31)$15,000Value of unsold product at end of month
= COGS for January$35,000Direct cost of all products sold in January

If your January revenue was $85,000, your gross profit is $85,000 − $35,000 = $50,000, and your gross margin is 58.8%. That tells you how much you keep from every dollar of revenue before paying for ads, shipping, fees, and everything else.

Notice the "Purchases" line includes the full landed cost — not just the supplier invoice. If you paid $24,000 to your manufacturer, $4,500 for sea freight, $2,000 for customs duties, and $1,500 for packaging materials, the total purchase value is $32,000. For a step-by-step walkthrough of this calculation across different business models, see our guide on how to calculate COGS for ecommerce.

Want to see how COGS affects your margins?

Use True Margin's free profit margin calculator to model your real margins.

Open Profit Margin Calculator →

COGS vs Operating Expenses

This is one of the most common points of confusion. COGS and operating expenses are both costs, but they sit in different parts of your income statement and tell you different things about your business.

CategoryCOGSOperating Expenses
DefinitionDirect costs tied to producing/acquiring the productCosts of running the business that aren't tied to specific units
ExamplesRaw materials, manufacturing, inbound freight, duties, packagingAds, salaries, rent, software, outbound shipping, platform fees
Scales with?Units sold — more sales = higher COGSMix of fixed and variable — some scale, some don't
DeterminesGross profit and gross marginNet profit and net margin (when combined with COGS)
If too high?Product sourcing or manufacturing problemOperational efficiency or marketing efficiency problem
Tax treatmentDeducted from revenue to calculate gross profitDeducted from gross profit to calculate taxable income

Why this distinction matters: if you lump everything into one "cost" bucket, you can't diagnose problems. A business with 70% gross margin and 5% net margin doesn't have a sourcing problem — it has a spending problem. A business with 35% gross margin and 5% net margin has a sourcing problem. COGS tells you which one you are. For more on the difference between gross and net margin, read our guide on what counts as a good profit margin in ecommerce.

COGS by Business Model

What counts as COGS — and how you calculate it — depends entirely on how you source and fulfill. Here's how the three most common ecommerce models handle COGS.

Dropshipping

Dropshipping has the simplest COGS calculation because you never hold inventory. Your COGS is whatever your supplier charges per unit (including their shipping to the customer), multiplied by units sold. No beginning or ending inventory math.

If your AliExpress supplier charges $11 per unit including ePacket delivery and you sold 300 units this month, your COGS is $3,300. Typical COGS percentage for dropshipping runs 30-50% of revenue, depending on the product category and how much you mark up.

The trap with dropshipping: some suppliers quote product price separately from shipping. A $7 product with a $4 shipping fee means your COGS is $11, not $7. If you only track the product price, you're undercounting COGS by 36% on every unit.

Private Label

Private label COGS has more layers because you import in bulk and hold inventory. Your COGS per unit includes the factory cost, packaging, inbound freight (prorated per unit), customs duties, and any inspection fees. The formula with beginning and ending inventory applies here because you carry stock.

Typical COGS for private label runs 25-40% of revenue. The main advantage over dropshipping: buying in bulk drives down per-unit costs, and you control the product quality and branding.

Digital Products

Digital products (courses, templates, software, ebooks) have near-zero COGS because there's no physical product to produce or ship. COGS might include hosting costs for a course platform, payment to a freelancer who created the content, or licensing fees for software components — but per-unit marginal cost is effectively zero.

This is why digital products have the highest gross margins in ecommerce (often 80-95%). There's no inventory, no freight, no duties, no packaging. The product costs the same to deliver whether you sell 10 copies or 10,000.

Why COGS Matters for Pricing

COGS is the floor for your pricing. If you don't know your true COGS — meaning the full landed cost, not just the supplier invoice — you can't set prices that leave enough margin for advertising, fulfillment, and profit.

The standard pricing approach for DTC brands: multiply your full landed COGS by 3x to 5x.

  • 3x COGS = ~67% gross margin. Works if you rely mostly on organic traffic and have low customer acquisition costs.
  • 4x COGS = ~75% gross margin. The sweet spot for most brands running paid ads on Meta or Google.
  • 5x COGS = ~80% gross margin. Necessary for products with high return rates or expensive acquisition channels.

A product with a true landed COGS of $12 should sell for $36-60 depending on your channel. If the market won't support that price, you either need a cheaper supplier or you need to accept that the product can't be scaled profitably with paid ads.

Most founders get pricing wrong because they base the multiplier on the supplier invoice ($8) instead of the landed cost ($12). A 4x markup on $8 is $32. A 4x markup on $12 is $48. That $16 difference is the gap between a profitable SKU and one that bleeds money at scale. For a complete framework on setting the right price, see our guide on how to price your product.

How to Reduce COGS

Lowering COGS is the fastest way to improve gross margin because every dollar you save drops directly to profit. Here are the most effective levers.

1. Negotiate Volume Discounts

The single biggest COGS lever. Most suppliers offer tiered pricing: order more units and the per-unit cost drops. A product that costs $10 per unit at 500-unit orders might cost $7.50 at 2,000 units and $6 at 5,000 units. The catch is you need the capital and the demand certainty to justify larger orders.

2. Switch from Air Freight to Sea Freight

Air freight runs $3-8 per unit for products shipped from Asia. Sea freight runs $0.50-2.00 per unit. The trade-off is lead time — sea takes 30-45 days vs 5-10 for air. But if your demand is predictable enough to plan 6-8 weeks ahead, sea freight can cut your inbound shipping cost by 60-80%.

3. Source Closer to Home

Domestic or nearshore manufacturing eliminates customs duties, reduces freight costs, and shortens lead times. The per-unit manufacturing cost may be higher, but the total landed cost can be competitive once you factor in freight, duties, and the working capital tied up in 45-day ocean shipments.

4. Reduce Packaging Costs

Custom rigid boxes with magnetic closures look premium but can cost $2-5 per unit. Switching to a well-designed mailer box or poly mailer can drop packaging costs to $0.30-0.80 per unit without degrading the unboxing experience. Test simpler packaging and measure whether it affects reviews or repeat purchase rates.

5. Consolidate SKUs

More SKUs means more suppliers, more purchase orders, and less volume per SKU — which means worse pricing on each. Cutting your product line from 20 SKUs to 10 can double your order volume per SKU and unlock the next pricing tier with your supplier.

6. Audit Tariff Classifications

Products are taxed based on their Harmonized System (HS) code. The wrong HS code can mean paying a higher duty rate than you owe. A customs broker or trade compliance specialist can review your classifications and potentially reclassify products into a lower-duty category.

Frequently Asked Questions

What does COGS stand for?

COGS stands for Cost of Goods Sold. It represents the total direct costs a business incurs to produce or acquire the products it sells during a specific period. This includes raw materials, manufacturing labor, inbound freight, customs duties, and packaging — but not advertising, rent, or other overhead.

Is shipping included in COGS?

Inbound shipping (from your supplier or factory to your warehouse) is included in COGS because it's a direct cost of getting the product ready to sell. Outbound shipping (from you to the customer) is not included — it's classified as a selling or fulfillment expense.

What is the difference between COGS and operating expenses?

COGS covers the direct costs tied to the product — materials, manufacturing, inbound freight, duties, and packaging. Operating expenses cover everything else: advertising, salaries, software, rent, outbound shipping, and payment processing. Revenue minus COGS gives you gross profit. Revenue minus COGS minus operating expenses gives you net profit.

How do you calculate COGS for a small ecommerce business?

Use the formula: COGS = Beginning Inventory + Purchases During the Period − Ending Inventory. If you don't hold inventory (e.g., dropshipping or print-on-demand), COGS is simply your supplier's per-unit cost multiplied by units sold, plus any inbound shipping or duties paid per unit. Use our profit margin calculator to see how your COGS affects your bottom line.

Does COGS affect taxes?

Yes. COGS is deducted from revenue to calculate gross profit, and you pay income tax on profit — not revenue. Every dollar you accurately capture in COGS reduces your taxable income by one dollar. Undercounting COGS means overstating profit and paying more tax than you owe. Keep receipts for every COGS component: supplier invoices, freight bills, customs entry documents, and packaging invoices.

Stop guessing. Start calculating.

True Margin gives ecommerce founders the tools to make data-driven decisions.

Try True Margin Free