FIFO Calculator for Inventory

Two purchase lots followed by one sale. Units sold must not exceed total stock. Does not determine accounting-policy eligibility.

Two purchase lots followed by one sale. Units sold must not exceed total stock. Does not determine accounting-policy eligibility.

Your workbenchInputs are not stored

Result

Enter your values and run the tool to see your result.

What this tool does

Costs sales on a first-in, first-out basis and reports COGS and closing inventory. The model has two receipts and one sale: once the sale exceeds the first batch, the excess is costed at the second batch price.

How to use it

  1. Enter the first receipt’s quantity and unit cost.
  2. Enter the second receipt’s quantity and unit cost.
  3. Enter the quantity sold; it must not exceed total receipts.
  4. Run it to get COGS and closing inventory.

Worked example

Receiving 100 at 10 and 100 at 12, then selling 150, gives COGS of 100×10 + 50×12 = 1,600 and closing inventory of 2,200 − 1,600 = 600.

Calculation method

Cost of goods soldmin(sold,q1)*cost1+max(0,sold-q1)*cost2
Ending inventory valueq1*cost1+q2*cost2-(min(sold,q1)*cost1+max(0,sold-q1)*cost2)

Frequently asked questions

Why does LIFO give a different answer?
When costs rise, FIFO expenses the cheaper stock first, so COGS is lower and closing inventory higher. On the same example LIFO gives COGS 1,700 and closing inventory 500.
What if there are more than two receipts?
This tool handles two batches. For more, combine them into two weighted-average batches or use your accounting system.

What this tool does not cover

It does not judge whether FIFO is permitted under your accounting standard, nor handle tax treatment, write-downs, returns, or discounts.

References