Ending inventory is the dollar value of the goods your business still owns at the close of an accounting period. The basic calculation is beginning inventory plus net purchases minus cost of goods sold, but the number you actually report depends on which valuation method you use to assign costs to the units sitting on your shelves. That choice matters because ending inventory feeds directly into cost of goods sold, and cost of goods sold drives your reported profit.
The Formula
Every calculation starts from the same equation:
Beginning Inventory + Net Purchases − Cost of Goods Sold = Ending Inventory
Beginning inventory is last period’s ending inventory carried forward. Net purchases include everything you bought during the period, plus freight-in, minus returns and allowances. Cost of goods sold (COGS) is the amount assigned to units that left your shelves under whichever valuation method you use.
Rearrange the same equation and you get the COGS formula: Beginning Inventory + Net Purchases − Ending Inventory = COGS. It is the same math. Which variable you solve for depends on whether your system tracks inventory continuously or only at period end.
How the Valuation Method Changes the Number
When you buy the same product at different prices during the year, you need a rule for deciding which costs stay with the units on hand and which costs leave with the units sold. That rule is your cost flow assumption. The IRS permits several, and whichever you choose must conform to best practice in your industry and clearly reflect income.1eCFR. 26 CFR 1.471-2 – Valuation of Inventories
First-In, First-Out (FIFO)
FIFO assumes the oldest units are sold first. Ending inventory reflects the cost of your most recent purchases. When prices are rising, FIFO produces the highest ending inventory value and the lowest COGS, which means higher reported profit. Most businesses default to FIFO because it mirrors how goods actually move through a warehouse.
Last-In, First-Out (LIFO)
LIFO assumes the newest units are sold first. Ending inventory gets valued at older purchase prices, so during inflation the balance sheet figure is lower and COGS is higher. The higher COGS reduces taxable income, which is the main reason to use LIFO in the first place.
The trade-off is a strict conformity requirement. If you use LIFO on your tax return, you must also use it in the financial statements you send to shareholders, creditors, and other outside parties. Reporting higher earnings to investors while claiming lower income on your return is not allowed, and violating the rule can result in the IRS forcing you off LIFO entirely.2Internal Revenue Service. LIFO Conformity Requirement
Weighted Average Cost
This method ignores purchase order. You divide the total cost of goods available for sale by the total units available, then apply that single average cost to both the units sold and the units remaining. The result always falls between FIFO and LIFO, which suits businesses that want to smooth out price swings.
Specific Identification
Specific identification tracks the actual cost of each item. When a unit sells, its exact purchase cost goes to COGS. When you count ending inventory, each remaining item carries its own historical cost. This works for vehicles, jewelry, or custom machinery, but it becomes impractical for thousands of identical units.
The Same Numbers, Three Answers
Suppose you buy 10 units in January at $1 each, 10 more in April at $2 each, and 10 more in July at $3 each. You sell 15 units, leaving 15 on hand. Here is how each method values your ending inventory:
- FIFO: the 15 sold units come from the oldest stock (all 10 at $1 plus 5 at $2, or $20 in COGS). The 15 remaining are the other 5 April units and all 10 July units, giving ending inventory of $40.
- LIFO: the 15 sold units come from the newest stock (all 10 at $3 plus 5 at $2, or $40 in COGS). The 15 remaining are the 10 January units and 5 April units, giving ending inventory of $20.
- Weighted average: the average cost is $2 per unit ($60 total ÷ 30 units). COGS for 15 units is $30, and ending inventory for 15 units is $30.
Same purchases, same sales, and ending inventory ranges from $20 to $40. That $20 swing flows straight through to reported profit.
What Belongs in the Count
Ending inventory should only include goods your business actually owns at period end. Two situations trip people up.
Goods in Transit
Whether goods traveling between a seller and buyer belong in your inventory depends on the shipping terms. Under FOB shipping point, ownership transfers to the buyer the moment the goods leave the seller’s dock. If you are the buyer and the goods are still on a truck at period end, they are yours. Under FOB destination, the seller keeps ownership until the goods arrive, so in-transit goods stay in the seller’s inventory.
If you are closing the books on December 31 and a shipment left your supplier on December 29 under FOB shipping point, those goods count as yours even though they have not arrived.
Consignment Goods
When a supplier places goods with a retailer on consignment, the supplier keeps ownership until the retailer sells to an end customer. The retailer does not include consignment goods in ending inventory, and the supplier keeps them on its own balance sheet until the sale happens. The retailer records only its commission as revenue.
Writing Down Inventory That Lost Value
You cannot carry inventory at inflated values just because that is what you paid. Under GAAP, inventory measured using FIFO or average cost must be reported at the lower of recorded cost or net realizable value, meaning the estimated selling price minus the costs to complete and sell the item. If market conditions or physical deterioration push net realizable value below what you paid, you write the inventory down and recognize the loss immediately. LIFO inventory follows a slightly different version of the rule and is excluded from the net realizable value simplification.3FASB. Accounting Standards Update 2015-11, Inventory (Topic 330)
The IRS takes a similar position for tax purposes. Goods that are unsalable at normal prices because of damage, style changes, or broken lots must be valued at their actual selling price minus disposal costs.1eCFR. 26 CFR 1.471-2 – Valuation of Inventories
Why the Number Has to Be Right
Ending inventory shows up in two places, and errors ripple through both.
On the income statement, ending inventory is one of the three inputs to COGS. Overstating it understates COGS, which inflates gross profit and net income. Understating it does the reverse. Because next period’s beginning inventory is this period’s ending inventory, the error carries forward and reverses in the following period. By then you may have already filed an inaccurate return or distributed profits that were not actually there.
On the balance sheet, inventory sits as a current asset, representing value the business expects to convert into cash within one year or its normal operating cycle. The reported amount depends on the valuation method. A business using LIFO during a period of rising prices shows a noticeably lower inventory balance than one using FIFO holding the same goods. That difference affects ratios lenders and investors rely on, particularly the current ratio.
IRS Rules You Have to Live With
What Costs Belong in Inventory
Section 263A of the Internal Revenue Code requires businesses that produce goods or acquire them for resale to capitalize both direct costs and a proper share of indirect costs into inventory.4Office of the Law Revision Counsel. 26 USC 263A – Capitalization and Inclusion in Inventory Costs of Certain Expenses Direct costs are the materials and labor that go into the product. Indirect costs are where businesses get tripped up: a share of rent, utilities, storage, and other overhead allocable to production or purchasing. Leaving required indirect costs out of inventory understates the ending balance and overstates your current-year deductions, which is the kind of thing that triggers adjustments on audit.
Small businesses with average annual gross receipts of $25 million or less, adjusted annually for inflation, are generally exempt from the Section 263A capitalization rules and can deduct costs as incurred.5Federal Register. Small Business Taxpayer Exceptions Under Sections 263A, 448, 460, and 471
Electing LIFO
To adopt LIFO, you file Form 970 with the tax return for the first year you want to use it.6Internal Revenue Service. About Form 970, Application to Use LIFO Inventory Method Once elected, you must keep using LIFO for both tax and financial reporting until you formally change methods, and the conformity requirement covers credit applications, shareholder communications, and reports to partners or beneficiaries.7Internal Revenue Service. Adopting LIFO
Changing Methods
Switching from one valuation method to another requires IRS approval through Form 3115.8Internal Revenue Service. Instructions for Form 3115 You cannot simply use a different method on next year’s return. An approved change takes effect at the beginning of the tax year in which you file.
When you switch, the IRS calculates the cumulative difference between what your inventory would have been under the old method versus the new one. This is the Section 481(a) adjustment. If the adjustment is negative, meaning you overpaid in prior years, you typically take the entire deduction in the year of change. If it is positive, meaning you underpaid, the added income gets spread over four tax years.8Internal Revenue Service. Instructions for Form 3115 The spread softens the impact, but the tax is still owed.
Once you adopt a valuation method, the IRS expects you to apply it consistently. That consistency requirement is what prevents businesses from switching year to year to minimize taxes.1eCFR. 26 CFR 1.471-2 – Valuation of Inventories