Gombo Tools

Inventory calculator

Calculadora FIFO/LIFO

Use this free FIFO/LIFO calculator to estimate cost of goods sold and ending inventory using two common inventory valuation methods. Enter inventory batches and units sold to compare FIFO and LIFO results. It is useful for inventory tracking, cost analysis, and accounting preparation.

Lotes de inventário

Resultado FIFO

Custo das mercadorias vendidas
260
Inventário final
240

Detalhe por camada

Lote 1Consumido: 100Restante: 0
Lote 2Consumido: 20Restante: 80

Resultado LIFO

Custo das mercadorias vendidas
340
Inventário final
160

Detalhe por camada

Lote 1Consumido: 20Restante: 80
Lote 2Consumido: 100Restante: 0

Resumo das camadas de inventário

Resultado FIFO

Lote 1100 × 2
Consumido: 100Restante: 0
Lote 2100 × 3
Consumido: 20Restante: 80

Resultado LIFO

Lote 1100 × 2
Consumido: 20Restante: 80
Lote 2100 × 3
Consumido: 100Restante: 0

How FIFO and LIFO calculations work

FIFO and LIFO are inventory valuation methods. FIFO assumes the oldest inventory is sold first. LIFO assumes the newest inventory is sold first. The method used can change COGS and ending inventory when purchase costs change over time.

FIFO method

FIFO means first in, first out. The oldest inventory layers are used first to calculate COGS.

FIFO COGS = Cost of oldest units sold first

LIFO method

LIFO means last in, first out. The newest inventory layers are used first to calculate COGS.

LIFO COGS = Cost of newest units sold first

Ending inventory

Ending inventory = Total inventory cost − COGS

How to use this calculator

  • Enter the quantity and unit cost for each inventory batch
  • Enter the number of units sold
  • Review FIFO COGS and ending inventory
  • Review LIFO COGS and ending inventory
  • Compare how the method changes inventory valuation

Examples

Inputs

Batch 1
100 units at 2
Batch 2
100 units at 3
Units sold
120

FIFO

COGS
100 × 2 + 20 × 3 = 260
Ending inventory
80 × 3 = 240

LIFO

COGS
100 × 3 + 20 × 2 = 340
Ending inventory
80 × 2 = 160

Tips

FIFO and LIFO can produce different results when costs change.
FIFO usually leaves newer costs in ending inventory.
LIFO usually leaves older costs in ending inventory.
Confirm which inventory valuation methods are accepted in your accounting context.
Use consistent methods for reporting.

Want to manage inventory layers more clearly?

Gombo helps you manage stock, purchases, invoices, reporting, and business operations from one connected platform.

Start with Gombo

Related calculators