Cost of Goods Sold (COGS): Formula, Calculation, and Examples
Cost of Goods Sold (COGS) represents the direct costs of producing or purchasing the goods that a company sold during a specific period. It includes raw materials, direct labor, and manufacturing overhead directly tied to production.
COGS = Beginning Inventory + Purchases (or Cost of Goods Manufactured) − Ending Inventory
Definition
Cost of Goods Sold (COGS) represents the direct costs of producing or purchasing the goods that a company sold during a specific period. It includes raw materials, direct labor, and manufacturing overhead directly tied to production.
How It Works
COGS is calculated differently depending on the type of business. For merchandisers (companies that buy and resell goods): COGS = Beginning Inventory + Net Purchases − Ending Inventory. Net Purchases means total purchases minus purchase returns, allowances, and discounts. For manufacturers: COGS = Beginning Finished Goods + Cost of Goods Manufactured − Ending Finished Goods, where Cost of Goods Manufactured includes raw materials used, direct labor, and applied manufacturing overhead. COGS appears near the top of the income statement and is subtracted from net sales revenue to arrive at gross profit — the single most important profitability metric for product-based businesses. The inventory costing method chosen (FIFO, LIFO, or weighted average) directly affects the COGS amount, reported gross profit, net income, and income tax. Under a periodic system, COGS is calculated at period-end using the formula above. Under a perpetual system, COGS is recorded in real-time with each sale. Freight-in (shipping costs to receive inventory) is included in COGS, while freight-out (shipping to customers) is a selling expense.
Formula
COGS = Beginning Inventory + Purchases (or Cost of Goods Manufactured) − Ending Inventory
Example
A retail company starts the year with $50,000 in inventory, purchases $200,000 of additional goods during the year, and ends with $60,000 in inventory. COGS = $50,000 + $200,000 − $60,000 = $190,000. If revenue was $300,000, gross profit = $300,000 − $190,000 = $110,000.
Common Misconceptions
- ✗COGS includes all expenses — it only includes costs directly tied to producing or purchasing inventory. Selling expenses, administrative costs, and interest are NOT part of COGS.
- ✗COGS and expenses are the same thing — COGS is a specific category of expense related to inventory. Operating expenses (rent, salaries, marketing) are reported separately below gross profit.
- ✗FIFO and LIFO give the same COGS — they produce different COGS amounts when prices change. In times of rising prices, FIFO produces lower COGS (higher profit) and LIFO produces higher COGS (lower profit).
Related Resources
FAQs
Common questions about Cost of Goods Sold (COGS)
COGS includes only costs directly associated with producing or purchasing the products sold (materials, direct labor, manufacturing overhead). Operating expenses include selling, general, and administrative costs (rent, marketing, office salaries). COGS is subtracted from revenue to get gross profit; operating expenses are subtracted from gross profit to get operating income.
When prices rise: FIFO assigns older, cheaper costs to COGS (lower COGS, higher profit). LIFO assigns newer, higher costs to COGS (higher COGS, lower profit). Weighted average falls between the two. The choice doesn't affect cash flow but significantly affects reported profitability and taxes.
Service companies typically don't have COGS because they don't sell physical products. However, they may report 'Cost of Services' or 'Cost of Revenue,' which includes direct labor and materials used to deliver services.
Freight-in (shipping costs to receive inventory from suppliers) is part of COGS — it's a cost of getting goods ready for sale. Freight-out (shipping costs to deliver products to customers) is a selling expense, not COGS. This distinction matters because it affects gross profit calculation.
Gross Profit Margin = (Revenue − COGS) / Revenue. If revenue is $500,000 and COGS is $300,000, gross margin is 40%. Higher COGS means lower margins. Companies improve margins by negotiating better supplier prices, reducing waste, or improving manufacturing efficiency — all of which reduce COGS.