FIFO Inventory Calculator

Calculate Cost of Goods Sold (COGS) and Ending Inventory value using the First-In, First-Out method.

Calculator by SuperCalX: formulas, worked examples and 250+ free calculators.

Your values

Result

Enter your values and the result appears here.

Analysis

Interpretation of the current calculator output

Enter values to see detailed analysis and insights.

How to Use

Step-by-step instructions
  1. 1Add inventory batches with unit counts and costs
  2. 2Batches should be entered in chronological order (oldest first)
  3. 3Enter the total number of units sold
  4. 4Review the COGS and Ending Inventory value

FIFO Method

Assumes that the first items purchased are the first ones sold. This is common for perishable goods.
COGS = Cost of Oldest Inventory Units Sold Ending Inventory = Cost of Newest Inventory Units Remaining

Variables:

COGSCost of Goods Sold
Ending InventoryValue of unsold stock

Example

Inventory Sales

Inputs:

Batch 1:100 units @ $10
Batch 2:100 units @ $15
Sold:150 units

Steps:

  1. 1.Sell all 100 from Batch 1: 100 × $10 = $1,000
  2. 2.Sell 50 from Batch 2: 50 × $15 = $750
  3. 3.Total COGS = $1,750
  4. 4.Ending Inventory = 50 units @ $15 = $750
Result:
COGS: $1,750, Ending Inventory: $750

FIFO Calculator: the short answer

FIFO (first in, first out) assumes the oldest inventory is sold first. With batches of 100 units at $10, 150 at $12 and 200 at $13, selling 300 units uses all of the first two batches and 50 of the third: COGS = $1,000 + $1,800 + $650 = $3,450. The 150 units left are valued at $13 each, $1,950.

  • When prices are rising, FIFO gives lower COGS and higher reported profit than LIFO.
  • FIFO is allowed under both U.S. GAAP and IFRS; LIFO is not allowed under IFRS.
  • Ending inventory under FIFO is close to current replacement cost.

By the SuperCalX team · Reviewed by Dr. Ahmed Mortuza Saleque, founder and editor · Last reviewed · How we check our calculators

FIFO vs LIFO vs weighted average (same example)

MethodCOGS for 300 unitsEnding inventory (150 units)
FIFO$3,450$1,950
LIFO$3,800 (200 × $13 + 100 × $12)$1,600
Weighted average ($12.00/unit)$3,600$1,800

Tax effect

In inflationary periods FIFO reports more profit and so more income tax. LIFO lowers taxable income but, in the U.S., companies that use LIFO for tax must also use it in their financial statements. See how COGS flows into gross margin with the COGS calculator.

Worked examples

Sell 300 units from three batches

  1. Batch 1: 100 × $10 = $1,000.
  2. Batch 2: 150 × $12 = $1,800.
  3. Batch 3: 50 × $13 = $650.

COGS $3,450; ending inventory 150 × $13 = $1,950.

Common mistakes

  • Entering batches newest first, which turns the result into LIFO.

FIFO Calculator FAQ

Why use FIFO?

It matches how most businesses physically move stock, especially perishables, and gives a balance sheet value close to current prices.

Does FIFO affect taxes?

Yes. When costs rise, FIFO produces lower COGS, higher profit and therefore higher taxes than LIFO.

What is the difference between FIFO and LIFO?

LIFO (Last-In, First-Out) assumes newest items are sold first. LIFO results in higher COGS and lower taxes during inflation.

Add this calculator to your website

Teachers, bloggers and businesses can show the FIFO Calculator on their own pages for free. Copy this code and paste it into your page's HTML:

Please keep the credit link so readers can find the formula, worked examples and guide.