Accounting
ERP
Inventory Management
COGS Journal Entry: Recording Cost of Goods Sold Under Perpetual and Periodic Inventory

Last updated: October 10, 2026 · Independent guide · We do not sell rankings or coverage.
A COGS journal entry moves the cost of inventory you sold from the balance sheet to the income statement: you debit cost of goods sold and credit inventory. Under a perpetual inventory system, that entry posts every time goods ship, at the cost your costing method assigns. Under a periodic system, you post one entry after the period-end count: beginning inventory plus purchases minus ending inventory. Freight-in, shrinkage and standard cost variances each need their own adjusting entry.
The formula and the journal entries
Both systems rest on the same identity. Cost of goods sold equals beginning inventory plus net purchases minus ending inventory, where net purchases are purchases less purchase returns and purchase discounts (OpenStax, Principles of Financial Accounting, April 11, 2019). Capitalized inbound freight is added to net purchases.
| Account | Debit | Credit | Note |
|---|---|---|---|
| Perpetual system | |||
| Inventory | Supplier cost plus capitalized freight-in | At receipt; credit payables | |
| Cost of goods sold | Cost of units shipped | At shipment, using FIFO, average or standard cost | |
| Inventory | Cost of units shipped | Posted alongside the revenue entry | |
| Inventory shrinkage (COGS sub-account) | Missing units at cost | After a count; credit inventory | |
| Purchase price variance | Actual cost above standard | Actual cost below standard | Standard cost only |
| Periodic system | |||
| Purchases; Freight-in | Supplier cost; inbound freight | During the period | |
| Inventory (ending count) | Counted units at cost | Period-end closing entry | |
| Cost of goods sold | Balancing figure | Shrinkage is buried here | |
| Inventory (beginning); Purchases; Freight-in | Their balances | Clears the temporary accounts | |
Revenue is a separate entry in both systems. Under a periodic system, OpenStax notes that inventory “will remain unchanged until the company counts and verifies its inventory balance.”
A worked example: one month at a distributor
The figures below are an illustration, not real company data. A distributor sells one SKU and uses FIFO. The same month is booked under both systems.
- Beginning inventory: 1,000 units at $20.00, or $20,000.
- Purchase on account: 3,000 units at $22.00, or $66,000.
- Inbound freight on that purchase (FOB shipping point): $3,000, so the landed cost of the new layer is $23.00.
- Sales: 2,800 units at $40.00, or $112,000.
- Month-end count: 1,180 units on the shelf.
Perpetual entries
At receipt, debit inventory $69,000, credit accounts payable $66,000 and accrued freight $3,000. For the month, FIFO cost of the 2,800 units shipped is 1,000 units at $20.00 ($20,000) plus 1,800 units at $23.00 ($41,400), or $61,400. Debit cost of goods sold and credit inventory $61,400.
The perpetual record now shows 1,200 units at $23.00, or $27,600. The count found 1,180 units, so 20 units are missing. Debit inventory shrinkage (a COGS sub-account) and credit inventory $460. Ending inventory is $27,140 and total cost of goods sold is $61,860.
Periodic entries
During the month, debit purchases $66,000 and freight-in $3,000. Nothing posts at shipment. After the count, the 1,180 units are valued at the latest FIFO layer, $23.00, for $27,140. The closing entry is:
| Account | Debit | Credit | Note |
|---|---|---|---|
| Inventory (ending) | $27,140 | 1,180 counted units at $23.00 | |
| Cost of goods sold | $61,860 | $20,000 + $66,000 + $3,000 − $27,140 | |
| Inventory (beginning) | $20,000 | Removes the opening balance | |
| Purchases | $66,000 | Closes the temporary account | |
| Freight-in | $3,000 | Capitalized freight flows through COGS |
Total cost of goods sold is $61,860 under both systems. The perpetual books separate $61,400 of shipped cost from $460 of shrinkage you can investigate. The periodic books show one number.
Adding a standard cost variance
Now assume the distributor carries the item at a standard cost of $23.00 and the supplier actually invoiced $23.40 landed. On receipt of 3,000 units, a standard cost system debits inventory $69,000 at standard, debits purchase price variance $1,200 and credits payables $70,200. If 1,180 of those 3,000 units are still on hand at month end (about 39%), the share of the variance that belongs in inventory is roughly $472 and the rest, $728, belongs in cost of goods sold. The clearing entry is debit inventory $472, debit cost of goods sold $728, credit purchase price variance $1,200. Our guide to standard cost vs actual cost covers production variances.
The rules behind the entries
Book (US GAAP). ASC 330 defines inventory cost as the expenditures incurred in bringing an article to its existing condition and location. PwC’s inventory guide lists freight, duty and broker fees among the merchandise-related costs allocated to inventory, and says that “abnormal costs related to freight, handling, and wasted materials (spoilage) should be included in current period charges” rather than capitalized (PwC, Inventory guide, December 2021). That abnormal-cost rule came from FASB Statement No. 151, effective for fiscal years beginning after June 15, 2005 (Journal of Accountancy, February 1, 2005). Outbound freight to customers is not an inventory cost.
On standard costs, the same PwC guide says standard cost is acceptable provided the standards are adjusted at reasonable intervals, and that variances between actual and standard “must be absorbed” so that reported inventory approximates actual cost.
Tax (IRS). Treasury Regulation 1.471-1 requires inventories at the beginning and end of each tax year “in every case in which the production, purchase, or sale of merchandise is an income-producing factor” (eCFR, 26 CFR 1.471-1, up to date as of October 7, 2026). Code section 471(b) allows estimated shrinkage between counts if you count each location regularly and true up estimates to actual shrinkage (26 U.S.C. 471, Cornell LII, no date shown). Section 471(c) exempts businesses that meet the section 448(c) gross receipts test from the general inventory rules. For tax years beginning in 2026, that test is average annual gross receipts of $32,000,000 or less over the prior three years (IRS, Rev. Proc. 2025-32, section 4.30, no date shown).
Common mistakes
- Expensing freight-in. Booking inbound freight straight to a freight expense account understates inventory and shifts cost into the wrong period. Keep inbound and outbound freight in separate accounts.
- Posting count differences to an operating expense line. Shrinkage is a cost of the goods you stocked. Keep it in a COGS sub-account so gross margin reflects it and the amount is visible for review.
- Shipping before receiving. When a perpetual system ships stock it has not yet received, it estimates cost and corrects it later, which moves COGS between periods. NetSuite, for example, estimates COGS from historical data for out-of-stock sales and posts a COGS adjustment when a later transaction, such as a receipt or vendor bill, brings the item from a negative to a positive balance (Oracle NetSuite Help, System COGS Adjustments, no date shown).
- Running a periodic count with no cutoff. Goods received but not yet invoiced, or shipped but not yet invoiced, distort ending inventory.
How to report cost of goods sold
On the income statement, cost of goods sold sits directly below net revenue, and gross profit is the difference. Capitalized freight-in, shrinkage and cleared variances belong in that line, and your costing method goes in the notes. Marketplace sellers post the same entry beside settlement entries, as our Amazon seller accounting guide shows.
For federal tax, corporations and partnerships that deduct cost of goods sold attach Form 1125-A to Forms 1120, 1120-S, 1065 and related returns (IRS, About Form 1125-A, page last reviewed August 3, 2026). The form is laid out as the periodic formula: line 1 inventory at beginning of year, line 2 purchases, line 3 cost of labor, line 4 additional section 263A costs, line 5 other costs, line 7 inventory at end of year and line 8 cost of goods sold (IRS Form 1125-A, Rev. November 2024).
What to reconcile at month end
- Subledger to general ledger. The inventory valuation report total should equal the inventory control account balance on the same date. Manual entries posted directly to the inventory account are the usual cause of a difference.
- Physical to subledger. Cycle counts or a full count confirm quantities. Our cycle counting software guide covers count frequency.
- Received not invoiced. Review the accrual for receipts without a vendor bill, including freight bills that have not arrived.
- Variance accounts. Clear variances every month, splitting them between inventory and COGS where material.
How we researched this
We read the pages that rank for “COGS journal entry” as of October 10, 2026. All four came from companies selling software or accounting services, and none worked one month under both systems or covered variances and reconciliation together. We checked the rules against IRS and eCFR texts, PwC’s inventory guide and OpenStax, and confirmed software behavior in vendor documentation. The worked example uses constructed figures.
How ERP and accounting systems post COGS automatically
Oracle NetSuite posts cost at fulfillment. Its help center says that when you fulfill an item, “the item cost posts to your ledger,” reducing the inventory asset account and increasing COGS, and lists FIFO, LIFO and average costing, with average as the default (Oracle NetSuite Help, COGS GL Impact, no date shown).
Microsoft Dynamics 365 Business Central only posts COGS with each sale when Automatic Cost Posting is enabled in Inventory Setup. Otherwise you run Adjust Cost – Item Entries and then Post Inventory Cost to G/L, and the Inventory – G/L Reconciliation page shows any difference between the inventory ledger and the general ledger (Microsoft Learn, last updated August 29, 2024).
QuickBooks Online supports FIFO and moving average cost for inventory items and adjusts the inventory asset and cost of sales “whenever sales of inventory items are entered,” defaulting to FIFO if you create an item before choosing a method (Intuit QuickBooks Help, September 22, 2026).
Odoo offers both approaches as a setting. In Odoo 19, the periodic method expenses vendor bills and adjusts stock in a closing entry, while the perpetual method posts bills to stock valuation and recognizes COGS when goods are sold (Odoo documentation, Valuation cheat sheet, no date shown).
Related guides
- Adjusting Journal Entries: 5 Types, Examples, Automation
- Lot Tracking Software: How It Works and How to Choose
- General Ledger Reconciliation: Steps, Frequency and Review
Frequently asked questions
What is the journal entry for cost of goods sold?
Debit cost of goods sold and credit inventory for the cost of units sold. Perpetual systems post it at each shipment; periodic systems post it once in the period-end closing entry.
Does freight-in go to cost of goods sold or inventory?
Inbound freight on purchased goods is part of inventory cost under ASC 330, so it goes to inventory first and reaches cost of goods sold when the goods sell. Abnormal freight is expensed in the period.
How do you record inventory shrinkage?
After a count, debit an inventory shrinkage account and credit inventory for the missing units at cost. Keeping it in a COGS sub-account keeps it visible.
Can you use a periodic inventory system with an ERP?
Some systems allow it. Odoo offers a periodic valuation setting, and Business Central can run without automatic cost posting so that costs move to the general ledger in a batch. Running periodically means losing per-shipment margin and separate shrinkage reporting.
Why does my inventory subledger not match the general ledger?
The usual causes are manual journal entries posted directly to the inventory account, cost adjustments that have not yet posted to the general ledger, and timing differences around period-end cutoff. Run cost adjustment first, then compare the valuation report to the control account.
Sources
- OpenStax, Principles of Financial Accounting, 6.2 Compare and Contrast Perpetual versus Periodic Inventory Systems, April 11, 2019. openstax.org
- PwC, Inventory guide (PDF), December 2021. PwC is an audit and advisory firm. viewpoint.pwc.com
- Journal of Accountancy, FASB Statement No. 151, Inventory Costs, February 1, 2005. journalofaccountancy.com
- eCFR, 26 CFR 1.471-1, Need for inventories, up to date as of October 7, 2026. ecfr.gov
- Cornell Legal Information Institute, 26 U.S.C. 471, General rule for inventories, no date shown. law.cornell.edu
- IRS, Rev. Proc. 2025-32 (PDF), section 4.30, no date shown. irs.gov
- IRS, About Form 1125-A, Cost of Goods Sold, page last reviewed August 3, 2026. irs.gov
- IRS, Form 1125-A (PDF), Rev. November 2024. irs.gov
- Oracle NetSuite Help, Cost of Goods Sold (COGS) GL Impact, no date shown. Oracle sells NetSuite. docs.oracle.com
- Oracle NetSuite Help, System COGS Adjustments, no date shown. Oracle sells NetSuite. docs.oracle.com
- Microsoft Learn, Post inventory costs to the general ledger (Business Central), last updated August 29, 2024. Microsoft sells Business Central. learn.microsoft.com
- Intuit QuickBooks Help, What is FIFO and how is it used for inventory cost accounting, September 22, 2026. Intuit sells QuickBooks. quickbooks.intuit.com
- Odoo documentation (Odoo 19), Valuation cheat sheet, no date shown. Odoo sells Odoo. odoo.com

