What Is Cost of Goods Sold (COGS)?
Cost of Goods Sold, commonly abbreviated as COGS, represents the direct costs attributable to the production of goods that a company sells during a given period. This includes the cost of raw materials, direct labor, and manufacturing overhead directly tied to the items sold. Understanding how to record COGS correctly is essential for accurate financial reporting and reading your financial statements with confidence.
COGS appears on the income statement directly below revenue and is subtracted from sales to calculate gross profit. For businesses that sell physical products, it is often the single largest expense on the books. Getting the journal entries right ensures your gross margin calculations, tax deductions, and inventory valuations are all reliable.
Quick Answer: The Basic COGS Journal Entry
Under a perpetual inventory system, the standard COGS journal entry is:
Dr. Cost of Goods Sold $XX,XXX
Cr. Inventory $XX,XXX
This entry records the reduction in inventory and the recognition of the cost associated with the goods that were sold. The amount is typically the unit cost multiplied by the number of units sold.
Perpetual vs. Periodic Inventory Systems
The journal entries for COGS differ significantly depending on whether your business uses a perpetual or periodic inventory system. Understanding the distinction is critical before recording any entries.
Perpetual Inventory System
Under the perpetual system, inventory records are updated continuously as sales occur. Each time a sale is made, two journal entries are recorded simultaneously:
Entry 1 — Record the sale:
Dr. Accounts Receivable (or Cash) $XX,XXX
Cr. Sales Revenue $XX,XXX
Entry 2 — Record COGS:
Dr. Cost of Goods Sold $XX,XXX
Cr. Inventory $XX,XXX
This real-time approach gives you an up-to-date view of inventory balances at any point. For more on tracking inventory in your books, see our guide on journal entries for inventory.
Periodic Inventory System
Under the periodic system, COGS is not recorded at the point of sale. Instead, the cost of goods sold is calculated at the end of the period using the formula:
COGS = Beginning Inventory + Purchases − Ending Inventory
During the period, purchases are recorded to a Purchases account:
Dr. Purchases $XX,XXX
Cr. Accounts Payable (or Cash) $XX,XXX
At period end, a closing entry adjusts inventory and calculates COGS:
Dr. Cost of Goods Sold $XX,XXX
Dr. Inventory (ending balance) $XX,XXX
Cr. Inventory (beginning balance) $XX,XXX
Cr. Purchases $XX,XXX
This entry zeros out the Purchases account, updates Inventory to its ending balance, and captures the full COGS amount for the period. For related period-end procedures, review our journal entries for closing entries.
COGS with Different Cost Flow Assumptions
The amount recorded for COGS depends on which cost flow assumption your business uses. The three primary methods are FIFO, LIFO, and Weighted Average.
FIFO (First-In, First-Out)
Under FIFO, the earliest inventory purchases are assumed to be sold first. In a period of rising prices, FIFO results in a lower COGS (because older, cheaper costs are recognized) and a higher ending inventory value.
Example: You purchased 100 units at $10 each in January and 100 units at $12 each in March. If you sell 150 units in April, the COGS would be: 100 × $10 + 50 × $12 = $1,600.
LIFO (Last-In, First-Out)
Under LIFO, the most recent inventory purchases are assumed to be sold first. In a period of rising prices, LIFO produces a higher COGS and a lower ending inventory value. Note that LIFO is permitted under US GAAP but prohibited under IFRS.
Using the same example above, LIFO COGS would be: 100 × $12 + 50 × $10 = $1,700.
Weighted Average Cost
The weighted average method divides the total cost of goods available for sale by the total units available for sale, producing an average unit cost applied to both COGS and ending inventory.
In our example: ($1,000 + $1,200) ÷ 200 units = $11 per unit. COGS for 150 units = $11 × 150 = $1,650.
Common COGS Adjustments and Corrections
Several situations may require adjustments to your COGS entries beyond the standard sale-to-inventory recording.
Inventory Write-Downs
When inventory declines in value below its cost (due to damage, obsolescence, or market conditions), you must record a write-down to the lower of cost or net realizable value:
Dr. Cost of Goods Sold (or Loss on Inventory) $XX,XXX
Cr. Inventory $XX,XXX
This adjustment is particularly important for businesses with seasonal or perishable inventory. Our article on journal entries for inventory adjustments covers these entries in greater detail.
Purchase Returns and Allowances
If you return goods to a supplier, the purchase reversal reduces both the Purchases account (periodic system) or Inventory (perpetual system) and the amount owed:
Dr. Accounts Payable $XX,XXX
Cr. Inventory (or Purchase Returns) $XX,XXX
Freight-In on Purchases
Shipping costs incurred to bring inventory to your warehouse should be capitalized into the cost of inventory, not expensed immediately:
Dr. Inventory (or Freight-In) $XX,XXX
Cr. Accounts Payable (or Cash) $XX,XXX
Under a periodic system, Freight-In is part of the cost of goods available for sale and is included in the COGS calculation at period end.
COGS for Service-Based Businesses
Service businesses do not typically have inventory, but they may still have direct costs that function similarly to COGS. These include direct labor for service delivery, subcontractor fees, and materials consumed in providing the service. While the journal entry mechanics differ (no inventory account is involved), these costs are still recorded as reductions against service revenue to determine gross margin:
Dr. Cost of Services Rendered $XX,XXX
Cr. Wages Payable (or Cash) $XX,XXX
For related entries involving employee compensation, see our guide on journal entries for payroll.
Real-World Example: Retail Business
Let us walk through a complete month for a small retailer using the perpetual inventory system with FIFO cost flow.
March 1: Beginning inventory: 200 units at $25 each ($5,000).
March 5: Purchased 300 units at $27 each.
Dr. Inventory $8,100
Cr. Accounts Payable $8,100
March 15: Sold 350 units at $45 each ($15,750 revenue). COGS: 200 × $25 + 150 × $27 = $9,050.
Dr. Accounts Receivable $15,750
Cr. Sales Revenue $15,750
Dr. Cost of Goods Sold $9,050
Cr. Inventory $9,050
March 31: Ending inventory: 150 units at $27 each = $4,050. Gross profit = $15,750 − $9,050 = $6,700 (42.5% margin).
Tax Implications of COGS
COGS is a deductible expense that directly reduces taxable income for businesses that produce or resell goods. Accurate COGS calculation is essential because overstatement reduces your tax deduction, while understatement can trigger IRS scrutiny and penalties. The IRS requires businesses with inventory to use the accrual method for sales and purchases of inventory items, and the COGS deduction appears on Part III of Schedule C (for sole proprietors) or the appropriate corporate return.
For a broader understanding of tax-related accounting, see our article on how to calculate income tax expense.
Key Takeaways
- COGS represents the direct cost of goods sold and is the largest expense for most product-based businesses.
- Under a perpetual system, record COGS at the point of sale by debiting COGS and crediting Inventory.
- Under a periodic system, COGS is calculated at period end using the beginning inventory, purchases, and ending inventory formula.
- The cost flow assumption (FIFO, LIFO, or Weighted Average) directly impacts the COGS amount recorded.
- Inventory write-downs, purchase returns, and freight-in all require COGS adjustments.
- Accurate COGS entries are critical for gross margin reporting, financial statement integrity, and tax compliance.