Skip to content
o3 Order3
Menu

Glossary

What is cost of goods sold (COGS)?

Cost of goods sold (COGS) is the direct cost of the inventory a business sold during a period, calculated from beginning inventory plus purchases minus ending inventory.

Definition

COGS is where inventory meets the income statement. It captures what the goods you actually sold cost you: the purchase price of resold products, or materials plus direct production costs for goods you make. Revenue minus COGS is gross profit, which makes COGS the denominator of every margin conversation. The standard calculation works backward from counts: start with the period's beginning inventory value, add purchases, subtract what's left at the end. Whatever is gone is presumed sold. That presumption is the catch. The formula can't tell a sale from theft, damage, or a miscount, so sloppy inventory records flow straight into COGS and distort gross margin. An ending inventory overstated by $20,000 understates COGS by $20,000 and reports phantom profit your bank balance will eventually contradict. The costing method matters too. FIFO, LIFO, and weighted average each assign different costs to the units sold when purchase prices change over time, which is why the same physical year can produce different taxable incomes. For operators, the practical takeaway: accurate counts and clean receiving records aren't just floor hygiene, they're what makes the gross margin number on the P&L mean anything.

Formula

COGS = Beginning Inventory + Purchases - Ending Inventory

Example

A parts distributor starts the quarter with $200,000 of inventory, purchases $350,000, and ends with $180,000. COGS = 200,000 + 350,000 - 180,000 = $370,000 against $520,000 of revenue, a 28.8% gross margin.

By Cameron Priest · Co-founder, Order3

Cameron co-founded TradeGecko, the inventory platform acquired by Intuit. He has spent more than a decade building software for the people who run physical stock.

Updated 2026-06-16