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

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)

  1. Enter beginning inventory: units on hand at the start of the period and their cost per unit.
  2. Add purchases and sales in date order with units and cost per unit (or sale price per unit for sales).
  3. Choose periodic or perpetual to match how your business records inventory.
  4. Compare the methods in the results table: COGS, ending inventory and gross profit.
  5. 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.

MethodCost of goods soldEnding inventory (120 units)How
FIFO$3,820.00$1,680.00Sales use 100 @ $10, 200 @ $12, 30 @ $14; left: 120 @ $14
LIFO (periodic)$4,260.00$1,240.00Sales 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.00Average $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.
  • Gross profit = revenue − COGS; gross margin = gross profit ÷ revenue.

Choosing a method

FIFOLIFOWeighted average
Matches physical flowUsually (perishables, fashion)RarelyMixed, interchangeable goods (fuel, grain)
Rising prices: COGSLowestHighestIn between
Balance sheet inventoryClose to current costCan be far below current costSmoothed
Allowed under IFRSYesNoYes

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.

Related tools

Cost of Goods Sold CalculatorCOGS from beginning inventory, purchases, direct costs and ending inventory, plus gross margin.Inventory Turnover CalculatorInventory turnover ratio and days inventory outstanding from COGS or sales and average stock.Inventory Carrying Cost CalculatorAnnual cost of holding inventory: capital, storage, insurance and obsolescence and the rate.Profit Margin CalculatorGross margin, markup, cost or price: solve for any one, single or bulk.Receipt MakerFill in a receipt template with items and tax, then print or save PDF.Car Depreciation CalculatorEstimate your car's value over time and its projected resale price.CTR CalculatorCalculate click-through rate and compare it with industry benchmarks.Conversion Rate CalculatorCalculate e-commerce conversion rate, revenue per visitor and goals.CPM CalculatorSolve CPM, cost, impressions, CTR and CPC for ad campaigns.Quote Estimate GeneratorCreate a quote or estimate with line items and tax, then save as PDF.ROAS Calculator (Return on Ad Spend)Calculate ROAS, break-even ROAS and profit for each ad channel.Customer Lifetime Value CalculatorCalculate customer lifetime value, LTV:CAC ratio and CAC payback from ARPU and churn.Churn Rate CalculatorCalculate customer churn and retention rates and convert monthly churn to annual.YouTube Money CalculatorEstimate YouTube earnings per day, month and year from views and RPM by niche.Instagram Engagement Rate CalculatorCalculate Instagram engagement rate by followers or reach and compare it to benchmarks.Ecommerce Profit CalculatorNet profit, margin, markup and break-even ROAS per order after fees, ads and returns.Amazon FBA CalculatorEstimate Amazon FBA fees, profit per unit, margin, ROI and break-even price.Etsy Fee CalculatorEtsy listing, transaction, processing and Offsite Ads fees, payout and net profit.eBay Fee CalculatoreBay final value fee, per-order fee, ad fees, payout and net profit on any sale.Stock Profit CalculatorStock trade profit and % return after commissions, plus the break-even sell price.Dollar Cost Averaging CalculatorSee units bought, average cost, value and profit for regular buys at your own price list.Startup Runway CalculatorProject cash, burn rate and runway month by month, with growth, break-even and zero-cash date.Break Even CalculatorFind break-even units and revenue, contribution margin, margin of safety and a cost-volume chart.SaaS Pricing CalculatorModel flat, per-seat, tiered and volume plans with annual discounts to get MRR, ARR and ARPU.Employee Cost CalculatorWork out the true cost of an employee: payroll taxes, benefits, overhead and real hourly cost.Markup CalculatorFind the selling price from cost and markup, or the markup and margin from cost and price.Unit Price CalculatorCompare up to 4 products by price per ounce, pound, liter or item and find the best deal.Cap Rate CalculatorCalculate a rental property's NOI, cap rate and optional cash-on-cash return.Depreciation CalculatorStraight-line, declining balance, double declining and sum-of-years depreciation schedules.Crypto Profit CalculatorCalculate crypto trade profit, ROI and break-even price after buy and sell fees.PayPal Fee CalculatorWork out PayPal fees, what you receive, and how much to ask for to get an exact amount.Stripe Fee CalculatorCalculate Stripe fees and payouts, or how much to charge to receive an exact amount.Net Promoter Score CalculatorCalculate NPS from promoter, passive and detractor counts or pasted 0–10 survey scores.CPC CalculatorCalculate cost per click from ad spend and clicks, plus CPM, CTR, CPA and ROAS.P/E Ratio CalculatorPrice-to-earnings ratio, earnings yield and PEG ratio from share price, EPS and growth.WACC CalculatorWeighted average cost of capital from equity, debt, their costs and the tax rate.Payback Period CalculatorPayback and discounted payback period for an investment with even or uneven cash flows.Contribution Margin CalculatorContribution margin per unit, CM ratio, operating profit and break-even point.Rent to Own CalculatorRent-to-own home: rent credits, option fee and locked price -> equity, and cost vs buying now.Rental Property Depreciation CalculatorYearly depreciation for rentals: 27.5 or 39-year straight-line, mid-month, land excluded.Return Rate CalculatorProduct return rate %, refunds, cost of returns and the net revenue and profit impact.SaaS Quick Ratio CalculatorSaaS growth efficiency: new + expansion MRR over churned + contraction MRR, with benchmark.SaaS Valuation CalculatorEstimate SaaS company value from ARR and a multiple adjusted for growth, NRR and margins.Sales Velocity CalculatorRevenue per day from opportunities, win rate, deal size and sales cycle length.SDE CalculatorSeller's discretionary earnings from profit plus add-backs, and business value at an SDE multiple.Sell-Through Rate CalculatorUnits sold ÷ units received: sell-through %, weekly rate, rate of sale and weeks of supply.SEO Traffic Value CalculatorEstimate what your organic traffic is worth in ad spend from keyword volume, position and CPC.Short Sale Profit CalculatorShort sale profit or loss after borrow fees, commissions and dividends, plus break-even price.Target Profit CalculatorUnits and sales needed to reach a target profit, before or after tax, from price and costs.Trading Expectancy CalculatorExpectancy per trade from win rate, average win and loss, plus profit factor and break-even rate.UGC Rate CalculatorPrice UGC videos with usage rights, whitelisting, raw footage and rush add-ons.Unit Economics CalculatorPer-customer contribution margin, LTV, LTV:CAC ratio and CAC payback months.VA Funding Fee CalculatorVA funding fee for purchase, refinance, IRRRL or assumption, first or subsequent use.Vending Machine Profit CalculatorEstimate vending machine monthly profit, payback period and break-even sales per day.Viral Coefficient CalculatorK-factor from invites per user × conversion rate, with viral cycle time and growth projection.Historical Volatility CalculatorPaste prices to get log returns, standard deviation and annualized historical volatility.Website Valuation CalculatorEstimate what your website is worth from monthly profit and an adjusted earnings multiple.Sales Win Rate CalculatorWin rate from deals won and lost, plus the pipeline you need to hit quota.Accounting Equation CalculatorSolve assets = liabilities + equity for any missing value, including the expanded equation.Accounts Receivable Aging ReportPaste open invoices to sort balances into 0-30, 31-60, 61-90 and 90+ day buckets with totals.Compa-Ratio CalculatorSalary vs range midpoint, range penetration and min/mid/max from a midpoint and spread.Cost Per Hire CalculatorCost per hire from internal and external recruiting costs, with a per-role breakdown.Cost of Employee Turnover CalculatorCost to replace an employee: hiring, onboarding, vacancy and lost productivity.Equity Multiple CalculatorReal estate equity multiple from total distributions ÷ equity, plus IRR, profit and payback.Currency Exchange Fee CalculatorReveal the hidden markup in a bank, card or kiosk exchange rate plus fees vs the mid-market rate.Fuel Surcharge CalculatorFreight fuel surcharge per mile and percent from diesel price, base price and MPG.House Cleaning Price CalculatorQuote a cleaning job by square feet or rooms, cleaning type, condition and frequency.Lawn Care Pricing CalculatorPrice a lawn mowing job from lot size, mowing time, fuel, equipment costs and target profit.
See all 209 Business & Marketing Calculators →