Skip to content

Ending Inventory Calculator

Closing stock from opening, purchases and COGS.

Calculate ending inventory from beginning inventory, purchases and cost of goods sold, and reconcile it against a physical count.

Written and maintained by Mohit PatelLast checked August 4, 2026How we build these

Optional, enter a counted value to see shrinkage.

Ending inventory

$35,000

beginning + purchases − COGS

Purchases$80,000
Cost of goods sold$75,000
Physical countnot entered
Net movement$5,000

How the Ending Inventory Calculator works

Ending inventory is opening stock plus what you bought minus what you sold. When the physical count disagrees with that figure, the gap is shrinkage, and quantifying it is the main reason the calculation is worth doing.

Also known as: closing inventory calculator · year end stock value · final inventory balance

The arithmetic

Ending inventory is beginning inventory plus purchases minus cost of goods sold. Rearranged, it is the figure that closes the period and opens the next one, and the same identity gives COGS when ending inventory is counted rather than derived.

The two directions matter. Deriving ending inventory from a COGS estimate produces a plug figure that absorbs every error; counting it physically and deriving COGS instead produces a COGS figure that includes shrinkage, which is usually the more honest arrangement.

How that looks in practice

Beginning inventory $3,200, purchases $37,800 over the year, and a physical count at year end valuing stock at $3,132.

COGS = 3,200 + 37,800 − 3,132 = $37,868. Against expected COGS of $37,440 from 2,080 units at $18, there is a $428 gap, about 24 units of shrinkage, or 1.1% of throughput.

Had ending inventory been derived from expected COGS instead, it would have been recorded at $3,560 and the shrinkage would have been invisible, sitting on the balance sheet as stock that does not exist.

Where this breaks down

The identity is arithmetic and always balances, which means any error simply moves into whichever term was calculated rather than measured. A business that derives ending inventory rather than counting it will never detect shrinkage, because the formula has nowhere to put it.

Goods in transit are the other common error. Stock paid for and shipped but not yet received belongs in inventory once title has passed, and whether it has depends on the incoterm, FOB origin means it is yours from the port, FOB destination means it is not.

What this changes

Count the stock and derive COGS, rather than the reverse. The difference between the two approaches is the entire visibility of shrinkage, damage and miscounting.

Then reconcile the counted figure against the system figure before adjusting. A large variance is more often a receiving or transaction error than genuine loss, and investigating it usually finds a correctable process rather than a thief.

Timing the count

A full physical count requires stopping movement, which is why it usually happens at the quietest point of the year. That timing is convenient and produces a figure least representative of normal operations, which matters if the number is used for anything other than the accounts.

Cycle counting, counting a rotating subset continuously, weighted so A items are counted most often, produces better accuracy with no shutdown and gives a running measure of how reliable the records are. Most businesses past a certain size move to it and keep an annual full count only where an auditor requires one.

Whichever method is used, the count has to be reconciled to a cut-off. Sales, receipts and transfers processed during the count are the largest single source of spurious variances, and freezing transactions for the counting window removes most of the investigation that follows.

It is worth reconciling the ending figure against the general ledger inventory account rather than only against the stock system. The two are maintained by different processes and they drift, usually because an adjustment was made in one and not the other.

Catching that at each period end keeps the gap to one period's worth. Catching it at a year end means investigating twelve months of movements to find where the two records parted company.

Where to go next

The Ending Inventory question rarely arrives on its own. These are the ones that usually come with it:

Not financial advice. Marketplace fees change, and they vary by country, plan and seller status. Every rate here is an editable default, not a quoted price, check the platform's current fee schedule before you price a product against it. This is not tax or business advice.

Frequently asked questions

What is the ending inventory formula?

Beginning inventory + purchases − cost of goods sold. Starting at £30,000, buying £80,000 and selling goods costing £75,000 leaves £35,000 of ending inventory.

Why does my physical count differ?

The difference is shrinkage: theft, damage, miscounting, receiving errors or unrecorded sales. A gap of 1-2% is common in retail. Consistently larger gaps point to a process problem worth investigating.

How do FIFO and LIFO change the figure?

They change which costs are assigned to sold units. With rising prices, FIFO leaves higher-cost stock on the balance sheet and reports higher profit; LIFO does the opposite. LIFO is not permitted under IFRS.

How often should I count physically?

Annually at minimum for accounts. Cycle counting, counting a portion continuously so everything is covered over a period, catches discrepancies far earlier than a single annual count and disrupts trading far less.

Related calculators