Audited 31 Jul 2026·Last updated 28 Oct 2026·3 citations·Tier 2·0 uses

Ending Inventory Calculator

Roll inventory forward: beginning inventory plus net purchases or production, minus cost of goods sold, gives the cost of stock still on hand.

Ending Inventory Calculator

Ending inventory
40,000
The cost of inventory still on hand at period end, in the same currency as the inputs: goods available for sale minus cost of goods sold.
Model scope
Inventory-rollforward arithmetic, not accounting advice; all figures must share period, currency, ownership, and cost basis, while write-downs, shrink, returns, freight, manufacturing overhead, FX, and method changes require the records and applicable standards.

Background.

Every unit of stock a business pays for ends the period in one of two places: sold, or still on the shelf. That is the whole logic of the inventory rollforward. Add what you started with to what you bought or made and you have the goods available for sale; take away the cost of what went out as sales, and what is left is ending inventory, the asset on the balance sheet that becomes next period's opening balance.

Many small businesses meet the equation backwards. Under a periodic system you count the shelves at year end, value the count, and back into cost of goods sold. Running it forwards is useful when a count is not possible or not yet done: monthly or quarterly figures between annual stocktakes, a check on what the books say should be there before the count starts, or an estimate of stock lost in a fire or burglary. The gap between the rolled-forward figure and a physical count is shrinkage, from theft, breakage, spoilage or miscounted deliveries, and it is often the most useful number the exercise produces.

The arithmetic is trivial; the discipline is in the inputs. All three figures must be at cost rather than selling price, in one currency, for one period, and under one cost-flow method, whether FIFO, weighted average or, under US GAAP only, LIFO. Net purchases should already reflect returns to suppliers, purchase discounts and inbound freight, and a manufacturer enters the cost of goods completed rather than raw purchases.

Mistakes here do not stay put. An ending inventory overstated by 5,000 understates cost of goods sold by 5,000 and inflates this period's gross profit by the same amount, then reverses next period when that figure opens the books.

What is ending inventory calculator?

Ending inventory is the cost of goods a business still holds when an accounting period closes: stock waiting to be sold and, for a manufacturer, raw materials and work in progress as well. It is reported as a current asset at cost, or at a lower amount if the goods have lost value. Because it is simply the part of goods available for sale that was not expensed as cost of goods sold, the two figures always divide one total between them, and an error in either is an equal and opposite error in the other.

How to use this calculator.

  1. Enter Beginning inventory as the closing inventory on the previous period's balance sheet. The page requires a figure above zero, so it does not cover a business's very first period.
  2. Enter Net purchases / production added: purchases at cost less returns, allowances and supplier discounts, plus freight-in and non-recoverable import duties. A manufacturer enters the cost of goods manufactured instead.
  3. Enter Cost of goods sold for the same period, taken from perpetual inventory records or, if you only know sales, estimated as sales × (1 − gross margin).
  4. Compare the ending inventory with a physical count if you have one. A shortfall is shrinkage or a recording error and is worth tracing before the books close.

The formula.

ending inventory = beginning inventory + purchases - COGS

Ending inventory = beginning inventory + net purchases − cost of goods sold. The first two terms together make goods available for sale, the total cost of everything the business could have sold during the period. Cost of goods sold is the share of that total recognised as an expense; ending inventory is the share carried forward. There are no constants and no unit conversion, so the answer is in whatever currency the inputs share. All three inputs must be positive, and cost of goods sold may not exceed goods available for sale, because a business cannot sell stock it never had; a figure that would come out negative points to a missing purchase or a mismatched period. Each input moves the result one for one, upwards for the first two and downwards for cost of goods sold.

A worked example.

Example

A shop opens the quarter with 50,000 of stock at cost and buys 120,000 more, net of returns and including freight, so goods available for sale come to 50,000 + 120,000 = 170,000. Its records put the cost of goods sold for the quarter at 130,000. What should remain is 170,000 − 130,000 = 40,000 of ending inventory. Now suppose the stocktake finds only 37,500. The missing 2,500 is shrinkage, about 1.47% of goods available. Once the books are corrected to the count, cost of goods sold rises to 132,500 and the quarter's gross profit falls by the same 2,500.

cost Of Goods Sold130,000
net Purchases120,000
beginning Inventory50,000

Frequently asked questions.

How can I estimate ending inventory without counting the stock?
Use the gross profit method: estimate cost of goods sold as sales × (1 − gross margin), then subtract it from goods available. With sales of 200,000 at a 35% margin, cost of goods sold is 130,000, and on 170,000 available the estimate is 40,000. It suits interim reports and insurance claims, not year-end accounts.
Does choosing FIFO or LIFO change the ending inventory?
Yes, whenever purchase prices move. With rising prices, FIFO leaves the newest, dearest units in stock, giving a higher ending inventory and lower cost of goods sold; LIFO does the reverse. The method changes the cost of goods sold you enter here. IAS 2 does not permit LIFO, so it is available only under US GAAP.
Should freight, import duty and VAT be included in net purchases?
Freight-in, handling and import duties are part of what stock cost to acquire, so they belong in net purchases, while trade discounts and rebates come off. VAT or sales tax that the business reclaims from the tax authority is not an inventory cost and stays out.
My physical count is lower than the calculated figure. What happened?
The difference is shrinkage or a recording gap: theft, damage, spoiled goods, deliveries booked but never received, or sales not recorded. Check receiving records and unprocessed returns first. Once explained, the books are adjusted down to the count, and the write-off is usually charged to that period's cost of goods sold.
Why does an inventory error affect two years of profit?
Ending inventory overstated by 5,000 makes cost of goods sold 5,000 too low and profit 5,000 too high this year. The same overstated figure then opens next year, making that year's cost of goods sold 5,000 too high, so the two errors cancel over the pair of years but both statements are wrong.
How does ending inventory feed into inventory turnover?
Turnover is cost of goods sold divided by average inventory. Using the example, the average of 50,000 and 40,000 is 45,000, and 130,000 ÷ 45,000 gives about 2.89 turns over the quarter. A falling ending balance with steady sales lifts turnover, which usually signals leaner stock rather than higher sales.

How this page was produced

Published by
Quanta Calculator
Primary sources
3 cited below
Method
ending inventory = beginning inventory + purchases - COGS
Published
Last verified

Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.

Embed

Quanta Pro

Paid features are coming later.

  • All 1560 calculators remain free
  • No billing is enabled
Coming soon