What Is Cost of Goods Sold (COGS)? Calculation, Components, and Example
Cost of Goods Sold
Definition
The direct cost of products sold, including product cost and sometimes freight, packaging, or landed cost depending on accounting method.
Overview
Cost of Goods Sold The direct costs attributable to the products a business sells. In ecommerce accounting this measure captures the out‑the‑door product cost that is matched against revenue to calculate gross profit.
COGS sits on the income statement directly beneath sales and is the single most important determinant of gross margin. For merchants the line typically includes supplier purchase price plus costs necessary to get items ready for sale — think inbound freight, customs duties, and manufacturing components when applicable. Properly measuring COGS requires consistent inventory accounting and clear rules for which costs are directly attributable to products versus which are operating expenses.
How COGS Is Calculated
The most common formula used on financial statements is:
Beginning Inventory + Purchases + Direct Costs − Ending Inventory = Cost of Goods Sold
Where "Purchases" includes purchase price of goods plus inbound charges you treat as product costs. "Direct Costs" can include shipping-to-warehouse, import duties, and production labor when you manufacture. Ending inventory is counted using an inventory valuation method (FIFO, LIFO, or weighted average) and determines the portion of product cost carried forward to the next period.
What The Line Typically Covers
- Purchase Price: The supplier invoice cost per unit (net of trade discounts).
- Inbound Freight: Transportation to your warehouse when you capitalize freight as product cost.
- Import Duties And Fees: Customs, tariffs, and clearance costs directly tied to acquiring goods.
- Direct Manufacturing Costs: Raw materials and direct labor for produced items.
- Packaging For Sale: Primary packaging needed to sell the product (not retail boxes for shipping).
How Inventory Methods Affect COGS
Inventory valuation method changes reported COGS and therefore gross profit. Common methods are:
- FIFO: First goods purchased are assumed sold first; in inflationary periods FIFO usually lowers COGS and raises gross margin.
- LIFO: Last goods purchased are assumed sold first; can increase COGS during inflation and reduce taxable income (allowed under U.S. tax rules for many businesses, though not under IFRS).
- Weighted Average: Smooths cost across units; common for high‑volume, low‑value SKUs.
Why COGS Matters
COGS directly determines gross profit and gross margin percentage — two metrics buyers, lenders, and marketplaces monitor closely. For pricing, a business must cover COGS plus operating expenses and target profit. For taxes, the IRS requires accurate COGS reporting because overstated COGS reduces taxable income and understated COGS inflates it.
Practical Example
Assume a seller begins the month with $10,000 inventory, purchases $25,000 of goods, and incurs $1,500 in inbound freight capitalized to inventory. At month end a physical count values ending inventory at $8,000. COGS = 10,000 + 25,000 + 1,500 − 8,000 = $28,500. If revenue for the period is $60,000, gross profit = 60,000 − 28,500 = $31,500 and gross margin = 52.5%.
Tips For Ecommerce Merchants
- Track Landed Cost At SKU Level: Include supplier price, freight, duties, and packing to avoid underestimating COGS.
- Choose Inventory Method Early: Consistency matters for comparability and tax compliance.
- Use WMS/WMS Integrations: Automate receipts and inventory valuation to reduce errors that misstate COGS.
- Account For Returns: Establish a returns accounting policy that adjusts COGS and inventory correctly when items reenter stock or are written off.
In short, the Cost of Goods Sold measures the direct cost of products sold and is the foundation of gross margin analysis. Accurate COGS requires clear inventory valuation, consistent capitalization of direct costs, and SKU‑level landed cost controls so pricing, profitability, and tax filings reflect real product economics.
Sources And Additional Reading (3)
- Cost of Goods Sold
“Cost of Goods Sold.” Internal Revenue Service, https://www.irs.gov/businesses/small-businesses-self-employed/cost-of-goods-sold.
- Cost Of Goods Sold (COGS) Definition
“Cost Of Goods Sold (COGS) Definition.” Investopedia, https://www.investopedia.com/terms/c/cogs.asp.
- Cost Of Goods Sold — Explanation
“Cost Of Goods Sold — Explanation.” AccountingCoach, https://www.accountingcoach.com/cost-of-goods-sold/explanation.
More from this term
Looking for a 3PL?
Compare warehouses on Racklify and find the right logistics partner for your business.