Calculate ending inventory using FIFO, LIFO, or weighted average methods. Compare COGS across costing methods and analyze inventory turnover metrics.
Ending inventory is the value of goods still on hand at the end of an accounting period. How you calculate it depends on the inventory costing method you choose — FIFO, LIFO, or weighted average — and the choice significantly impacts your reported cost of goods sold (COGS), gross profit, and tax liability.
Under FIFO (First In, First Out), the oldest inventory costs are assigned to COGS first, leaving newer (usually higher) costs in ending inventory. LIFO (Last In, First Out) does the opposite, assigning newest costs to COGS. Weighted average smooths things out by using the average cost per unit across all purchases.
In periods of rising prices, FIFO reports lower COGS and higher profits (more taxes), while LIFO reports higher COGS and lower profits (less taxes). This calculator lets you compare all three methods side-by-side so you can see exactly how each affects your financials and make the best choice for your business situation.
Choosing the right inventory method can change ending inventory, COGS, and gross profit when purchase costs move during the period. Use this calculator to compare FIFO, LIFO, and weighted average so you can see how each method values remaining stock and affects reported earnings.
FIFO: Sell oldest units first → ending inventory = newest cost layers LIFO: Sell newest units first → ending inventory = oldest cost layers Weighted Average Cost = Goods Available for Sale ÷ Total Units Ending Inventory = Units Remaining × Cost per unit (per method) COGS = Goods Available for Sale − Ending Inventory Inventory Turnover = COGS ÷ Ending Inventory
Result: FIFO Ending Inventory $63,000 — COGS $102,000
500 units at $85 + 1200 at $105 = 1700 total units. Sell 1100 (oldest first under FIFO): 500 × $85 + 600 × $105 = $105,500 COGS. Remaining 600 units × $105 = $63,000 ending inventory.
FIFO leaves the newest cost layers in ending inventory, LIFO leaves the oldest layers, and weighted average smooths the entire purchase history into one unit cost.
Match the period inputs to the same accounting window, confirm that units sold cannot exceed units available, and verify that early and late costs reflect the actual purchase sequence before comparing methods.
Last updated:
This worksheet compares three cost-flow assumptions using the same unit and value inputs. FIFO assigns sold units to the earlier cost layer first, LIFO assigns them to the later layer first, and weighted average divides goods available for sale by total units available to derive one blended unit cost. From the selected method it also derives inventory turnover, days on hand, and sell-through using the same COGS and ending-inventory outputs.
It is a comparison tool, not an accounting-method election or tax-filing engine. Actual reporting can differ if the company uses detailed inventory layers, a perpetual system, lower-of-cost-or-net-realizable-value adjustments, or a different permitted method under its reporting framework.
In an inflationary environment (rising prices), LIFO produces the highest COGS and lowest taxable income, minimizing taxes. However, LIFO is not allowed under IFRS (used outside the US). Weighted average provides a middle ground. FIFO results in the lowest COGS when prices rise.
In the US, switching methods requires filing Form 3115 (Application for Change in Accounting Method) with the IRS. The change usually requires a Section 481(a) adjustment to prevent income from being duplicated or omitted. You cannot switch back and forth freely.
If you buy a product at $10 then later at $12, selling one unit: FIFO assigns $10 to COGS (sell oldest first), leaving $12 in inventory. LIFO assigns $12 to COGS (sell newest first), leaving $10 in inventory. FIFO shows higher profit; LIFO shows lower profit but less tax.
Inventory turnover shows how quickly you sell and replace stock. Higher turnover means less cash tied up in inventory and lower holding costs. Typical benchmarks: grocery (14-20x), retail (6-8x), manufacturing (4-6x), luxury goods (2-3x).
Yes. IFRS (International Financial Reporting Standards) prohibits LIFO. Only US GAAP allows LIFO. If your company reports under IFRS or operates internationally, you must use FIFO or weighted average.
Weighted average works well when inventory items are interchangeable (commodities, bulk materials, uniform products). It smooths out price fluctuations and is simpler to maintain than tracking specific cost layers like FIFO or LIFO.