Skip to main content

Inventory Costing Calculator

Enter purchases and sales, choose FIFO, LIFO, or Weighted Average Cost under Perpetual or Periodic systems, and get a full cost flow table, COGS, ending inventory, and journal entries — with side-by-side method comparison.

Background

When identical units are purchased at different prices, a business must choose which cost to assign to units sold (COGS) and which to keep on the balance sheet (ending inventory). The three main methods — FIFO, LIFO, and Weighted Average Cost — produce different results and have real financial statement consequences. Under Perpetual inventory, COGS is updated with every sale. Under Periodic inventory, COGS is calculated only at period end.

Build your inventory and calculate costs

Step 1 — Choose inventory system

Step 2 — Choose costing method

Not shown in Compare mode — all three methods are calculated automatically.

Step 3 — Beginning inventory (optional)

Leave at 0 if the period starts with no inventory on hand.

Step 4 — Enter transactions

Add purchases and sales in chronological order. For sales, cost per unit is not required — it will be calculated.

Learning options

Result

No result yet. Add transactions and click Calculate.

How to use this calculator

  • Choose Perpetual if COGS is tracked after each sale, or Periodic if it's calculated at period end. Use Compare both to see all differences at once.
  • Select your costing method: FIFO (oldest costs out first), LIFO (newest costs out first), or Weighted Average.
  • Enter any beginning inventory on hand, then add purchases and sales in date order.
  • Click Calculate to see the full cost flow table, COGS, ending inventory value, and journal entries.

How each method works

FIFO (First In, First Out): The oldest (first purchased) units are assumed sold first. During rising prices, FIFO produces lower COGS and higher net income. Ending inventory reflects the most recent, higher costs.

LIFO (Last In, First Out): The newest (most recently purchased) units are assumed sold first. During rising prices, LIFO produces higher COGS and lower net income, reducing taxes. Note: LIFO is not permitted under IFRS.

Weighted Average Cost: All available units are averaged together. Under Perpetual, the average is recalculated after each purchase (moving weighted average). Under Periodic, one average is computed for the entire period.

Formulas used

COGS (Periodic): COGS = Beginning Inventory + Purchases − Ending Inventory

Weighted Average Cost per unit (Periodic): WAC = Total Cost Available ÷ Total Units Available

Moving Average (Perpetual): New avg = (Units on hand × Old avg + Units purchased × Purchase price) ÷ New total units

Ending Inventory check: Beginning Inventory + Purchases − COGS = Ending Inventory

Example problems

Rising prices — FIFO vs. LIFO

When purchase prices rise over time, FIFO assigns the old (cheaper) costs to COGS and keeps the new (expensive) costs in ending inventory. LIFO does the opposite — higher recent costs go to COGS, reducing taxable income.

Perpetual vs. Periodic — when do they differ?

FIFO produces identical results under both systems because the same (oldest) units leave regardless of timing. LIFO and Weighted Average can produce different results because the timing of sales relative to purchases changes which layers are available.

Weighted Average under Perpetual

Each new purchase triggers a recalculation of the average cost per unit. This "moving average" is then used for the next sale, making it more responsive to price changes than the single periodic average.

Financial statement effects

In rising price environments: FIFO → highest net income, highest ending inventory. LIFO → lowest net income, lowest ending inventory (better for taxes). Weighted Average falls in between. All three produce the same total over the full life of the inventory.

Frequently Asked Questions

Does FIFO or LIFO give a higher ending inventory?

In rising price environments, FIFO gives a higher ending inventory value because it retains the most recently purchased (more expensive) units on the balance sheet.

Is LIFO allowed under IFRS?

No. LIFO is prohibited under IFRS. It is only permitted under US GAAP. This is one of the key GAAP vs. IFRS differences tested in accounting courses.

When does FIFO give the same result under Perpetual and Periodic?

Always. Because FIFO always sends the oldest costs to COGS regardless of when the sale occurs, the timing of sales within the period does not change the outcome.

What is a LIFO reserve?

The LIFO reserve is the difference between inventory valued under FIFO and under LIFO. Companies using LIFO must disclose this in their financial statements so analysts can compare them to FIFO-based competitors.

Journal Entries: Debits and Credits
2. Transaction Analysis
10 problems
Topic
Cost of Goods Sold - Perpetual Inventory vs. Periodic Inventory
4. Merchandising Operations
10 problems
Topic
Perpetual Inventory - Purchases
4. Merchandising Operations
10 problems
Topic
Perpetual Inventory - Freight Costs
4. Merchandising Operations
10 problems
Topic
Perpetual Inventory - Purchase Discounts
4. Merchandising Operations
9 problems
Topic
Perpetual Inventory - Purchasing Summary
4. Merchandising Operations
9 problems
Topic
Periodic Inventory - Purchases
4. Merchandising Operations
10 problems
Topic
Periodic Inventory - Freight Costs
4. Merchandising Operations
10 problems
Topic
Periodic Inventory - Purchase Discounts
4. Merchandising Operations
10 problems
Topic
Periodic Inventory - Purchasing Summary
4. Merchandising Operations
10 problems
Topic
Merchandising Company vs. Manufacturing Company
5. Inventory
8 problems
Topic
Physical Inventory Count, Ownership of Goods, and Consigned Goods
5. Inventory
10 problems
Topic
Specific Identification
5. Inventory
10 problems
Topic
Periodic Inventory - FIFO, LIFO, and Average Cost
5. Inventory
10 problems
Topic
Financial Statement Effects of Inventory Costing Methods
5. Inventory
10 problems
Topic
Inventory Errors
5. Inventory
10 problems
Topic
Lower of Cost or Market
5. Inventory
10 problems
Topic
Ratios: Gross Profit Rate
14. Financial Statement Analysis
10 problems
Topic
Ratios: Inventory Turnover
14. Financial Statement Analysis
10 problems
Topic
Ratios: Average Days in Inventory
14. Financial Statement Analysis
10 problems
Topic
GAAP vs. IFRS: Merchandising
15. GAAP vs IFRS
10 problems
Topic
GAAP vs. IFRS: Inventory
15. GAAP vs IFRS
10 problems
Topic
2. Transaction Analysis
5 topics 15 problems
Chapter
4. Merchandising Operations
14 topics 14 problems
Chapter
5. Inventory
7 topics 15 problems
Chapter
14. Financial Statement Analysis
15 topics 15 problems
Chapter
15. GAAP vs IFRS
13 topics 13 problems
Chapter
Back to all calculatorsAll calculators