How to Record Cost of Goods Sold: Perpetual and Periodic Entries

To record cost of goods sold, debit the Cost of Goods Sold account and credit the Inventory account for the cost of the items sold. That single entry moves the cost of what you sold off the balance sheet and onto the income statement. When you make it and how you calculate the amount depends on whether you run a perpetual or periodic inventory system, but the debit-and-credit logic is the same either way.

Get the Number Before You Post the Entry

You can’t record COGS without a figure to record. The formula is:

Beginning Inventory + Purchases + Direct Costs − Ending Inventory = Cost of Goods Sold

Beginning inventory is the dollar value of unsold goods carried in from the prior period, and it should match the ending inventory reported on last year’s tax return.1Internal Revenue Service. Publication 538 (01/2022), Accounting Periods and Methods Purchases and direct costs cover everything spent to acquire or produce inventory during the period: purchase invoices, freight-in, raw materials, and direct labor. Ending inventory comes from a physical count or a perpetual tracking report.

A quick example. A business opens the year with $50,000 in inventory, spends $200,000 on new stock and direct production costs, and counts $40,000 of unsold goods at year-end. COGS is $210,000. That $210,000 hits the income statement; the $40,000 remains on the balance sheet as an asset.

Direct labor belongs in COGS only for employees whose work is physically tied to production or preparing goods for sale. Assembly wages go in; the receptionist’s wages do not. Freight-in gets capitalized into inventory because it’s part of making the goods available for sale. Freight-out — shipping finished product to a customer — is a selling expense and stays out of COGS.

One threshold to be aware of before you decide what’s a “direct cost.” Businesses with average annual gross receipts above $32 million (the 2026 inflation-adjusted figure) must apply the Section 263A Uniform Capitalization rules, which pull a share of factory rent, depreciation, utilities, and similar overhead into inventory cost rather than letting you expense them immediately.2IRS. Rev. Proc. 2025-323Office of the Law Revision Counsel. 26 U.S. Code 263A – Capitalization and Inclusion in Inventory Costs of Certain Expenses Businesses under the threshold are generally exempt.

Recording COGS Under a Perpetual System

In a perpetual system, every sale triggers two paired entries at the moment the sale happens. The first captures the revenue side (debit Cash or Accounts Receivable, credit Sales Revenue). The second captures the cost side:

  • Debit Cost of Goods Sold for the cost of the items sold
  • Credit Inventory for the same amount

Sell items that cost $20,000 to acquire, and you debit COGS $20,000 and credit Inventory $20,000 the same day. The inventory account reflects what’s actually on hand at all times, and COGS accumulates through the period as sales happen. Most modern accounting software works this way by default once items and their costs are entered correctly.

Recording COGS Under a Periodic System

A periodic system doesn’t touch inventory with each sale. Purchases collect in a Purchases account through the period, and you calculate COGS with an adjusting entry after a physical count at period-end. Three entries do the work:

  • Debit COGS, credit Inventory to close out the beginning inventory balance.
  • Debit COGS, credit Purchases to move the period’s buying activity into COGS.
  • Debit Inventory, credit COGS to place the counted unsold goods back on the balance sheet.

When those entries post, the COGS account equals beginning inventory plus purchases minus ending inventory. Less day-to-day bookkeeping, but no visibility into inventory levels between counts.

Adjustments That Change the Amount You Record

Real inventory rarely moves cleanly from purchase to sale, and a few common adjustments feed directly into the COGS entry.

Purchase Returns and Allowances

When you send defective goods back to a supplier or negotiate a price reduction on goods you keep, debit Accounts Payable and credit Purchase Returns and Allowances under a periodic system, or credit Inventory directly under a perpetual system. Either way, the cost basis of your inventory drops, and COGS drops with it.

Shrinkage

If your physical count comes in below what your records predict, the shortfall is shrinkage — theft, damage, spoilage, or miscounts. Debit Shrinkage Expense (or COGS) and credit Inventory for the difference so the books match reality. If shrinkage is material, recording it in its own account gives management a clear view of what’s being lost outside of normal sales.

Verify Before You Close the Books

After posting, compare the inventory account balance to your physical count or perpetual system totals. A mismatch means something is off: miscounted stock, unrecorded purchases, theft, or a data-entry error. Track it down before closing. COGS errors flow straight into net income and into your tax liability, and accuracy-related penalties can apply when inventory discrepancies produce an understatement of taxable income, particularly if the IRS treats the errors as negligent rather than honest.4Internal Revenue Service. Accuracy-Related Penalty

Keep the backup on hand: prior-year ending inventory (which becomes this year’s beginning inventory), purchase orders and invoices including freight-in charges, direct-labor payroll records, and the physical count sheets or perpetual reports that produced ending inventory. Warehouse logs and shipping receipts round out the paper trail if the IRS examines the return.

Reporting COGS on the Tax Return

The IRS wants the full calculation, not just a total. Corporations, S corporations, and partnerships attach Form 1125-A, which walks through beginning inventory (Line 1), purchases (Line 2), cost of labor (Line 3), additional Section 263A costs if any (Line 4), other costs (Line 5), and ending inventory (Line 7), arriving at COGS on Line 8. The form also asks for your inventory valuation method and whether you use LIFO.5Internal Revenue Service. About Form 1125-A, Cost of Goods Sold Sole proprietors report the same calculation in Part III of Schedule C (Form 1040).6IRS. 2025 Instructions for Schedule C (Form 1040) The breakdown lets the IRS check that inventory values roll forward consistently from year to year and that your chosen valuation method is applied the same way each period.

If you want to change how you calculate inventory or COGS, you generally can’t just switch on next year’s return. The IRS treats it as a change in accounting method, which requires Form 3115. Some changes qualify for automatic consent; others require a formal ruling from the IRS National Office before you can make the switch.7Internal Revenue Service. IRM 4.11.6 Changes in Accounting Methods8Internal Revenue Service. Instructions for Form 3115 (Rev. December 2022)

If You Manufacture Rather Than Resell

Manufacturers add a step before the standard COGS calculation. Cost of Goods Manufactured (COGM) captures the total cost of items completed during the period:

Beginning Work-in-Process + Materials Used + Direct Labor + Factory Overhead − Ending Work-in-Process = Cost of Goods Manufactured

COGM then replaces “Purchases” in the COGS formula. A manufacturer that starts with $200,000 in work-in-process, puts $780,000 of materials into production, incurs $300,000 in direct labor and $150,000 in factory overhead, and ends with $300,000 in work-in-process has COGM of $1,130,000. That figure, not raw purchases, feeds the COGS entry. Partially finished goods on the factory floor aren’t available for sale; treating them as finished stock would overstate COGS now and understate it later when the items actually sell.