FIFO vs LIFO Inventory Valuation Calculator
Enter your beginning and purchase layers and the units sold.
Result
How it is calculated
The tool models exactly two cost layers: the beginning stock and one purchase, each with a quantity and a unit cost. Total value is beg_qty × beg_cost + pur_qty × pur_cost. Under FIFO the units sold come from the beginning layer first, then from the purchase layer. Under LIFO they come from the purchase layer first, then the beginning layer. For each method, ending inventory = total value − COGS, where COGS is the sum of units taken from each layer times that layer's cost. The results show both ending values and the absolute COGS difference between the methods, in dollars. Units sold cannot exceed units available, and no input may be negative. Which method is allowed for accounting or tax depends on the country.
Worked example
Beginning stock is 100 units at $10 and a purchase adds 100 units at $12, so the total value is $1,000 + $1,200 = $2,200. You sell 120 units. FIFO takes 100 × $10 plus 20 × $12 = $1,240 of COGS, leaving $2,200 − $1,240 = $960.00 in stock. LIFO takes 100 × $12 plus 20 × $10 = $1,400 of COGS, leaving $800.00. The COGS differs by $1,400 − $1,240 = $160.00.
Common mistakes
- Entering several purchases as one by averaging their prices yourself. The tool has only two layers, so a middle purchase must be folded into one of them, which changes the answer.
- Mixing up the layer order. The beginning layer is treated as the oldest, so putting the newer, dearer stock in the beginning fields reverses the FIFO and LIFO results.
- Entering the sales value instead of the number of units sold. The field takes quantity, not dollars.
- Entering more units sold than beginning plus purchased. The tool returns no result in that case rather than going negative.
- Expecting the two methods to differ when costs are equal. If both layers have the same unit cost, FIFO and LIFO give identical figures and the difference is $0.00.
Sources
About this calculator
FIFO (first-in, first-out) assumes the oldest inventory units are sold first, so the units left in stock are valued at the most recent purchase costs. LIFO (last-in, first-out) assumes the opposite — the newest units are sold first, leaving older, often cheaper costs in ending inventory. In periods of rising prices, FIFO tends to report lower cost of goods sold (COGS) and higher ending inventory value than LIFO.
This calculator takes a beginning inventory layer and a purchase layer, each with its own quantity and unit cost, plus the number of units sold, and values ending inventory under both methods side by side. It then shows the difference in COGS between the two methods, as a positive amount, rather than a separate COGS figure for each. Accountants, bookkeepers, and small business owners use it to see how the choice of costing method changes reported profit and tax liability for the same physical inventory.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
The two methods only disagree about what is left, not about how many units you sold. With 100 units at 10 and 100 at 12, selling 120 leaves 960.00 under FIFO and 800.00 under LIFO. Sell all 200 and both show 0.00, with no difference at all. So the gap appears when stock remains at period end. Does your business usually close a period with a thin or a deep layer of stock?