📈
📈 Business tools

LIFO Inventory Calculator (periodic: cost of goods sold & ending inventory)

Results update as you type. Any currency.

Your numbers

Understanding the LIFO inventory calculator — concept and principle

This calculator applies periodic last-in, first-out (LIFO) costing to a list of inventory lots, giving COGS, ending inventory, gross profit and a comparison with FIFO. Accounting students and US companies that use LIFO use it.

Last in, first outLast in, first out: 210 × $33 + 90 × $27 (newest lots go first); FIFO would be $7,200 (LIFO adds $2,160) → $9,360.00 (LIFO COGS for 300 units)Last in, first out210 × $33 + 90 × $27newest lots go firstFIFO would be $7,200LIFO adds $2,160$9,360.00LIFO COGS for 300 units
Last in, first out — with the default inputs: $9,360.00.

How it is calculated

The principle

LIFO assumes the most recent purchases are sold first. In a period of rising costs, the newest and most expensive costs go to COGS, which lowers reported profit and, where LIFO is allowed for tax, taxable income. The units left in stock carry old costs, so the balance-sheet inventory can be far below current value. This calculator uses the periodic method, one calculation at the end of the period; perpetual LIFO, applied sale by sale, can give a different answer. LIFO is allowed under US GAAP but not under IFRS (IAS 2).

Worked example

Defaults: 150 at 21.00, 225 at 27.00, 210 at 33.00; 300 units sold at 37.80.

  1. Goods available = 3,150 + 6,075 + 6,930 = $16,155.00.
  2. LIFO COGS = 210 × 33 + 90 × 27 = 6,930 + 2,430 = $9,360.00; average $31.20 per unit.
  3. Ending inventory = 16,155 − 9,360 = $6,795.00, 285 units.
  4. FIFO COGS = 150 × 21 + 150 × 27 = $7,200.00; LIFO adds $2,160.00.
  5. Gross profit = 300 × 37.80 − 9,360 = $1,980.00; margin = 17.5%.

These figures match the OpenStax textbook example.

How to read the result

The 2,160 difference shows how much lower LIFO profit is than FIFO profit when costs rise. That lower profit can mean lower tax but also weaker reported margins. The LIFO ending inventory reflects old prices, so ratios using inventory, such as current ratio and turnover, need care when compared with FIFO companies.

Common mistakes

Keep in mind: Whether you may use LIFO depends on your accounting framework and tax rules. This is a calculation aid, not accounting or tax advice.

Frequently asked questions

Why does LIFO lower profit?

When costs rise, LIFO charges the newest, highest costs to COGS, so gross profit is lower than under FIFO.

Is LIFO allowed under IFRS?

No. IAS 2 allows FIFO and weighted average cost; LIFO was eliminated.

Why do periodic and perpetual LIFO differ?

Perpetual LIFO takes units from the latest purchase available at the moment of each sale, which may be an older lot than the period's last purchase.

Sources: OpenStax, Principles of Accounting, Volume 1: Financial Accounting, section 10.2 "Calculate the Cost of Goods Sold and Ending Inventory Using the Periodic Method" · IFRS Foundation, Basis for Conclusions on IAS 2 "Inventories", BC9 and BC19–BC21

Checked 9 Nov 2026. LIFO periodic method (last units purchased are the first sold; remaining units are the earliest purchases; worked example 150 @ 21, 225 @ 27, 210 @ 33, 300 sold → COGS 9,360, ending inventory 6,795): OpenStax, “Principles of Accounting, Volume 1: Financial Accounting”, section 10.2 “Calculate the Cost of Goods Sold and Ending Inventory Using the Periodic Method”. LIFO eliminated from IFRS, FIFO and weighted average retained: IFRS Foundation, Basis for Conclusions on IAS 2 “Inventories”, BC9 and BC19–BC21.

📈 All business tools →🌍 Calculators by country →