Skip to content

FIFO Inventory Cost Calculator

Updated:

Calculate the cost of your ending inventory using the FIFO method. Enter the units remaining in stock and the units and cost per unit of up to three purchase batches.

FIFO Inventory Valuation Tool

Input Fields
EI
Number of units remaining at the end of the period
U1
Units purchased in the first batch
C1
$
U2
C2
$
U3
C3
$
If enabled, the result will update automatically when you change any value.

FIFO Ending Inventory Cost Formula

Formula
\[ \text{Ending Inventory Cost}_{\text{FIFO}} = \sum_{\text{newest} \to \text{oldest}} \left( U_i \times C_i \right) \]

Where:

  • \(U_i\) — units taken from batch \(i\) to fill the ending inventory, starting with the most recent purchase
  • \(C_i\) — cost per unit of batch \(i\)
  • \(EI\) — total units in ending inventory; the sum of all \(U_i\) equals \(EI\)

Under FIFO (First-In, First-Out), the oldest units are assumed to be sold first, so the stock left over at the end of the period consists of the newest purchases. The formula works backward through the purchase batches — newest first — taking units from each batch until the ending inventory quantity is fully filled.

If you also need the cost of goods sold, subtract the result from the total cost of all purchases:

\[ \text{COGS} = \text{Total Cost of Purchases} - \text{Ending Inventory Cost} \]

FIFO Ending Inventory Cost – Calculation Example

Example: at the end of the period you have 150 units left in stock. During the period you made three purchases: Batch 1 — 100 units at \($10\) per unit, Batch 2 — 150 units at \($12\) per unit, and Batch 3 — 200 units at \($14\) per unit.

Under FIFO the newest units remain in stock, so all 150 ending units come from Batch 3 (the latest purchase, with 200 units available):

\[ 150 \times \$14 = \$2{,}100 \]

Result: the FIFO ending inventory cost is \($2,100\). The total cost of purchases was \(100 \times 10 + 150 \times 12 + 200 \times 14 = \$5{,}700\), so the cost of goods sold for the period is \(5{,}700 - 2{,}100 = \$3{,}600\).

How to Use the Calculator

  1. Enter the Units in ending inventory — the number of units you still have in stock at the end of the period.
  2. Enter the units and cost per unit for Purchase Batch 1 — this must be your oldest purchase.
  3. Enter the units and cost per unit for Purchase Batch 2 and Purchase Batch 3, in chronological order, so that Batch 3 is the most recent purchase.
  4. If you made fewer than three purchases, simply leave the unused batch fields at 0.
  5. Read the FIFO Ending Inventory Cost in dollars at the bottom of the calculator.

What Is FIFO Inventory Costing?

FIFO (First-In, First-Out) is one of the most widely used inventory valuation methods in accounting. It assumes that the oldest goods purchased are the first ones sold, which matches how most businesses physically move their stock — grocery stores rotate products so older items leave the shelf first, and manufacturers consume raw materials in the order they arrive. Because of this natural fit, FIFO is accepted under both IFRS and US GAAP, while the alternative LIFO method is only permitted in the United States.

The practical effect of FIFO shows up most clearly when prices are changing. In an inflationary environment, the units sold are the cheaper, older ones, so COGS is lower and reported profit is higher; meanwhile the ending inventory on the balance sheet is valued at the newer, higher prices, which better reflects the current replacement cost of the stock. This is why the result from this calculator is often close to what you would actually pay to repurchase the same inventory today.

To interpret the number correctly, remember what it represents: the cost of the units you still own, not the units you sold. If you subtract it from the total cost of all purchases made in the period, you get FIFO COGS. From there you can feed the figure into your ending inventory or cost of goods sold calculations, compare it against beginning inventory from the prior period, or use it to monitor how quickly stock turns over with the days in inventory metric.

How the Allocation Works: A Larger Example

When ending inventory is larger than the newest batch, the calculator spills over into earlier batches. Suppose you have 350 units left instead of 150, with the same purchases as the example above:

Batch Units purchased Cost per unit Units in ending inventory Cost allocated
3 (newest) 200 $14 200 $2,800
2 150 $12 150 $1,800
1 (oldest) 100 $10 0 $0
Total 450 — 350 $4,600

All 200 units of Batch 3 go into ending inventory first, followed by 150 units of Batch 2. The 100 oldest units at $10 were fully sold, so none of them remain in stock.

Assumptions and Limitations

  • No beginning inventory: the calculator values ending inventory using only the three purchase batches you enter. If you started the period with stock on hand, treat that opening stock as an additional batch (with its own cost) and enter it in the earliest position, or use the inventory stock calculator to plan purchases first.
  • Maximum of three batches: if you purchased at more than three different prices during the period, combine the oldest batches into a single weighted entry, or run the calculation in stages across sub-periods.
  • Periodic inventory system: the calculation matches a periodic system, where counts are taken at the end of the period. A perpetual system tracks each sale as it happens, which can give slightly different figures when purchases and sales are interleaved.
  • Cost flow assumption only: FIFO describes the flow of costs, not necessarily the physical movement of every unit. The assumption that older stock sells first is an accounting convention — although for most perishable or rotating goods it matches reality closely.
  • Tax implications: during inflation FIFO produces higher taxable income than LIFO because COGS is lower. Consider the effect on both your break-even point and your tax documentation before choosing a costing method for reporting.

Frequently Asked Questions

How do I calculate FIFO inventory cost by hand?

List your purchase batches from newest to oldest. Take units from the newest batch first, multiply by its cost, then move to the next batch if you need more units, until you have covered the full ending inventory quantity. Add up the amounts. For example, with 80 units left and a newest batch of 50 at \($14\), you use \(50 \times 14 = \$700\) plus \(30 \times 12 = \$360\) from the next batch, giving \($1{,}060\).

What happens if my ending inventory is larger than total purchases?

If the units remaining in stock exceed the total units in all entered batches, the batches cannot fully fill the ending inventory. The calculator still returns the value of all units in the batches. This usually means you forgot to include beginning inventory — enter it as the oldest batch with its own cost per unit. If it reflects real stock growth, review your purchase records, since the missing units have no cost assigned to them.

Why does batch order matter when entering purchases?

The calculator assumes Batch 1 is your oldest purchase and Batch 3 the newest. Because FIFO works backward from the most recent purchase, entering the batches out of chronological order produces a wrong result: it values your stock using the wrong costs. Before calculating, sort your purchases by date — oldest first — and double-check the unit costs, including any freight or handling charges that belong in the cost of each batch.

Should purchase costs include shipping and other fees?

Yes. Under both IFRS and US GAAP, the cost of inventory includes all costs of bringing the goods to their present location and condition — freight-in, import duties, and non-recoverable taxes. Adding these to the per-unit cost gives a more accurate inventory value and COGS. Exclude selling expenses, storage costs unrelated to production, and administrative overhead, as accounting standards do not allow capitalizing them into inventory cost.

How is FIFO different from LIFO and weighted average?

FIFO values ending inventory at the newest costs; LIFO (allowed only in the US) values it at the oldest costs; weighted average blends all costs together. During inflation, FIFO gives the lowest COGS and the highest inventory value and profit, while LIFO does the opposite. The weighted average method falls in between. The three methods are legal alternatives, so pick one and apply it consistently across reporting periods.

Can I use this calculator with currencies other than dollars?

Yes. The math is currency-independent — simply enter all costs in the same currency, such as euros, pounds, or yen, and read the result in that currency. Never mix currencies within one calculation; convert every batch cost first. The calculator also works for non-monetary unit costs, for example materials priced per unit in a manufacturing setting, as long as all batches use the same unit and scale.

Does FIFO give the same result under periodic and perpetual systems?

Not always. With a periodic system, which this calculator mirrors, you count once at period end and value the remaining units from the newest purchases. A perpetual system records each sale as it happens, and when purchases and sales alternate during the period, some sales may draw from different batches. The final ending inventory value is usually identical or very close, but COGS can differ slightly, so match the method to your bookkeeping system.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “FIFO Inventory Cost Calculator”