FIFO Inventory Cost Calculator

Calculate cost of goods sold and ending inventory using the FIFO method. Assign oldest purchase costs to sales first for accurate COGS.

units
$
units
$
units
$
units
COGS (FIFO)
$1,240.00
Avg Cost per Unit Sold
$10.33
Ending Inventory Value
$1,560.00
Ending Inventory Units
130
Planning notes, formulas, and examples

About the FIFO Inventory Cost Calculator

The First-In, First-Out (FIFO) method assigns the oldest inventory costs to Cost of Goods Sold (COGS) first. Units purchased earliest are assumed to be sold first, so ending inventory reflects the most recent purchase prices. FIFO is one of the most widely used inventory costing methods under both GAAP and IFRS.

In periods of rising prices, FIFO produces lower COGS and higher net income compared to LIFO, because the cheaper, older costs are matched against revenue. Conversely, ending inventory is valued closer to current replacement cost, giving a more accurate balance sheet figure.

This simplified calculator lets you enter up to three purchase lots and a number of units sold. It applies FIFO logic to compute COGS, ending inventory value, and the average cost per unit sold.

Use the result to compare operating scenarios, pressure-test assumptions, and rerun the model when volumes, rates, or service targets change.

When This Page Helps

FIFO is required under IFRS and preferred by many US companies for its intuitive logic รขโ‚ฌโ€ sell the oldest stock first. This calculator helps accountants, inventory managers, and students quickly work through FIFO cost layering without manual spreadsheets, ensuring accurate COGS and ending inventory figures.

How to Use the Inputs

  1. Enter the quantity and unit cost for your first (oldest) purchase lot.
  2. Enter the quantity and unit cost for your second purchase lot.
  3. Optionally enter a third purchase lot.
  4. Enter the total number of units sold in the period.
  5. Review the COGS calculated under FIFO.
  6. Check the ending inventory value based on remaining lots.
Formula used
FIFO COGS: Assign costs from the oldest lot first until units sold are exhausted. COGS = ฮฃ(Units from each lot consumed ร— Unit Cost of that lot) Ending Inventory = Total Inventory Cost โˆ’ COGS

Example Calculation

Result: COGS = $1,240

Under FIFO, the first 100 units sold come from Lot 1 at $10 = $1,000. The remaining 20 units come from Lot 2 at $12 = $240. COGS = $1,000 + $240 = $1,240. Ending inventory = 130 units at $12 = $1,560.

Tips & Best Practices

  • FIFO is mandatory under IFRS; US GAAP allows FIFO, LIFO, or weighted average.
  • In rising price environments, FIFO shows higher profits but also higher tax liability.
  • FIFO ending inventory closely approximates current replacement cost.
  • Use FIFO when inventory has expiration dates to reflect physical flow (e.g., food, pharma).
  • Track purchase lots chronologically for accurate layering.
  • Compare FIFO vs LIFO results to understand the tax impact of your costing method choice.

FIFO Cost Layering Explained

Under FIFO, each purchase at a distinct cost creates a "layer." When units are sold, costs are drawn from the oldest layer first. Once a layer is fully consumed, the next oldest layer is used. This continues until all sold units have been costed.

FIFO in Inflationary vs Deflationary Environments

During inflation, FIFO assigns lower, older costs to COGS, inflating gross profit and taxes. During deflation, FIFO assigns higher, older costs to COGS, reducing reported profit. Understanding this dynamic is essential for tax planning and financial analysis.

Practical Implementation

Most modern ERP and WMS systems automate FIFO cost layering. Manual tracking is feasible for small businesses with few SKUs. Regardless of method, consistent application period over period is required by accounting standards.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • FIFO stands for First-In, First-Out. It assumes the earliest purchased inventory is sold first. The cost of the oldest units is assigned to COGS, and the newest units remain in ending inventory.