Ending Inventory Calculator

Calculate ending inventory value for the accounting period with three standard methods: FIFO (first-in, first-out), LIFO (last-in, first-out), and weighted average (weighted average). Each method uses the same purchase and sales data, then compare the results in the Comparator tab — including COGS and gross profit per method.

Educational note: this calculator is educational and is not professional accounting advice. For official financial statements, consult an accountant.

Metode FIFO (First-In, First-Out)

Units that were purchased first are assumed sold first. Ending inventory is valued from the newest purchase layer (latest prices).

QtyPrice per unit (Rp)

Metode LIFO (Last-In, First-Out)

Units that were purchased last are assumed sold first. Ending inventory is valued from the oldest layer (including beginning inventory).

QtyPrice per unit (Rp)

Weighted Average Method

One HPP per unit is computed from total cost divided by total units available, then used to value both units sold and ending inventory.

QtyPrice per unit (Rp)

Comparator: FIFO vs LIFO vs Weighted Average

One set of purchase and sales data computed with all three methods at once — compare ending inventory value, COGS, and gross profit.

QtyPrice per unit (Rp)
The calculations on this page are edukasional and is not professional accounting advice. The method used for financial reporting must be consistent and comply with applicable standards — consult an accountant.

Basic ending-inventory formula

Value: Ending inventory = Beginning inventory + Purchases − COGS (cost of goods sold).
Unit: Ending units = Units available − Units sold.

Verified example (beginning inventory 100 units @ Rp10,000; purchases 200 units @ Rp11,000 and 150 units @ Rp12,000; 300 units sold):
FIFO → ending inventory Rp1.800.000,00, HPP Rp3.200.000,00 · LIFO → ending inventory Rp1.550.000,00, HPP Rp3.450.000,00 · Weighted average → ending inventory Rp1.666.666,67, HPP Rp3.333.333,33.

Frequently asked questions

What is ending inventory?

Ending inventory is the value and quantity of merchandise still on hand at the end of the accounting period. On the balance sheet, ending inventory is recorded as a current asset, while the cost of units sold is recorded as COGS (cost of goods sold) on the income statement.

What is the basic ending-inventory formula?

The basic formula: Ending inventory = Beginning inventory + Purchases − COGS. In units: Ending units = Units available − Units sold. FIFO, LIFO, and weighted average are three different ways to determine how much cost goes to COGS and how much remains as ending inventory.

What is the FIFO method?

FIFO (first-in, first-out) assumes the units purchased first are sold first. As a result, ending inventory is valued from the newest purchase layer (latest prices). When prices tend to rise, FIFO produces the highest ending inventory value and the lowest COGS of the three methods.

What is the LIFO method?

LIFO (last-in, first-out) assumes the units purchased last are sold first, so ending inventory is valued from the oldest layer including beginning inventory. When prices tend to rise, LIFO produces the highest COGS and the lowest gross profit.

What is the weighted-average method?

The weighted-average method computes one COGS per unit = total cost of goods available divided by total units available. This same per-unit COGS is used to value both units sold and units remaining, so the result falls between FIFO and LIFO when prices move in one direction.

When is each method commonly used?

FIFO is commonly used for perishable or expirable goods because their physical flow is genuinely FIFO, and when a company wants the balance-sheet inventory value close to current cost. Weighted average is common for homogeneous goods or commodities that are hard to tell apart by batch. LIFO is used mainly by some US companies for tax reasons when prices rise — with the important caveat in the next answer.

Is the LIFO method allowed by accounting standards?

IFRS (IAS 2 Inventories) explicitly prohibits the LIFO method; only FIFO and weighted average are allowed for IFRS-based reporting. Indonesia uses PSAK 14, which adopts IAS 2, so the same rule applies. US GAAP (ASC 330) allows all three methods. The chosen method must be applied consistently and disclosed in the financial-statement notes.

Can this calculator’s results be used for official financial statements?

No. This calculator is educational and is not professional accounting advice. Preparing financial statements involves standards judgment, method consistency, and disclosures that an accountant must handle. Consult a licensed accountant for official reporting decisions.

Free tool by NRTechStudio