Is Cost of Goods Sold a Debit or Credit?

Cost of goods sold, or COGS, is the direct cost of the products your business sells. It includes costs tied to making or buying inventory, such as materials, merchandise, and direct labor.
For bookkeeping, the answer is simple: cost of goods sold is normally a debit. COGS is an expense account, and expense accounts carry a normal debit balance under U.S. Generally Accepted Accounting Principles, or GAAP, the rule set the Financial Accounting Standards Board maintains. Since COGS is an expense, debiting COGS increases the account.
Is cost of goods sold a debit or credit?
Cost of goods sold is always a debit. COGS is an expense account, and expenses carry a normal debit balance under double-entry bookkeeping.
The logic is short:
- Expenses reduce your net income.
- Lower net income reduces owner's equity.
- A decrease in equity is recorded as a debit.
So when your COGS goes up, you debit the account to record the expense. The FASB Conceptual Framework classifies expenses as one of the ten elements of financial statements, which is why every expense on your books follows the same debit rule. Source: FASB Concepts Statements.
When can COGS carry a credit?
COGS is always a debit when you record a sale. A credit to COGS appears only in corrections, adjustments, and write-ups, never in a normal sale.
| Scenario | Why COGS is credited | Example entry |
|---|---|---|
| Customer return | You reverse the expense for the returned item | Debit Inventory, Credit COGS |
| Closing entry correction | You adjust an overstated COGS at period end | Debit COGS, Credit Retained Earnings (if understated) or the reverse |
| Inventory write-up | A previously written-down item recovers value | Debit Inventory, Credit COGS |
These credits correct your books. They do not change the normal debit balance of the account.
What kind of account is cost of goods sold?
Cost of goods sold is an expense account, not an asset or a liability. It records the direct cost of the products you sold to generate revenue.
Because it is an expense, its normal balance is a debit. The balance increases with a debit and decreases with a credit, the opposite of an asset like Inventory.
That classification is why COGS sits on the income statement, not the balance sheet, and why it reduces your profit for the period.
What is the formula for cost of goods sold?
Use one formula: Beginning Inventory + Purchases − Ending Inventory = COGS. It gives the total cost of the products sold in a period.
You need three figures from your records:
Beginning inventory
The value of stock at the start of the period, equal to last period's ending inventory.
Purchases
The cost of all new inventory bought during the period, including raw materials and goods for resale.
Ending inventory
The value of stock left at the end, from a physical count or an inventory system.
The IRS uses this same structure on Schedule C, Part III (Cost of Goods Sold), where sole proprietors report it on Form 1040.
How do you record a COGS journal entry?
Record COGS in three steps: calculate the value, debit COGS, then credit the inventory and purchases accounts for the same amount.
Step 1: Calculate COGS with Beginning Inventory + Purchases − Ending Inventory.
Step 2: Debit the Cost of Goods Sold account. This recognizes the expense and reduces your profit for the period.
Step 3: Credit Inventory (and Purchases) for an equal amount, so your debits and credits match.
Example: a single sale (perpetual inventory). You sell one item that cost $50. You record the expense the moment the sale happens:
| Account | Debit | Credit |
|---|---|---|
| Cost of Goods Sold | $50 | |
| Inventory | $50 |
Example: end of period (periodic inventory). Beginning inventory is $10,000, purchases are $5,000, and ending inventory is $8,000. COGS is ($10,000 + $5,000) − $8,000 = $7,000:
| Account | Debit | Credit |
|---|---|---|
| Cost of Goods Sold | $7,000 | |
| Ending Inventory | $8,000 | |
| Beginning Inventory | $10,000 | |
| Purchases | $5,000 |
This combined entry does three jobs at once: it records the $7,000 expense, establishes Ending Inventory as an $8,000 asset on the balance sheet, and zeroes out the temporary Purchases and Beginning Inventory accounts. The debits ($7,000 + $8,000 = $15,000) equal the credits ($10,000 + $5,000 = $15,000), so your books stay balanced.
How do FIFO and LIFO affect COGS?
FIFO and LIFO are inventory costing methods that change which costs you assign to COGS when prices move during a period. The method you pick directly shifts your COGS, gross profit, and tax bill.
First-In, First-Out, or FIFO, assigns the oldest costs to COGS first. Last-In, First-Out, or LIFO, expenses the most recent costs first. When prices rise, FIFO produces a lower COGS and higher gross profit, while LIFO produces a higher COGS, lower gross profit, and a lower tax bill.
Worked example. Suppose you buy three units of the same product at different prices during the period:
| Purchase | Units | Cost per unit | Total cost |
|---|---|---|---|
| Batch 1 (oldest) | 10 | $10 | $100 |
| Batch 2 | 10 | $12 | $120 |
| Batch 3 (newest) | 10 | $15 | $150 |
You sell 15 units. Under FIFO, COGS uses the oldest costs first: 10 units at $10 plus 5 units at $12, for a COGS of $160. Under LIFO, COGS uses the newest costs first: 10 units at $15 plus 5 units at $12, for a COGS of $210. The $50 difference flows straight to your gross profit and taxable income.
LIFO is allowed under U.S. GAAP but is prohibited under International Financial Reporting Standards, or IFRS. Source: IAS 2 Inventories. If you sell internationally or plan to attract foreign investors, FIFO or weighted-average cost keeps your books compatible with both frameworks.
How does COGS affect your financial statements?
COGS affects three statements. It sets gross profit on the income statement, reduces inventory on the balance sheet, and shows up as an inventory change on the cash flow statement.
On the income statement, COGS is subtracted from revenue to find gross profit. The formula is Revenue − COGS = Gross Profit. Gross profit minus operating expenses leaves net income, so an overstated COGS shrinks every profit line below it.
On the balance sheet, the credit to Inventory lowers the value of that current asset, so your books show the stock you actually hold at period end.
On the cash flow statement, an increase in inventory during the period appears as a use of cash in the operating section under the indirect method. When you buy more inventory than you sell, cash leaves the business even though COGS and net income may look stable. A decrease in inventory adds cash back. This is why a profitable business can still face a cash squeeze if inventory grows faster than sales.
An accurate COGS keeps all three statements honest. Overstate it and gross profit looks too low; understate it and profit looks inflated.
What mistakes should you avoid with COGS?
Six errors distort COGS most often. Each one changes your gross profit, your tax bill, or both.
Including indirect costs
COGS covers only direct costs like raw materials and direct labor. Marketing, admin salaries, and rent are operating expenses and belong in a separate line, as the IRS Tax Guide for Small Business (Publication 334) explains. Mixing them in inflates COGS and understates your operating expenses, which misleads anyone reading your income statement.
Ignoring shrinkage and spoilage
Inventory that is lost, stolen, damaged, or expired still leaves your stock. If you skip that adjustment, ending inventory looks too high, COGS looks too low, and gross profit looks inflated. Count inventory regularly and adjust before you finalize COGS.
Misclassifying freight-in
Freight-in, the cost to ship inventory to your warehouse or store, is part of COGS because it is a direct cost of getting goods ready for sale. Freight-out, the cost to ship products to your customers, is an operating expense. Treating freight-out as COGS overstates your cost and understates operating expenses.
Ignoring manufacturing overhead
If you manufacture products, indirect production costs like factory utilities, equipment depreciation, and production supervisor wages belong in COGS, not in operating expenses. Skipping overhead allocation understates COGS and overstates gross profit on the products you make.
Switching valuation methods mid-year
FIFO, LIFO, and weighted-average cost are each acceptable, but you must apply the same method consistently. Switching mid-year to chase a lower tax bill violates the consistency principle and can trigger IRS scrutiny. If you need to change methods, file Form 3115 to request approval.
Timing errors between count and cutoff
If you count inventory on December 31 but record goods received on January 2 as December purchases, your ending inventory is understated and COGS is overstated. Match the count date to your cutoff so purchases, sales, and inventory all reflect the same moment.
How do you keep your COGS accurate?
Keep COGS accurate with three habits: count inventory on a schedule, reconcile accounts before you close the period, and keep clean, current sales records.
Cycle counting by SKU velocity. Count your fastest-moving items monthly, mid-velocity items quarterly, and slow movers annually. This catches shrinkage before it distorts your numbers without shutting down for a full physical count.
Reconciliation checklist. Before you finalize COGS each period, confirm that beginning inventory matches last period's ending inventory, purchases tie to your accounts payable, ending inventory matches your physical count, and COGS equals Beginning Inventory + Purchases − Ending Inventory. If any line does not reconcile, find the gap before you close the books.
Variance thresholds. If your physical count differs from your book inventory by more than 2%, investigate before adjusting. A variance that large usually signals shrinkage, theft, or a recording error, not normal waste.
Reliable sales data. Your COGS is only as accurate as the sales data behind it. JIM's AI Business Agent gives you real-time sales analytics and reports inside the JIM app, so the revenue figures feeding your gross profit stay accurate while you focus on selling.
Frequently Asked Questions
Can cost of goods sold ever be a credit?
What is the difference between cost of goods sold and operating expenses?
How do FIFO and LIFO affect COGS?
Is cost of goods sold on the income statement?
What happens if COGS is calculated incorrectly?
Table of contents
Sell and get paid in seconds with Jim










