How to Calculate Ending Inventory Using FIFO, LIFO and Weighted Average

Ending inventory is the value of goods a business still has available for sale at the end of an accounting period. It matters because it affects cost of goods sold, gross profit, taxable income, and the accuracy of financial statements. To calculate it, an accountant must know the cost of inventory available for sale, the number of units sold, and the inventory costing method being used.

TLDR: Ending inventory is calculated by assigning costs to the units that remain unsold at the end of a period. Under FIFO, the remaining inventory is valued using the most recent costs; under LIFO, it is valued using the oldest costs. Under the weighted average method, the business calculates an average cost per unit and applies it to ending units. The method chosen can significantly change reported profit, especially when prices are rising or falling.

Basic Formula for Ending Inventory

The general formula is:

Ending Inventory = Beginning Inventory + Purchases − Cost of Goods Sold

However, when using FIFO, LIFO, or weighted average, the key task is determining which costs are assigned to goods sold and which costs remain in ending inventory. The physical units may be the same under all methods, but the cost value assigned to those units can be different.

Example Data Used for All Three Methods

Assume a business has the following inventory activity during the month:

Transaction Units Cost per Unit Total Cost
Beginning inventory 100 $10 $1,000
Purchase 1 200 $12 $2,400
Purchase 2 150 $14 $2,100

The business has 450 units available for sale at a total cost of $5,500. If it sells 300 units, then 150 units remain in ending inventory.

How to Calculate Ending Inventory Using FIFO

FIFO stands for first in, first out. This method assumes that the oldest inventory is sold first. As a result, the units left in ending inventory are assumed to come from the most recent purchases.

Using the example, the business sold 300 units. Under FIFO, those sold units are taken from the oldest layers:

  • 100 units from beginning inventory at $10 = $1,000
  • 200 units from Purchase 1 at $12 = $2,400

Total cost of goods sold under FIFO is $3,400. The remaining 150 units come from Purchase 2, which cost $14 each:

Ending Inventory under FIFO = 150 × $14 = $2,100

FIFO often produces a higher ending inventory value when prices are rising, because newer, higher-cost items remain on the balance sheet. It may also produce higher gross profit because older, lower costs are assigned to cost of goods sold.

How to Calculate Ending Inventory Using LIFO

LIFO stands for last in, first out. This method assumes that the newest inventory is sold first. Therefore, the units left in ending inventory are assumed to come from the oldest available costs.

Using the same example, the 300 units sold are taken from the most recent layers:

  • 150 units from Purchase 2 at $14 = $2,100
  • 150 units from Purchase 1 at $12 = $1,800

Total cost of goods sold under LIFO is $3,900. The remaining inventory consists of:

  • 100 units from beginning inventory at $10 = $1,000
  • 50 units from Purchase 1 at $12 = $600

Ending Inventory under LIFO = $1,000 + $600 = $1,600

When prices rise, LIFO usually produces a lower ending inventory value and higher cost of goods sold. This may reduce taxable income in jurisdictions where LIFO is allowed. However, LIFO is not permitted under some accounting standards, such as IFRS.

How to Calculate Ending Inventory Using Weighted Average

The weighted average method assigns the same average cost to every unit available for sale. Instead of tracking specific cost layers, the accountant calculates an average cost per unit and applies it to both sold units and ending inventory.

The formula is:

Weighted Average Cost per Unit = Total Cost of Goods Available for Sale ÷ Total Units Available for Sale

Using the example:

$5,500 ÷ 450 units = $12.22 per unit

The business has 150 units remaining, so ending inventory is:

Ending Inventory under Weighted Average = 150 × $12.22 = $1,833.33

Cost of goods sold is:

300 × $12.22 = $3,666.67

The weighted average method smooths price fluctuations. It often produces results between FIFO and LIFO when inventory costs are changing.

Comparison of Results

Method Ending Inventory Cost of Goods Sold
FIFO $2,100.00 $3,400.00
LIFO $1,600.00 $3,900.00
Weighted Average $1,833.33 $3,666.67

This comparison shows how the same physical inventory can produce different financial results. FIFO gives the highest ending inventory in this rising-cost example, while LIFO gives the lowest. Weighted average falls between the two.

Steps for Calculating Ending Inventory

  1. List beginning inventory: Include units, cost per unit, and total cost.
  2. Add purchases: Record each purchase layer or batch during the period.
  3. Calculate units available for sale: Add beginning units and purchased units.
  4. Determine units sold: Use sales records or inventory counts.
  5. Find ending units: Subtract units sold from units available for sale.
  6. Apply the selected cost method: Use FIFO, LIFO, or weighted average to assign costs.
Image not found in postmeta

Why the Method Matters

The selected inventory method affects both the balance sheet and the income statement. Ending inventory appears as a current asset, while cost of goods sold reduces revenue on the income statement. A higher ending inventory usually means lower cost of goods sold and higher gross profit. A lower ending inventory usually means higher cost of goods sold and lower gross profit.

Consistency is also important. A business should use the same inventory method from period to period unless there is a valid reason to change. This makes financial results easier to compare over time.

FAQ

What is ending inventory?

Ending inventory is the value of unsold goods remaining at the end of an accounting period. It becomes the beginning inventory for the next period.

Which method gives the highest ending inventory?

When prices are rising, FIFO usually gives the highest ending inventory because the newest, higher-cost purchases remain in inventory.

Which method gives the lowest taxable income?

In a rising-price environment, LIFO often gives the lowest taxable income because it assigns newer, higher costs to cost of goods sold. This depends on whether LIFO is allowed under the applicable accounting rules.

Is weighted average easier than FIFO or LIFO?

Weighted average is often simpler because it uses one average unit cost instead of tracking multiple cost layers. It is especially useful for businesses with large volumes of similar items.

Can a business switch inventory methods?

A business may be able to switch methods, but the change usually must be justified and disclosed. Accountants typically follow applicable financial reporting and tax rules before making a change.