FIFO LIFO Calculator
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free FIFO LIFO calculator. Compare cost of goods sold and ending inventory under FIFO, LIFO and weighted average from your purchase history.
- Units bought
- 0
- Total cost of purchases
- 0
- Units left
- 0
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the FIFO LIFO calculator
- List your purchases, oldest first, one per line, in the form: quantity @ unit cost. For example, "100 @ 10" means 100 units bought at $10 each.
- Enter the number of units sold in the period.
The FIFO LIFO calculator shows the cost of goods sold (COGS) and the value of the remaining inventory under three methods: FIFO, LIFO and weighted average. It also shows the total units and value purchased, the average unit cost, and the units left.
This calculator illustrates the methods for a single period. Accounting rules, tax rules and the method your business must use depend on where you are and the standards you follow, so ask an accountant before choosing or changing a method.
Why the inventory method matters
When prices change over time, identical units in stock may have been bought at different costs. When you sell some, you need to decide which costs go to the cost of goods sold, and which stay in the value of the remaining inventory. The choice affects reported profit, taxes in some countries, and the balance sheet value of inventory.
The three methods
- FIFO (first in, first out): the oldest units are treated as sold first, so COGS uses the oldest costs and the remaining inventory reflects the most recent costs.
- LIFO (last in, first out): the newest units are treated as sold first, so COGS uses the most recent costs and the remaining inventory reflects the oldest costs.
- Weighted average cost: all units are treated as having the same average cost, the total cost divided by the total units.
These are cost-flow assumptions for accounting. They don't have to match the physical order in which goods leave the shelves.
How the FIFO LIFO calculator works
With the default purchases:
| Purchase | Units | Unit cost | Cost |
|---|---|---|---|
| 1 (oldest) | 100 | $10 | $1,000 |
| 2 | 150 | $12 | $1,800 |
| 3 (newest) | 200 | $13 | $2,600 |
| Total | 450 | $5,400 |
With 300 units sold:
- FIFO: 100 × $10 + 150 × $12 + 50 × $13 = $3,450 COGS. Remaining inventory: 150 × $13 = $1,950.
- LIFO: 200 × $13 + 100 × $12 = $3,800 COGS. Remaining inventory: 50 × $12 + 100 × $10 = $1,600.
- Weighted average: $5,400 ÷ 450 = $12 per unit. COGS: 300 × $12 = $3,600. Remaining inventory: 150 × $12 = $1,800.
In every method, COGS plus remaining inventory equals the total cost of $5,400; the methods only differ in how that total is split.
Rising and falling prices
When costs are rising, as in the example:
- FIFO gives the lowest COGS and the highest profit, with inventory valued close to current costs.
- LIFO gives the highest COGS and the lowest profit, which can reduce taxable income where LIFO is allowed for tax, but leaves older, lower costs in inventory.
- Weighted average falls in between.
When costs are falling, the effects reverse. When costs are stable, the methods give similar results.
A worked example: a smaller retailer
A shop buys 50 units at $20, then 50 at $22, then 100 at $25, and sells 120 units.
- FIFO COGS: 50 × $20 + 50 × $22 + 20 × $25 = $2,600.
- LIFO COGS: 100 × $25 + 20 × $22 = $2,940.
- Weighted average: $4,600 ÷ 200 = $23 per unit, so COGS is 120 × $23 = $2,760.
Enter the three purchases and 120 units sold in the FIFO LIFO calculator to check. With rising costs, LIFO reports $340 less gross profit than FIFO on the same sales.
Rules on LIFO
LIFO isn't allowed everywhere. International Financial Reporting Standards (IFRS), used in many countries, don't permit LIFO under IAS 2, the standard on inventories; they allow FIFO and weighted average cost, and specific identification in some cases. US generally accepted accounting principles (GAAP) do allow LIFO, and US tax rules include a LIFO conformity rule, which generally requires a business that uses LIFO for tax to use it in its financial statements too. Businesses usually need to apply a method consistently, and changing methods can require approval or disclosure. An accountant can advise on what applies to you.
Periodic and perpetual systems
The FIFO LIFO calculator works like a periodic system: it takes all purchases in the period and the total units sold, then assigns costs at the end. Businesses with perpetual inventory systems record the cost of each sale as it happens, which can give slightly different LIFO and weighted average results when purchases and sales are interleaved, because each sale only draws on stock bought before it. FIFO gives the same result under both systems.
Who uses a FIFO LIFO calculator
Small business owners use it to understand how inventory methods affect profit. Bookkeepers and accountants use it to check calculations. Accounting students use it to practise, as inventory costing is a core topic. Retailers and wholesalers use it to compare methods, and analysts use it to understand differences between companies' reported results.
Bring in the next customer from Google
Numbers like these keep a business running. Google Ads, run carefully, is how many small businesses bring in the next customer. That is the whole job of DeepRit: a PPC-only agency that sets up and runs Google Ads accounts so every click is accounted for. You keep full ownership of your account, get a written report every week, and can stop at any time. See our pricing or ask for a free audit.
Common mistakes
- Listing purchases newest first, which reverses FIFO and LIFO.
- Entering units sold greater than units purchased.
- Assuming the physical flow of goods must match the cost method.
- Using LIFO where it isn't permitted, such as under IFRS.
Effect on the financial statements
The inventory method affects two key financial statements. On the income statement, COGS is subtracted from sales to give gross profit, so a higher COGS means lower reported profit. On the balance sheet, the remaining inventory is reported as an asset, so a lower inventory value means lower reported assets. With rising costs, LIFO lowers both profit and inventory value compared with FIFO. Analysts comparing companies that use different methods often adjust the figures, and US companies using LIFO typically disclose a LIFO reserve, the difference between their LIFO inventory and what it would be under FIFO, to make comparisons easier.
Inventory turnover
Inventory turnover measures how many times stock is sold and replaced in a period:
Inventory turnover = COGS ÷ average inventory
Because the inventory method changes both COGS and inventory value, it also changes turnover ratios. In the default example, FIFO gives COGS of $3,450 and ending inventory of $1,950, while LIFO gives $3,800 and $1,600. When comparing turnover between periods or businesses, make sure they use the same method.
Specific identification
For unique or high-value items, such as cars, jewellery or works of art, businesses can often track the actual cost of each item sold. This is called specific identification, and it avoids the need for a cost-flow assumption. It's practical only when items are individually identifiable and relatively few. For interchangeable goods, FIFO or weighted average is more common.
Inventory write-downs
Whichever method you use, inventory generally can't be carried at more than it can be sold for. Under IFRS, inventory is measured at the lower of cost and net realisable value; under US GAAP, the rules depend on the method, with FIFO and weighted average inventory measured at the lower of cost and net realisable value. If stock becomes damaged, obsolete or must be sold below cost, it may need to be written down, which increases expenses for the period. An accountant can advise on the rules that apply.
Practising with the calculator
Accounting courses often set FIFO, LIFO and weighted average problems with several purchases and a single sales figure, exactly the format the FIFO LIFO calculator uses. Work each method by hand first, setting out which layers are used, then check your answers. Try the same purchases with costs falling instead of rising to see how the results reverse. Seeing COGS and ending inventory always add up to the total cost is a useful check on any manual calculation.
Software and records
Most accounting and inventory software calculates COGS automatically using the method you choose. The FIFO LIFO calculator is useful for checking a few figures, understanding what the software is doing, or modelling the effect of a change before discussing it with an accountant.
Consistency
Whichever method you choose, use it consistently from period to period, so profit and inventory figures stay comparable over time and readers of your accounts can trust the trends.
Sources and further reading
- FIFO and LIFO accounting on Wikipedia: the methods, examples and their effects.
- IAS 2 on Wikipedia: the international accounting standard on inventories.
- Cost of goods sold on Wikipedia: how COGS is calculated and reported.
Frequently asked questions
What's the difference between FIFO and LIFO?
FIFO treats the oldest units as sold first; LIFO treats the newest units as sold first.
Which method gives higher profit?
When costs are rising, FIFO gives higher reported profit than LIFO.
How is weighted average cost calculated?
Total cost of purchases divided by total units, then multiplied by units sold.
Is LIFO allowed everywhere?
No. IFRS doesn't permit LIFO, while US GAAP does.
How should I enter purchases?
One per line, oldest first, as quantity @ unit cost.
Is the FIFO LIFO calculator free?
Yes. It's free, needs no sign-up, and works in your browser.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.