Calculatorism

Ending Inventory Calculator

From opening inventory, purchases and COGS, compute the closing inventory using the basic inventory formula.

Input Data

Beginning Inventory
HK$
Purchases
HK$
Cost Of Goods Sold
HK$

Results

Inventory value at period end.
HK$250,000

At a glance:Ending inventory = opening inventory + purchases − COGS. It is the basic inventory identity, the mirror of the COGS identity (COGS = opening + purchases − ending). Use it for period-end stocktaking, gross-margin checks and inventory accounting. A negative result usually means an input error or stockout and should be reviewed.

Formula

Ending inventory = Opening inventory + Purchases − COGS.

COGS = Opening inventory + Purchases − Ending inventory (equivalent).

How to Use

  1. Enter the opening inventory value.
  2. Enter purchases during the period.
  3. Enter the COGS for the period.
  4. View the closing inventory.

Ending inventory at different inputs (HK$)

Ending inventory at different inputs (HK$)
OpeningPurchasesCOGSEnding inventory
100,000300,000250,000150,000
50,000200,000280,000-30,000
80,000150,000190,00040,000

Ending = opening + purchases − COGS. The second row is negative — usually an input error or stockout to review, not a real negative stock.

Case Studies

Case 1: Ending inventory and gross margin

A shop: opening HK$100,000, purchases HK$300,000, COGS HK$250,000. Ending = 100,000 + 300,000 − 250,000 = HK$150,000.

Cross-check: COGS = opening + purchases − ending = 100,000 + 300,000 − 150,000 = 250,000 — matches, identity balanced.

If revenue is HK$400,000, gross profit = 400,000 − 250,000 = HK$150,000, gross margin 37.5%. A wrong ending inventory would distort COGS and the margin, so ending inventory is the pivot linking profit and stock.

Case 2: A negative result is an alert, not negative stock

Another period: opening HK$50,000, purchases HK$200,000, COGS HK$280,000. Ending = 50,000 + 200,000 − 280,000 = HK$−30,000.

Physical stock cannot be negative, so this is an alert: likely the COGS was overstated, purchases understated, or a stockout not recorded.

Practice: recheck the inputs rather than accept '−30,000'. Once corrected (e.g. COGS should be 230,000), ending = 20,000, sensible. This calculator only does the identity; for true ending value under FIFO/WAC use the method calculators and reconcile with physical stock.

FAQ

What is the relationship between ending inventory and COGS?

They are two sides of the same accounting identity: COGS = opening + purchases − ending; equivalently ending = opening + purchases − COGS. Larger COGS leaves less ending inventory; more purchases raises ending inventory. The identity must balance, so ending inventory and COGS are mutually checked in stocktaking and gross-margin review.

Why can ending inventory be negative?

In the formula, if COGS exceeds opening + purchases, ending turns negative — physically impossible, so it usually signals an input error, a stockout not recorded, or mis-counted COGS. Treat a negative result as an alert to recheck figures; it does not mean 'debt'.

Does this calculator apply FIFO or weighted average?

This calculator only uses the quantity identity (opening + purchases − COGS) and does not pick a costing method. Under FIFO, weighted average or specific identification, the ending inventory value differs. This tool gives the balance identity result; for method-based valuation use the FIFO/WAC calculators.

Why is ending inventory a core accounting pivot?

Ending inventory is far more than a closing number — it sits at the junction of the income statement and the balance sheet and directly drives several figures. On the income statement, COGS = opening + purchases − ending; the larger the ending inventory (more left unsold), the lower the COGS, the higher the gross profit and pre-tax profit — so ending inventory is a lever on profit. On the balance sheet it is current assets (stock), affecting working capital and current ratio. On cash flow, a rising inventory ties up cash (negative operating swing); a falling inventory releases cash. So a miscounted ending inventory distorts profit, assets and cash flow at once. This calculator uses the identity (opening + purchases − COGS) to size it; for true value under FIFO/WAC use the method calculators. In practice also reconcile physical stock with the book figure and investigate variances.

How do I use it with the COGS identity to check the gross margin?

Ending inventory and COGS are two outputs of one identity and together let you check the gross margin. Steps: (1) from records, opening inventory + purchases − ending inventory = COGS (this calculator does the reverse; either way they must balance); (2) gross profit = revenue − COGS, gross margin = gross profit ÷ revenue. If the ending inventory is wrong, COGS is wrong and so is the gross margin. Practical check: compute ending inventory two ways — physical stock valued by method, and the identity (opening + purchases − COGS from sales) — and compare; a big gap suggests mis-counted sales, purchases or stock. For method-based ending value (FIFO/WAC) use the dedicated calculators; keep the identity as a cross-check. Note the identity gives the balance figure, not the costing method's value — under FIFO/WAC the ending value differs, so pair them.

Related Tools

References

Content review: Calculatorism Finance Team. Results are for reference only; please refer to the relevant authorities for the official figures.

Found a problem with the results?

If this calculator's result is wrong, or you have any question about the calculation logic, please let us know. You are viewing:Ending Inventory Calculator(/finance/ending-inventory)。