CalcWisp

Cost of Goods Sold (COGS)

Also called: COGS, cost of sales, cost of food used

Definition: Cost of goods sold is the direct cost of the products a business sold in a period: beginning inventory plus purchases minus ending inventory, before operating expenses.

Updated November 16, 2026 · How we check facts

Cost of goods sold (COGS) is what a business spent on the merchandise or materials it actually sold during a period. It counts only the goods that left the shelf, not everything bought, which is why it is calculated from inventory counts. Subtracting it from net sales gives gross profit; the SEC's guide to financial statements calls the same line "cost of sales".

Formula

COGS = beginning inventory + purchases − ending inventory
  • Beginning inventory: the cost of goods on hand at the start of the period (the previous period's ending inventory).
  • Purchases: the cost of goods bought for sale during the period. IRS Publication 334 requires the cost of items withdrawn for personal or family use to be excluded.
  • Ending inventory: the cost of goods still on hand at the end of the period.

On Schedule C this is lines 35 to 42: line 40 adds up beginning inventory, purchases and other direct costs, and line 41 (ending inventory) is subtracted to give line 42, cost of goods sold. A manufacturer also includes direct labor, materials and certain overhead.

Example

A restaurant starts the month with $6,200 of food, buys $18,900 and counts $5,400 at month end. Its food COGS is $6,200 + $18,900 − $5,400 = $19,700. On $61,500 of food sales that is a 32.03% food cost and $41,800 of gross profit, as worked through in the food cost percentage formula guide. The food cost calculator and profit calculator use the same subtraction.

Common mistakes

  • Using purchases instead of COGS: a large delivery at period end inflates the cost of that period and flatters the next.
  • Mixing periods: inventory, purchases and sales must cover the same dates.
  • Treating rent, wages or advertising as COGS for a reseller; they are operating expenses, counted below gross profit.

Calculate it

Free toolFood Cost CalculatorFood cost % from inventory and menu prices.Free toolProfit CalculatorProfit, margin and break-even in one place.Free toolMargin CalculatorGross margin from cost and price, or price from margin.

Guides that explain it

Related terms

Sources

  1. IRS — Publication 334 (2025), Tax Guide for Small Business, chapter 6: Cost of Goods Sold
  2. U.S. Securities and Exchange Commission — Beginners' Guide to Financial Statements