How to Calculate COGS: Complete Guide | COGS Calculation Formula
Seller Bookkeeping

How to Calculate COGS: Complete Guide

COGS Calculation Formula - Learn the cost of goods sold calculation formula and master inventory accounting

What is COGS and Why It Matters

Cost of Goods Sold (COGS) is the direct cost of products you sell during an accounting period. It includes product costs, inbound shipping, packaging, and tariffs—but NOT advertising, rent, or salaries. Understanding your COGS is essential for calculating profit margins, setting competitive prices, and accurately reporting income for taxes.

Key Point: Many online sellers forget to include inbound shipping, tariffs, and packaging in COGS, underestimating true costs by 20-40%. This leads to underpricing products and lower profits than expected.

The COGS Formula

COGS = Beginning Inventory + Purchases − Ending Inventory

Formula Breakdown

  • Beginning Inventory: Value of unsold inventory at period start
  • Purchases: Total cost of inventory acquired during period (including shipping, tariffs, packaging)
  • Ending Inventory: Value of unsold inventory at period end

What to Include in COGS

  • Product unit cost from supplier
  • Inbound shipping (freight to warehouse)
  • Import tariffs and duties
  • Packaging materials (boxes, tissue, fillers)
  • Product labeling and prep services
  • Direct labor (if manufacturing products)

What NOT to Include

  • Advertising and marketing costs
  • Rent and utilities
  • Salaries (unless direct production)
  • Office supplies and software
  • Customer shipping and fulfillment
  • Platform fees (Amazon, Shopify, etc.)

Real Example: Calculating COGS

ComponentAmount
Beginning Inventory (Jan 1)$50,000
Product Purchases$120,000
Inbound Shipping$15,000
Import Tariffs$8,000
Packaging Materials$12,000
Labeling Services$3,000
Total Purchases$158,000
Ending Inventory (Jan 31)$45,000
COGS for January$163,000

Calculation: $50,000 + $158,000 − $45,000 = $163,000

Inventory Valuation Methods

  • FIFO (First-In, First-Out): Oldest inventory sells first. Lower COGS in rising-price environments
  • LIFO (Last-In, First-Out): Newest inventory sells first. Higher COGS in rising-price environments
  • Weighted Average: Calculate average cost of all inventory. Simplest and most common for online sellers
  • Specific Identification: Track actual cost of specific units. Best for high-value items

Per-Unit COGS Calculation

For profitability analysis, calculate COGS per individual unit:

COGS Per Unit = Landed Cost Per Unit
= (Product Cost + Inbound Shipping + Tariffs + Packaging + Labeling) ÷ Units Received

Example: 1,000 units purchased: $8/unit ($8,000) + $1,000 shipping + $500 tariffs + $1,000 packaging = $10,500 total. Cost per unit = $10.50.

Common COGS Mistakes

  • Using FOB price instead of landed cost (missing 15-35% of true cost)
  • Forgetting inbound freight and tariffs (can add 20-30% to COGS)
  • Including operating expenses like advertising in COGS
  • Not tracking inventory accurately at period end
  • Changing inventory valuation methods mid-year

Calculate Your COGS

Use our free COGS calculator to instantly calculate your cost of goods sold or download our complete COGS guide for more detailed information.

COGS Calculation Facts

20-40%

Typical COGS underestimation by sellers

15-30%

Inbound shipping as % of product cost

3-7

Years to maintain COGS records for audits

1

Inventory valuation method per fiscal year

100%

COGS deductible as business expense

4

Inventory valuation methods available

Common COGS Questions

What's the difference between COGS and cost of sales?

COGS is the direct cost of products (materials, shipping to warehouse). Cost of sales includes COGS plus platform fees and fulfillment. For accounting/taxes, use COGS. For profitability analysis, include all-in costs.

Should I include advertising in COGS?

No. Advertising is an operating expense, separate from COGS. COGS only includes direct product costs. Allocate advertising spend separately when calculating product profitability.

Is inbound shipping part of COGS?

Yes! Inbound shipping (freight to your warehouse) is part of landed cost and must be included in COGS. This is the most common mistake sellers make, forgetting 15-30% of their true costs.

How often should I calculate COGS?

Calculate monthly for financial statements and profitability tracking. Calculate annually for tax returns. Monthly calculations help you catch pricing issues and optimize profitability faster.

What inventory method should I use?

Most online sellers use weighted average (simplest). Use FIFO in rising-price environments (lower COGS). Choose one method and stick with it all year. Changing methods mid-year creates accounting problems.

Do I include packaging in COGS?

Yes. Packaging materials (boxes, tissue, fillers, labels) used to package products for sale are COGS. Calculate per-unit: total packaging cost ÷ units packaged. Even $0.50/unit adds up quickly.

How do I account for tariffs in COGS?

Include import tariffs and duties in landed cost. Allocate total tariffs: total duties ÷ units = tariff per unit. Example: $2,000 tariff ÷ 1,000 units = $2/unit in tariff cost. Essential for imported products.