Ending Inventory Calculator

Calculate your ending inventory value and cost of goods sold under FIFO, LIFO, or Weighted Average — free, instant, no signup.

Purchases (oldest first)

Quick Formula Mode

Already know your COGS? Use the accounting identity: Ending Inventory = Beginning Inventory + Net Purchases − COGS.

What Is Ending Inventory?

Ending inventory (also called closing inventory) is the total value of unsold stock at the end of an accounting period. It appears as a current asset on your balance sheet, and it determines your cost of goods sold — which means it directly drives your reported profit and your tax bill. The same physical stock can carry a different dollar value depending on the valuation method you apply.

The Ending Inventory Formula

Ending Inventory = Beginning Inventory + Net Purchases − COGS

Every method uses this identity — they differ in how COGS is computed. That's where FIFO, LIFO, and Weighted Average come in:

Method Remaining units are valued at… Ending inventory when costs rise
FIFO Newest purchase costs Highest
LIFO Oldest purchase costs Lowest
Weighted Average Average cost of all goods available In between

Worked Example: Same Stock, Three Values

ABC Company buys 100 units @ $10 (Jan 5), 200 units @ $12 (Jan 15), and 150 units @ $14 (Jan 25) — 450 units costing $5,500 total. It sells 320 units, leaving 130 units in stock:

FIFO
$1,820
130 units × $14 (newest batch)
LIFO
$1,360
100 × $10 + 30 × $12 (oldest costs)
Weighted Average
$1,589
130 units × $12.22 average

A $460 spread on the same shelf of goods — that difference flows straight into gross profit and taxable income. Read the full breakdown in our FIFO vs LIFO comparison and Weighted Average vs FIFO guide.

How to Calculate Ending Inventory Without COGS

Two common estimation approaches when you don't have a COGS figure yet:

  • Sales-based: Ending Inventory = Beginning Inventory + Net Purchases − Sales (at cost). Quick, but only valid if you track sales at cost.
  • Gross profit method: Estimated COGS = Net Sales × (1 − Gross Profit %). Subtract that from goods available for sale. Useful for interim statements and insurance claims.

For exact (not estimated) figures, use the transaction calculator above — it derives COGS and ending inventory together from your actual purchase costs.

Frequently Asked Questions

How do you calculate ending inventory?

Ending inventory = beginning inventory + net purchases − COGS. To value it precisely, apply a cost flow method: FIFO leaves the newest costs in inventory, LIFO leaves the oldest, and Weighted Average applies one blended cost to every unit.

How do you calculate ending inventory without COGS?

Use beginning inventory + purchases − sales at cost, or estimate COGS with the gross profit method (net sales × (1 − gross margin)). Or skip the estimate: enter your purchases and units sold above and the calculator derives both numbers exactly.

How do you calculate ending inventory using FIFO?

Under FIFO the oldest units sell first, so whatever remains carries your most recent purchase costs. In the example above, all 130 remaining units come from the newest $14 batch: 130 × $14 = $1,820.

What if I have no beginning inventory?

Treat your first purchase as the first batch — ending inventory is simply total purchases minus COGS. The calculator handles this case natively: beginning stock is just batch 1.

Which method should I use?

FIFO is the most widely accepted (GAAP and IFRS) and matches the physical flow of most goods. LIFO can reduce US taxes during inflation but is banned under IFRS. Weighted Average smooths volatile costs. See our full comparison — and if the choice affects your taxes, talk to your accountant.

Outgrown Manual Entry?

Upload your transaction CSV and get ending inventory, COGS, and per-unit costs under every method — with exports and saved history.

Start Free — 500 Transactions Included