🌐 EN

📦 FIFO/LIFO Inventory Costing Calculator

Enter purchase lots and units sold to compare FIFO and LIFO inventory costs.

Purchase Lots (enter oldest first)
FIFO
Cost of Goods Sold (COGS) — Ending Inventory Value —
LIFO
Cost of Goods Sold (COGS) — Ending Inventory Value —
Related Calculators Working Capital Calculator Contribution Margin Calculator Safety Stock Calculator Reorder Point Calculator EOQ Calculator Six Sigma Cpk Calculator

Inputs and checks

  • Enter up to three lots from oldest to newest. In each Lot Qty / Unit Cost ($) pair, enter quantity in the first box and dollar cost per unit in the second box.
  • Units Sold is the number of units leaving stock. Use whole nonnegative quantities and nonnegative unit prices, then select Calculate.
  • FIFO uses the oldest purchase costs first; LIFO uses the newest purchase costs first. A lot with zero quantity is skipped.

Reading the result

  • Cost of Goods Sold (COGS) is the purchase cost assigned to units sold; Ending Inventory Value is the cost assigned to units remaining.
  • Each method displays its own COGS and ending inventory in dollars to two decimal places. Selling more units than available uses all stock and displays a warning.
  • These are arithmetic inventory-layer comparisons, not a determination of which accounting or tax method is permitted.

Examples

Sell 150 units from two purchase lots

Input
Lot 1 — Qty / Unit Cost ($): 100 units; Lot 1 second box, unit cost: 10 $/unit; Lot 2 — Qty / Unit Cost ($): 100 units; Lot 2 second box, unit cost: 20 $/unit; Lot 3 — Qty / Unit Cost ($): 0 units; Lot 3 second box, unit cost: 0 $/unit; Units Sold: 150.
Result
FIFO Cost of Goods Sold (COGS): $2,000.00; FIFO Ending Inventory Value: $1,000.00; LIFO Cost of Goods Sold (COGS): $2,500.00; LIFO Ending Inventory Value: $500.00.
How to check it
FIFO sells 100 × $10 plus 50 × $20 = $2,000.00, leaving $1,000.00. LIFO sells 100 × $20 plus 50 × $10 = $2,500.00, leaving $500.00.

Sell only 50 units

Input
Lot 1 — Qty / Unit Cost ($): 100 units; Lot 1 second box, unit cost: 10 $/unit; Lot 2 — Qty / Unit Cost ($): 100 units; Lot 2 second box, unit cost: 20 $/unit; Lot 3 — Qty / Unit Cost ($): 0 units; Lot 3 second box, unit cost: 0 $/unit; Units Sold: 50.
Result
FIFO Cost of Goods Sold (COGS): $500.00; FIFO Ending Inventory Value: $2,500.00; LIFO Cost of Goods Sold (COGS): $1,000.00; LIFO Ending Inventory Value: $2,000.00.
How to check it
FIFO sells 50 × $10 = $500.00, leaving $2,500.00. LIFO sells 50 × $20 = $1,000.00, leaving $2,000.00.

Frequently asked questions

Does the lot order matter?
Yes. Enter lots oldest first because FIFO and LIFO use purchase order differently.
What if Units Sold exceeds all purchased units?
The calculation is limited to available stock and a warning appears.
Is the method allowed for my taxes?
This calculator does not check legal or accounting requirements.