Intermediate

FIFO Inventory Calculator — Cost of Goods Sold

Apply the FIFO (First In, First Out) method to calculate COGS and ending inventory value. Enter up to three purchase lots with quantities and unit costs, then specify units sold to see the exact cost allocation with step-by-step workings.

units

Oldest purchase lot (first in)
Cost per unit in Lot 1

units

units

Most recent purchase lot

units

Total units sold in the period
COGS (cost of goods sold)
2,200

Cost assigned to units sold using FIFO — oldest costs consumed first

Ending inventory value
600
Total inventory cost
3,920
Units remaining
130
Weighted avg cost / unit
11.88
FIFO cost allocation — step by step
1

Lot 1: use 100 of 100 units @ $10/unit

100 × 10 = 1,000
2

Lot 2: use 100 of 150 units @ $12/unit

100 × 12 = 1,200
3

Total COGS (cost of goods sold)

2,200
Lock the current result, then change any input to compare scenarios.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. This is not financial, investment or tax advice; consult a qualified professional. Read the full disclaimer.
Quick answer

How does this calculator work?

FIFO assigns the cost of the oldest purchase lots to COGS first. COGS = sum of (units from each lot × that lot's unit cost), oldest lot first. Ending inventory = total inventory cost − COGS. In a rising-cost environment FIFO results in lower COGS and higher profit than LIFO.

Formula
COGS = Σ (units consumed from each lot × that lot's unit cost), oldest lot first • Ending inventory = Total cost − COGS
How this is calculated

Under FIFO (First In, First Out), the cost of the oldest inventory purchased is assumed to be the cost of the first units sold. When units from an older lot are fully consumed, sales then draw from the next-oldest lot. The steps in this calculator show exactly how many units come from each lot and at what cost, making the allocation transparent.

FIFO is one of three main inventory costing methods alongside LIFO (Last In, First Out) and weighted-average cost. Each produces different COGS and ending inventory figures when unit costs change over time. In a rising-cost environment, FIFO produces a lower COGS (older, cheaper costs flow through first) and a higher ending inventory value — raising reported gross profit. LIFO has the opposite effect. LIFO is not permitted under IFRS (used in most countries outside the US), while FIFO is accepted under both IFRS and US GAAP.

EndingInventory = TotalInventoryCost − COGS. This must balance: the sum of COGS and ending inventory always equals the total cost of all goods available for sale. This calculator supports up to three purchase lots, which is sufficient for most exam problems and many small-business scenarios. Real accounting systems track individual or batch-level costs across many more lots.

Frequently asked questions

FIFO assigns the older (lower) costs to COGS first and retains the newer (higher) costs in ending inventory. Because COGS is lower, gross profit is higher. LIFO does the reverse — newer, higher costs flow to COGS, reducing gross profit and taxable income. This is why many US companies preferred LIFO for tax purposes (it is disallowed under IFRS).

FIFO is an accepted method under both US GAAP and IFRS. In the US, you must consistently apply the same method; switching requires IRS approval (Form 3115). Your choice of inventory method affects taxable income, so consulting a tax advisor before choosing or changing methods is advisable.

Weighted-average cost assigns a single blended cost per unit — total goods available ÷ total units — to all sales. FIFO tracks the specific cost layer of each purchase lot. Weighted-average smooths out price fluctuations; FIFO better matches physical flow for perishable goods (which genuinely sell oldest-first). This calculator shows the weighted-average cost alongside the FIFO result for comparison.

Also known as

fifo inventory method calculator
cost of goods sold fifo
fifo cogs calculator
first in first out inventory
ending inventory value fifo
fifo vs lifo calculator
inventory costing fifo
fifo accounting calculator

APA

TG we-Calculate Editorial Team. (2026). FIFO Inventory Calculator — Cost of Goods Sold [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/fifo-for-inventories-calculator

Chicago

TG we-Calculate Editorial Team. "FIFO Inventory Calculator — Cost of Goods Sold." TG we-Calculate. 2026. https://we-calculate.com/calculator/fifo-for-inventories-calculator.

IEEE

TG we-Calculate Editorial Team, "FIFO Inventory Calculator — Cost of Goods Sold," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/fifo-for-inventories-calculator

BibTeX

@misc{wecalculate_fifo_for_inventories_calculator, title = {FIFO Inventory Calculator — Cost of Goods Sold}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/fifo-for-inventories-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?