James Allman | JA Technology Solutions LLC
FIFO / LIFO / Average Cost Calculator
Calculate COGS and ending inventory under FIFO, LIFO, and perpetual weighted average from a transaction ledger, with per-sale cost layer breakdowns.
FIFO / LIFO / Average Cost Calculator
Build a transaction ledger row by row (purchases with quantity and unit cost, sales with quantity and an optional selling price), pick FIFO, LIFO, or perpetual weighted average, and see exactly how each sale was costed. The per-sale table shows which cost layers were consumed and at what cost (100 @ 10.00 + 20 @ 12.00) under FIFO and LIFO, or the moving average at sale time under weighted average, carried at four decimal places internally. Totals show cost of goods sold, ending inventory units and value, the remaining cost layers, and gross margin when selling prices are entered. A comparison strip runs the same ledger under all three methods side by side, so the COGS and ending-inventory differences are visible at a glance. Selling more than is on hand stops processing with a clear message at the offending row, and the per-sale breakdown downloads as CSV. Runs entirely in your browser.
Learn more ↓
Loading interactive explorer...
A Cost Flow Assumption, Not a Physical One
FIFO, LIFO, and weighted average differ on one thing: which purchase costs flow to cost of goods sold when a sale happens. They say nothing about which physical units leave the building. A warehouse can rotate stock strictly first-in-first-out while the books cost sales on LIFO, and both are correct, because the method is an accounting assumption about dollars, not a statement about pallets. That distinction is what this calculator makes visible: the same ledger of purchases and sales, costed three ways, with each sale's consumed layers spelled out instead of buried in a single COGS number.
The Rising-Cost Intuition
When purchase costs are rising, FIFO sends the older, cheaper layers to COGS first, which means lower COGS, higher reported margin, and a higher ending inventory value built from the newest costs. LIFO does the opposite: the newest, most expensive layers go to COGS, margins compress, and ending inventory carries the oldest costs. Weighted average lands between the two and smooths the swings. The Try It ledger shows it concretely: identical transactions produce different COGS under each method, and the difference is pure cost flow assumption. One orientation point worth knowing: LIFO is an option under US GAAP but is not permitted under IFRS, so the method question is jurisdictional as well as analytical; this is general orientation, not accounting advice. Once the valuation is settled, the GMROI & Inventory Turns Calculator measures how hard that inventory investment works, and the EOQ Calculator covers the order-quantity decisions that build the layers in the first place.
From One Item to the Whole Item File
One item's ledger fits in a browser. A real valuation run means every SKU, every receipt, and every sale, reconciled to the general ledger and repeated each period. I build inventory valuation and costing reports that apply the same layer logic across the full item file straight from purchase and sales history, with the method differences quantified instead of guessed. See custom reporting or data pipelines and ETL.
All tools run entirely in your browser. Your data never leaves your machine.