Cost of Goods Sold (COGS)

Cost of goods sold (COGS) is the direct cost of producing the goods or services sold during a period — materials, direct labor, and direct overhead. Gross profit = Revenue minus COGS. COGS does not include operating expenses like rent, marketing, or management salaries.

COGS is the first deduction from revenue on the income statement, yielding gross profit. For product businesses: COGS = Beginning Inventory + Purchases During the Period - Ending Inventory. For service businesses: COGS = direct labor and materials consumed in delivering the service. For software/SaaS: COGS = hosting costs, payment processing, customer support directly tied to service delivery. The distinction between COGS and operating expenses (OPEX) matters both for financial analysis and tax strategy. COGS is deducted against revenue in the period the goods are sold (matching principle). OPEX is deducted as incurred. If inventory is sitting unsold, the cost stays in inventory on the balance sheet — not yet recognized as COGS. Gross margin (gross profit / revenue) is derived directly from COGS. Businesses with high gross margins have low COGS relative to revenue — software, consulting, branded consumer goods. Businesses with low gross margins have high COGS — grocery, commodity distribution, contract manufacturing. Lenders and investors look at gross margin trends: is the business maintaining pricing power, or are input costs rising faster than selling prices? The IRS defines COGS calculation rules for product businesses in Publication 334 (https://www.irs.gov/publications/p334), including inventory valuation methods (FIFO, LIFO, specific identification). The IRS requires businesses to use a consistent inventory method — changes require IRS approval.

Examples

Frequently asked questions

What is the difference between COGS and operating expenses?

COGS = direct costs of producing what you sell (materials, direct labor, direct production overhead). OPEX = costs of running the business that aren't directly tied to production (rent, marketing, executive salaries, accounting, insurance). COGS is subtracted first to get gross profit; OPEX is subtracted from gross profit to get operating income (EBIT).

Does a service business have COGS?

Yes, though it may be called 'cost of services' or 'cost of revenue.' For a staffing company, COGS = the wages paid to placed workers. For a law firm, COGS = paralegal time and direct expenses billed to matters. For a plumber, COGS = parts and journeyman labor. The principle is the same: direct costs of delivering the revenue-generating service.

How does inventory accounting method (FIFO vs. LIFO) affect COGS?

FIFO (first in, first out): oldest inventory costs flow through COGS first. In rising-price environments, FIFO produces lower COGS (older, cheaper costs), higher gross profit, higher taxes. LIFO (last in, first out): newest inventory costs flow through COGS first. In rising prices, LIFO produces higher COGS, lower gross profit, lower taxes. LIFO is allowed under US GAAP but not IFRS. For most small businesses, the method choice is an accounting and tax decision.

Related terms

Further reading