FIFO Inventory Calculator - COGS & Ending Value

Apply first-in, first-out inventory costing to calculate cost of goods sold, ending inventory value, quantity, and remaining cost layers.

Enter beginning inventory and purchases as quantity-cost pairs, then enter units sold.

FIFO Inventory Calculator - COGS & Ending Value
First-in, first-out periodic inventory costing

Use “quantity unit cost” for each layer and separate purchases with commas.

About the FIFO Inventory Calculator

The FIFO inventory calculator applies the First In, First Out cost-flow assumption to a beginning inventory layer and a sequence of purchases. FIFO assumes the earliest costs enter cost of goods sold first, regardless of whether a business can physically identify which individual unit shipped. The remaining, newer layers determine ending inventory on the balance sheet. Enter each layer as quantity followed by unit cost. The calculator starts with beginning inventory, appends purchase layers in chronological order, and allocates the entered sales quantity from the oldest layer forward. Cost of goods sold is the sum of sold units multiplied by each consumed layer’s cost. Ending inventory value is the sum of quantity times unit cost for every unconsumed layer. Average ending cost divides that value by remaining units. In a period of rising purchase prices, FIFO usually assigns older, lower costs to COGS and newer, higher costs to ending inventory. Compared with LIFO, that can produce higher gross profit, taxable income, and inventory value. When prices fall, the relationships can reverse. FIFO does not itself change cash paid to suppliers or revenue collected from customers; it changes how historical inventory costs are assigned between expense and assets. Retailers, wholesalers, manufacturers, and accounting students can use the calculator to check a periodic inventory schedule, reconcile stock layers, or test price changes. The optional ending quantity does not override the calculation; it shows the difference between a reported count and units implied by beginning stock plus purchases minus sales. A nonzero difference may point to shrinkage, damaged goods, count errors, omitted transactions, or timing differences that need separate accounting treatment. This simplified model assumes all purchases are listed chronologically, each unit within a layer has one cost, and sales are aggregated for the period. It does not include returns, freight allocation, purchase discounts, write-downs, spoilage, manufacturing conversion costs, perpetual transaction timing, or foreign currency. Accounting standards and tax rules govern whether a method is permitted and how costs are measured. Reconcile the output with source documents and inventory counts before posting journal entries or preparing financial statements.

FIFO Inventory Costing Examples

Each example consumes the oldest available layers and values the remaining units at newer costs.

Inventory activityFIFO resultLayer explanation
Beginning 200 units at $15; purchases 150 at $16 and 100 at $17; sell 300$4,600 COGS; $2,500 ending inventory; 150 unitsSales consume all 200 beginning units and 100 of the $16 layer.
Beginning 500 units at $8; purchases 300 at $9, 200 at $10, 150 at $11; sell 800$6,700 COGS; $3,650 ending inventory; 350 unitsThe $8 and $9 layers are fully consumed, leaving the two newest layers.
Beginning 100 units at $10; purchases 50 at $12 and 75 at $11; sell 120$1,240 COGS; $1,185 ending inventory; 105 unitsTwenty units come from the first purchase after beginning stock is exhausted.

How to Calculate FIFO Inventory

  1. Enter beginning quantity and unit cost as one quantity-cost pair.
  2. Enter purchases in chronological order, separated by commas.
  3. Enter the total quantity sold during the period.
  4. Optionally enter a physical or reported ending quantity for comparison.
  5. Select Calculate FIFO and review COGS and each remaining layer.

FIFO Inventory Calculator FAQ

What does FIFO mean?
First In, First Out assumes the oldest inventory costs are assigned to sales before newer purchase costs. Remaining newer layers then determine ending inventory value on the balance sheet.
How should purchases be entered?
Enter quantity and unit cost for each layer, such as 50 12, and separate chronological layers with commas. Keep purchases in date order so older costs are consumed first.
What happens when sales exceed available units?
The FIFO calculator rejects the scenario because it cannot assign costs to units that do not exist in the entered layers. Check for omitted purchases, a beginning-stock error, or a sales quantity that belongs to another period.
Does optional ending inventory change COGS?
No. It is a verification count. COGS and calculated ending quantity come from entered layers and sales.
Is FIFO the same as physical stock rotation?
Not necessarily. FIFO is an accounting cost-flow assumption, although it often resembles the physical flow of perishable or dated goods.