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

Learn how cost of goods sold works in double-entry books: the journal entry with examples, the rare cases you credit COGS, and how FIFO or LIFO shift profit.
Entrepreneurship

Sep 30, 2026

Main topics
See article summary
  • Cost of goods sold is a debit. It's an expense account, so debits increase it and credits decrease it.
  • Every sale debits COGS and credits Inventory. Credits to COGS only reverse returns, fix errors, or close the year.
  • Formula: beginning inventory plus purchases, minus ending inventory. The IRS uses the same math on Schedule C, lines 35 to 42.
  • When prices rise, FIFO gives lower COGS and higher profit. LIFO does the opposite and requires IRS Form 970.
  • Keep marketing, office rent, freight-out, and card fees out of COGS, and count inventory on a schedule to catch shrinkage.

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 typeNormal balanceExample
AssetDebitCash, Inventory
LiabilityCreditAccounts payable
Owner's equityCreditOwner's capital
RevenueCreditSales
ExpenseDebitCost 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.

SituationEntryWhy
A customer returns an item to stockDebit Inventory, credit COGSThe product is back on your shelf, so the expense reverses
You recorded too much COGSDebit Inventory, credit COGSThe correction brings COGS down to the right amount
Year-end closing entryDebit Income Summary, credit COGSClosing 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.

Beginning inventory
The value of stock on hand on day one of the period. It equals last period's ending inventory.
Purchases
What you paid for merchandise or raw materials during the period, after trade discounts, plus freight-in.
Ending inventory
The value of stock left on the last day, taken from a physical count.
Cost of goods sold
Beginning inventory plus purchases, minus ending inventory.

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:

LineAmount
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.

COGS calculation: $37,845 beginning inventory plus $283,250 purchases minus $32,955 ending inventory equals $288,140

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.

CostWhere it goesWhy
Merchandise bought for resaleCOGSDirect cost of the product
Raw materials and partsCOGSThey become the product
Freight-inCOGSShipping to you is part of the product's cost
Containers that are part of the productCOGSThe jar in a salsa business is part of what you sell
Direct labor and factory overheadCOGSFor manufacturers, production costs belong to the product
Shipping to customersOperating expenseA selling cost that comes after the sale
Marketing, office rent, admin payOperating expenseThey run the business, not the product
Card processing feesOperating expenseA 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:

AccountDebitCredit
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:

AccountDebitCredit
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:

MethodCOGSGross profitEnding inventory
FIFO (oldest costs first)$160$215$210
Weighted average ($12.33 per unit)$185$190$185
LIFO (newest costs first)$210$165$160
Bar charts comparing FIFO, weighted average, and LIFO: COGS of $160, $185, $210 and gross profit of $215, $190, $165

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.

StatementWhere COGS shows upWhat an error does
Income statementRevenue minus COGS equals gross profitToo much COGS hides profit, too little inflates it
Balance sheetThe credit to Inventory lowers the assetWrong COGS means a wrong inventory value
Cash flow statementInventory change in operating activitiesGrowing 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.

MistakeWhat goes wrongFix
Adding marketing or office rentCOGS too high, gross profit too lowKeep them in operating expenses
Skipping shrinkage and spoilageEnding inventory too high, COGS too lowCount stock and adjust the books to match
Treating shipping to customers as COGSCOGS too highOnly freight-in goes to COGS
Ignoring stock you take for personal usePurchases and COGS too highSubtract its cost from purchases and charge your drawing account
Switching methods mid-yearPeriods stop being comparableStay consistent, and file Form 3115 to change
Counting on a different day than your cutoffPurchases and stock from different datesCount 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.

Cycle counts
Count fast sellers monthly, mid sellers quarterly, and slow movers once a year. You catch shrinkage without closing the shop for a full count.
Reconciliation
Beginning inventory matches last period's ending inventory, purchases tie to supplier invoices, and ending inventory matches your count.
Variance tolerance
Set a 2% tolerance. If your count and your books differ by more than that, find the cause before you adjust.
Stock log
Record stock in and out with the free inventory spreadsheet template, which works with FIFO, LIFO, or average cost.

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.

Frequently Asked Questions

Can cost of goods sold be a credit?

Yes, but only to reverse or close the account: a customer return that goes back to stock, a fix for an overstated amount, or the year-end closing entry. A normal sale always debits COGS.

Is cost of goods sold an asset?

No. COGS is an expense on the income statement. Inventory is the asset, and its cost moves into COGS when you sell the product.

What is the journal entry for cost of goods sold?

Debit Cost of Goods Sold and credit Inventory for what the products cost you. Record the sale in a separate entry: debit Cash or Accounts Receivable and credit Sales Revenue.

Do service businesses have cost of goods sold?

Usually not. The IRS says you don't have to figure COGS when selling merchandise isn't an income-producing factor, so most service businesses figure gross profit straight from net receipts.

Is cost of goods sold the same as operating expenses?

No. COGS covers the direct cost of the products you sold, such as merchandise, materials, and freight-in. Operating expenses like marketing, office rent, and card processing fees come out after gross profit.

Where do you report cost of goods sold on your taxes?

Sole proprietors and single-member LLCs figure it in Part III of Schedule C (Form 1040), lines 35 through 42. The total carries to line 4 and lowers your gross profit.

Related content

Man polishing the hood of a car in a driveway, with his mobile detailing van open behind him
Ready to Grow

Small Business Ideas: 30 Low-Cost Ideas to Start Now

Young farmer arranging rainbow chard and heirloom tomatoes at her farmers market stall
Ready to Grow

How to Become a Vendor at a Farmers Market in 7 Steps

Young street food vendor handing tacos to a customer from his sidewalk food cart
Ready to Grow

Street Vendor License: What You Need and How to Apply

Young vendor wrapping a handmade ceramic mug for a customer at her holiday market stall on Small Business Saturday
Ready to Grow

Small Business Saturday 2026: A Prep Checklist for Solo Sellers

Sell and get paid in seconds with Jim

Get Jim
This is a plain white button background with no text or meaningful visual content. Screen readers should skip it; the button’s label carries the meaning.
Barista in green apron holds pink and mango smoothies in clear cups with strawsLaughing fast-food worker holds phone showing $42.00 contactless payment to customer at drive-thruWoman in yellow sweatshirt dispenses frozen yogurt at topping bar in sunlit shopWoman in orange work shirt unloads cardboard boxes from white delivery van on sunny streetHairstylist Keisha trims client hair with scissors in busy sunlit salonPizza maker slides pizza into wood-fired brick oven in bright kitchen