Understanding the ending inventory calculator — concept and principle
This calculator finds ending inventory at cost: what you started with, plus what you bought, minus what you sold. If you know cost of goods sold from your records, it uses that; if not, it estimates COGS with the gross profit method from sales and a typical margin. It also shows goods available for sale, gross profit, inventory turnover and days of inventory. Retailers, bookkeepers and insurance claim preparers use it.
How it is calculated
- Goods available for sale = beginning inventory + net purchases (including freight-in)
- Gross profit method: COGS ≈ net sales × (1 − gross margin %)
- Records method: COGS = the figure from your records
- Ending inventory = goods available for sale − COGS
- Inventory turnover = COGS ÷ average inventory, with average = (beginning + ending) ÷ 2
- Days of inventory = 365 × average inventory ÷ COGS
The principle
Inventory works like a tank: what flows in (beginning stock plus purchases) either flows out as goods sold or stays in the tank. Knowing three of the four quantities gives the fourth. When there is no stock count, for a monthly report or to estimate stock lost in a fire or theft, the gross profit method uses a recent gross margin to turn sales into an estimate of COGS. The estimate is only as good as that margin: price changes, a different product mix or shrinkage make the true figure differ.
Worked example
Defaults: beginning inventory 40,000; purchases 185,000; gross profit method; net sales 310,000; margin 42%.
- Goods available = 40,000 + 185,000 = $225,000.
- COGS ≈ 310,000 × (1 − 0.42) = $179,800.
- Ending inventory = 225,000 − 179,800 = $45,200.
- Gross profit = 310,000 − 179,800 = $130,200; margin 42%.
- Average inventory = (40,000 + 45,200) ÷ 2 = 42,600; turnover = 179,800 ÷ 42,600 = 4.22.
- Days of inventory = 365 × 42,600 ÷ 179,800 = 86.
| Beginning inventory (at cost) | Ending inventory |
|---|---|
| 10,000 | $15,200 |
| 20,000 | $25,200 |
| 30,000 | $35,200 |
| 40,000 | $45,200 |
| 50,000 | $55,200 |
| 60,000 | $65,200 |
| 80,000 | $85,200 |
How to read the result
The gross profit method gives a reasonable estimate between counts, but the year-end figure in your accounts must still come from a physical count. If a later count is well below the estimate, the difference suggests shrinkage, errors or a changed margin. Turnover and days of inventory show how long stock sits before it sells.
Common mistakes
- Using markup on cost instead of gross margin on sales.
- Using a margin from a period with very different prices or product mix.
- Leaving freight-in out of purchases.
- Treating the estimate as a substitute for a stock count in annual accounts.
Frequently asked questions
When is the gross profit method used?
For interim reports, for checking a physical count and for estimating inventory destroyed in a fire or lost to theft.
Is gross margin the same as markup?
No. Margin is profit ÷ sales; markup is profit ÷ cost. A 42% margin is a markup of about 72%.
Why might the estimate be wrong?
Because the margin changes with prices, discounts, product mix and shrinkage.
Sources: OpenStax, Principles of Accounting, Volume 1: Financial Accounting, section 10.2 "Calculate the Cost of Goods Sold and Ending Inventory Using the Periodic Method" · CFA Institute, "CFA Program Level II Financial Ratio List"