How to use this calculator
- Enter purchase lot quantities oldest first, matching unit costs, units sold after all purchases.
- Choose a display currency, then select Calculate. Results also update after a brief pause while you edit.
- Read the result with the assumptions below. Export details or save a second scenario to compare your choices.
Formula and method
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.