Is Cost of Goods Sold a Debit or Credit? (With Examples)

Cost of goods sold is a debit, because COGS is an expense account and expenses grow with debits. Each time you sell a product, you debit COGS for what the item cost you and credit Inventory for the same amount.
The IRS figures COGS with the same math you use in your books: beginning inventory plus purchases, minus ending inventory, on lines 35 to 42 of Schedule C (Form 1040).
Is cost of goods sold a debit or a credit?
Debit COGS every time you sell inventory. The debit records the expense, and the matching credit to Inventory keeps your books balanced.
The rule comes from double-entry bookkeeping. Expenses lower your profit, lower profit lowers owner's equity, and a drop in equity sits on the debit side. That's why COGS, rent, and every other expense carry a normal debit balance, while revenue carries a normal credit balance.
| Account type | Normal balance | Example |
|---|---|---|
| Asset | Debit | Cash, Inventory |
| Liability | Credit | Accounts payable |
| Owner's equity | Credit | Owner's capital |
| Revenue | Credit | Sales |
| Expense | Debit | Cost of goods sold, rent |
Is COGS an asset or an expense?
COGS is an expense, and Inventory is the asset. A product sits on your balance sheet as Inventory while it's on the shelf. The moment you sell it, its cost moves to COGS on the income statement.
When is cost of goods sold credited?
Credit COGS only to reverse or close it, never to record a normal sale.
| Situation | Entry | Why |
|---|---|---|
| A customer returns an item to stock | Debit Inventory, credit COGS | The product is back on your shelf, so the expense reverses |
| You recorded too much COGS | Debit Inventory, credit COGS | The correction brings COGS down to the right amount |
| Year-end closing entry | Debit Income Summary, credit COGS | Closing resets COGS to zero for the new year |
None of these change the normal balance. During the year, a healthy COGS account shows a debit balance. If yours shows a credit, look for a return or a correction you posted twice.
How do you calculate cost of goods sold?
Use one formula: beginning inventory plus purchases, minus ending inventory, equals COGS.
Example: a retail shop's year from the IRS
IRS Publication 334 walks through the COGS of a retail business for the year ended December 31, 2025:
| Line | Amount |
|---|---|
| Beginning inventory | $37,845 |
| Plus purchases | $285,900 |
| Minus items withdrawn for personal use | $2,650 |
| Goods available for sale | $321,095 |
| Minus ending inventory | $32,955 |
| Cost of goods sold | $288,140 |
With $385,060 in net receipts, the shop reports a gross profit of $96,920. That gross profit is the number you compare against your target margin before you set next season's prices.
What costs count as cost of goods sold?
Count only the costs of getting a product ready to sell. Costs that come after the sale, or that keep the business running, are operating expenses.
| Cost | Where it goes | Why |
|---|---|---|
| Merchandise bought for resale | COGS | Direct cost of the product |
| Raw materials and parts | COGS | They become the product |
| Freight-in | COGS | Shipping to you is part of the product's cost |
| Containers that are part of the product | COGS | The jar in a salsa business is part of what you sell |
| Direct labor and factory overhead | COGS | For manufacturers, production costs belong to the product |
| Shipping to customers | Operating expense | A selling cost that comes after the sale |
| Marketing, office rent, admin pay | Operating expense | They run the business, not the product |
| Card processing fees | Operating expense | A cost of collecting payment |
The IRS lists freight-in, containers, direct labor, and production overhead as COGS items in Publication 334. Everything else goes on your expense lines, which is where a clean expense tracking system pays off.
How do you record a COGS journal entry?
Record COGS on the day of each sale if you track inventory in real time, or once at period end if you count stock by hand. The first method is called perpetual inventory, the second periodic inventory.
Perpetual inventory: one entry per sale
Suppose you sell a candle for $80 that cost you $50. You post two entries at checkout:
| Account | Debit | Credit |
|---|---|---|
| Cash | $80 | |
| Sales revenue | $80 | |
| Cost of goods sold | $50 | |
| Inventory | $50 |
Your gross profit on that sale is $30.
Periodic inventory: one entry at period end
Suppose beginning inventory is $10,000, purchases are $5,000, and your count shows $8,000 left. COGS is $10,000 plus $5,000, minus $8,000, or $7,000:
| Account | Debit | Credit |
|---|---|---|
| Cost of goods sold | $7,000 | |
| Inventory (ending count) | $8,000 | |
| Inventory (beginning balance) | $10,000 | |
| Purchases | $5,000 |
Debits total $15,000 and credits total $15,000. The entry records the expense, sets Inventory to the $8,000 you counted, and clears Purchases for the next period. If you sell from a phone or register that tracks stock per sale, use perpetual. If you count by hand once a month, periodic keeps your bookkeeping lighter.
How do FIFO, LIFO, and weighted average change COGS?
Use first-in, first-out, or FIFO, unless your tax preparer has a clear reason for LIFO. FIFO matches how most small shops move stock, works under both U.S. and international rules, and needs no extra IRS form.
When prices rise, the method changes COGS even though you sold the same units. Suppose you bought 30 units in three batches, 10 at $10, 10 at $12, and 10 at $15, then sold 15 units at $25 each, for $375 in sales:
| Method | COGS | Gross profit | Ending inventory |
|---|---|---|---|
| FIFO (oldest costs first) | $160 | $215 | $210 |
| Weighted average ($12.33 per unit) | $185 | $190 | $185 |
| LIFO (newest costs first) | $210 | $165 | $160 |
LIFO cuts gross profit by $50 in this example, and that lower taxable profit is why some businesses pick it. The trade-offs: you must file Form 970 with the tax return for the first year you use LIFO, according to IRS Publication 538, and IAS 2, the international inventory standard, allows only FIFO or weighted average cost. Selling one-of-a-kind items like art or used cars? Use specific identification and match each sale to its actual cost.
How does COGS affect your financial statements?
COGS touches all three statements, so one error spreads everywhere.
| Statement | Where COGS shows up | What an error does |
|---|---|---|
| Income statement | Revenue minus COGS equals gross profit | Too much COGS hides profit, too little inflates it |
| Balance sheet | The credit to Inventory lowers the asset | Wrong COGS means a wrong inventory value |
| Cash flow statement | Inventory change in operating activities | Growing stock uses cash while profit looks fine |
That last row explains how a profitable shop runs short of cash. Buying stock ahead of sales ties money up in Inventory before any of it reaches COGS. Track that gap in a cash flow spreadsheet before a big restock.
What COGS mistakes should you avoid?
Six errors cause most wrong COGS numbers. Check for each one before you close the month.
| Mistake | What goes wrong | Fix |
|---|---|---|
| Adding marketing or office rent | COGS too high, gross profit too low | Keep them in operating expenses |
| Skipping shrinkage and spoilage | Ending inventory too high, COGS too low | Count stock and adjust the books to match |
| Treating shipping to customers as COGS | COGS too high | Only freight-in goes to COGS |
| Ignoring stock you take for personal use | Purchases and COGS too high | Subtract its cost from purchases and charge your drawing account |
| Switching methods mid-year | Periods stop being comparable | Stay consistent, and file Form 3115 to change |
| Counting on a different day than your cutoff | Purchases and stock from different dates | Count on the last day and record receipts by that date |
The IRS requires a physical inventory at reasonable intervals, with the book amount adjusted to match the count, according to Publication 538. Theft and casualty losses flow through COGS the same way, through a lower ending inventory.
Do small businesses have to track inventory for COGS?
Not for taxes, if you qualify as a small business taxpayer. For tax years beginning in 2026, the test is average annual gross receipts of $32 million or less for the 3 prior tax years, according to IRS Revenue Procedure 2025-32, and the business can't be a tax shelter. If you qualify, Publication 334 lets you treat inventory as non-incidental materials and supplies, deducting its cost in the year you hand the product to a customer, or follow the method in your own books.
Keep counting anyway. The exception shortens your tax return, but you still need an accurate COGS to know your gross margin and price your products. Talk to your tax preparer before you change methods.
How do you keep COGS accurate every month?
Count on a schedule, reconcile before you close, and keep your sales records clean.
Gross profit is revenue minus COGS, so you need both numbers from the same period. In the JIM app, ask JIM Agent "Show my statements" to pull every sale for the month next to the COGS you calculated. Each Tap to Pay sale costs a flat 1.99%, a fee that belongs in operating expenses, not in COGS.
Table of contents
Sell and get paid in seconds with Jim








