FIFO Calculator for Inventory

Calculate inventory valuation and cost of goods sold using the First-In-First-Out (FIFO) method

FIFO Inventory Calculator

DateQuantityCost Per UnitTotal Cost
$0.00

What is FIFO Inventory Method?

First-in, first-out (FIFO) assigns the costs of the earliest acquired units to units sold first. The remaining units therefore carry the costs of later purchases. This is a cost-flow assumption; it does not prove which physical units left the warehouse.

IFRS Foundation, IAS 2 Inventories explains FIFO as a cost formula for ordinarily interchangeable inventory (source reviewed September 2026). IRS Publication 538 (January 2022) also describes FIFO for U.S. tax accounting. These sources describe particular frameworks; this calculator does not determine which inventory method your business must use.

How to Calculate FIFO

  1. Enter each purchase date, quantity, and unit cost for one interchangeable item.
  2. Enter each sale date and quantity. Purchases are available only on or before the sale date.
  3. For each sale, use the oldest available purchase units first. Add those unit costs to cost of goods sold (COGS).
  4. Sum the costs of all unsold units, including purchases after the last sale, for ending inventory.

For transactions on the same date, the calculator treats all purchases as occurring before sales. Purchases and sales sharing a date retain the order in which you entered them. If a sale exceeds available units on its date, the calculator rejects the entire input set and posts no partial result.

The model uses purchase cost only. It does not add freight, production overhead, returns, write-downs, taxes, or sales revenue. Include eligible costs in the entered unit cost only when your accounting rules support that treatment.

FIFO vs. LIFO: Key Differences

FIFO assigns earlier purchase costs to sales. Last-in, first-out (LIFO) assigns later available purchase costs first. When unit costs change, the two assumptions can produce different COGS and ending inventory from the same transactions. Neither result is automatically a market value or a tax liability.

IAS 2 lists FIFO and weighted average for ordinarily interchangeable inventory. Method availability and reporting requirements depend on the accounting and tax framework that applies to you. Check those rules before using a result in financial statements or a return.

Advantages and Disadvantages of FIFO

FIFO is easy to trace when dated purchase layers are known: every sale consumes the oldest available layer. It can be useful for explaining how changing purchase costs affect COGS and the cost carried in ending inventory.

The answer depends on complete, accurate transaction records. A missing opening balance, return, purchase cost, or sale will change the result. FIFO is an accounting cost formula and may differ from the physical flow of goods. The calculator does not assess net realizable value, impairment, or whether FIFO is permitted for a particular tax filing.

Practical Examples

Suppose one product has these transactions in 2026:

  • January 5: buy 10 units at $400 each.
  • January 15: buy 15 units at $420 each.
  • January 25: sell 18 units.

The sale uses 10 × $400 plus 8 × $420, so COGS is $7,360. The remaining 7 units from January 15 are worth $2,940 at purchase cost. Entering the same transactions in the calculator produces those amounts.

If that sale were dated January 10 instead, only 10 units would have been available. The calculator would reject the 18-unit sale rather than borrow from the January 15 purchase.

Frequently Asked Questions

Can I enter several sales on one date?

Yes. The calculator processes those sales in entry order, after purchases on that date. The combined sales still cannot exceed the units available that day.

Can I use this as a tax inventory schedule?

This is an educational cost illustration based on entered transactions. Tax rules, opening balances, allowable costs, inventory write-downs, and method changes depend on your jurisdiction and records. Verify the applicable rules and consult a qualified professional before using results for reporting or tax decisions.