Accounting & Ratios

FIFO and LIFO Inventory Cost

Compare FIFO and LIFO cost allocation for the same supplied purchase lots.

Your numbers

Sample inputs are illustrative. Changing currency changes labels only.

Your result

Preparing the sample calculation…

Shared links include your entered amounts. Saved scenarios stay in this tab only.

How to use this calculator

  1. Enter purchase lot quantities oldest first, matching unit costs, units sold after all purchases.
  2. Choose a display currency, then select Calculate. Results also update after a brief pause while you edit.
  3. Read the result with the assumptions below. Export details or save a second scenario to compare your choices.

Formula and method

Allocate sold units from oldest lots for FIFO or newest lots for LIFO; ending cost=total purchase cost−allocated COGS.

Assumptions and limitations

Single periodic sale after all purchases; fractional units allowed, no prior stock unless supplied as a lot. LIFO is not permitted under every accounting regime.

Worked example

Buy 100 units at 10 and another 100 at 12, then sell 150 units. FIFO allocates 100 × 10 + 50 × 12 = 1,600 to COGS and leaves 600. LIFO allocates 100 × 12 + 50 × 10 = 1,700 and leaves 500. Both reconcile to the original inventory cost of 2,200.

What the result means

Compare FIFO and LIFO cost allocation for the same supplied purchase lots.

Common questions

How is the calculation performed?

Allocate sold units from oldest lots for FIFO or newest lots for LIFO; ending cost=total purchase cost−allocated COGS.

What does the model leave out?

Single periodic sale after all purchases; fractional units allowed, no prior stock unless supplied as a lot. LIFO is not permitted under every accounting regime.

Methodology and transparency

Calculation specification reviewed on 2026-10-14. Mathematical implementation is tested against independent reference fixtures. This does not imply review by a licensed financial professional. Read the testing and precision policy.