Home › Calculators › Inventory Valuation Calculator (FIFO / LIFO)
Inventory Valuation Calculator (FIFO / LIFO)
Enter your beginning inventory and each purchase and sale, and see cost of goods sold and ending inventory under FIFO, LIFO and weighted average side by side, for a periodic or perpetual inventory system, with every layer and step shown.
Last updated:
Beginning inventory
Inventory system
Purchases and sales, in date order
#Date / noteTypeUnitsUnit cost / sale priceTotal
Sale price is optional; enter it to see revenue and gross profit. Rows are used in the order listed.
Comparison of methods
Details by method
Advertisement
Advertisement
How to use the Inventory Valuation Calculator (FIFO / LIFO)
Enter beginning inventory: units on hand at the start of the period and their cost per unit.
Add purchases and sales in date order with units and cost per unit (or sale price per unit for sales).
Choose periodic or perpetual to match how your business records inventory.
Compare the methods in the results table: COGS, ending inventory and gross profit.
Open the FIFO, LIFO and average tabs to see which cost layers each sale used, then download the CSV.
Worked example (the default data)
Beginning inventory 100 units @ $10. Purchase 200 @ $12. Sell 150. Purchase 150 @ $14. Sell 180. Goods available: 450 units costing $5,500; 330 units sold; 120 units left.
Sales use 150 @ $14 and 180 @ $12; left: 20 @ $12 + 100 @ $10
Weighted average (periodic)
$4,033.33
$1,466.67
$5,500 ÷ 450 = $12.2222 per unit
Moving average (perpetual)
$3,980.00
$1,520.00
Average $11.3333 for the first sale, $12.6667 for the second
With sales of $6,960 (150 @ $20 and 180 @ $22), gross profit ranges from $2,700 under LIFO to $3,140 under FIFO, a $440 difference from the costing method alone.
Formulas
Goods available for sale = beginning inventory + purchases (in units and in cost).
COGS = goods available for sale − ending inventory.
Weighted average cost per unit = cost of goods available ÷ units available.
Once you pick a method, use it consistently; changing methods for US taxes generally requires IRS approval.
Frequently asked questions
What is the difference between FIFO and LIFO?
FIFO (first in, first out) assumes the oldest units are sold first, so cost of goods sold uses older costs and ending inventory reflects the newest costs. LIFO (last in, first out) assumes the newest units are sold first. When prices are rising, LIFO gives a higher COGS and lower profit and taxable income, while FIFO gives a higher ending inventory value.
How is weighted average cost calculated?
In a periodic system, average cost = cost of goods available for sale / units available for sale, and both COGS and ending inventory use that one average. For example, $5,500 / 450 units = $12.2222 per unit. In a perpetual system a new (moving) average is calculated after every purchase and each sale is costed at the average at that moment.
What is the difference between periodic and perpetual inventory?
A periodic system works out cost of goods sold once at the end of the period from total goods available. A perpetual system records the cost of each sale when it happens. FIFO gives the same result in both, but LIFO and average cost can differ because a perpetual system can only use the units on hand at the time of each sale.
What is the formula for cost of goods sold?
Cost of goods sold = beginning inventory + purchases - ending inventory. Equivalently, goods available for sale = COGS + ending inventory, which the calculator checks for every method.
Is LIFO allowed?
LIFO is allowed for US tax and financial reporting under US GAAP, and companies that use it for taxes generally must also use it in their financial statements (the LIFO conformity rule). It is not permitted under IFRS, which most countries outside the US use. FIFO and weighted average are allowed under both.
Which method gives the highest profit?
When purchase costs are rising, FIFO usually gives the lowest COGS and the highest gross profit, LIFO the lowest profit and weighted average falls in between. When costs are falling the order reverses. The comparison table labels the method with the highest and lowest COGS for your data.
Should I include shipping and other costs in unit cost?
Yes. Inventory cost generally includes the purchase price plus costs to bring goods to their current condition and location, such as inbound freight and import duties, minus discounts. Enter that landed cost per unit for each purchase.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.