Ending Inventory Calculator
Ending inventory is the value of goods still unsold at the end of an accounting period. This calculator uses the basic inventory equation to solve either for ending inventory or for cost of goods sold. In the default mode, it starts with beginning inventory, adds net purchases, subtracts cost of goods sold, and returns the ending inventory value. In the alternate mode, it starts with ending inventory and solves for COGS.
Inventory accounting connects the balance sheet and income statement. Goods that remain on hand become ending inventory, an asset. Goods that are sold become cost of goods sold, an expense. Moving even a small amount between those two buckets can change gross profit, taxable income, working capital, and inventory turnover. That is why the inputs must use the same period and the same cost basis.
The calculator is also useful for quick reasonableness checks after a count. If the formula says ending inventory should be $15,000 but the count supports $9,000, the difference points to shrinkage, cutoff errors, missing purchase entries, or COGS that needs review before the books close.
How the calculator works
Choose “COGS known” if your income statement or accounting system already gives cost of goods sold. Enter starting inventory, net purchases, and COGS. The calculator adds starting inventory and purchases to get goods available for sale, then subtracts COGS to estimate ending inventory.
Choose “Ending inventory known” if you have a physical count or inventory valuation and want the implied COGS. In that mode, the calculator subtracts ending inventory from goods available for sale. It rejects negative values, negative COGS, negative ending inventory, and cases where ending inventory is greater than goods available for sale.
The tool also calculates inventory turnover from COGS and average inventory. Average inventory is the simple average of starting and ending inventory. If average inventory is zero, turnover is shown as zero to avoid division by zero. For cash planning around purchasing, pair this page with the budget calculator, sales tax calculator, and accounting profit calculator.
Formula
Goods available for sale are the goods you started with plus net purchases:
When COGS is known, ending inventory is:
When ending inventory is known, the calculator solves for COGS:
Inventory turnover is:
Example: calculating ending inventory
Use the default “COGS known” mode: starting inventory of $25,000, net purchases of $30,000, and cost of goods sold of $40,000. First, the calculator finds goods available for sale:
Then it subtracts COGS:
The primary result is $15,000 of ending inventory. The detail panel shows $55,000 of goods available for sale, $15,000 of ending inventory, and $40,000 of cost of goods sold. Average inventory is:
So turnover is:
The calculator displays turnover as 2x. That means the period’s COGS equals two times average inventory.
Accounting context
Ending inventory is not a sales value. It should be measured at cost under the inventory method used by the business, such as FIFO, weighted average, or another accepted method. Retail price, replacement price, and online listing price can all be different from the accounting cost assigned to inventory. Mixing these values is one of the fastest ways to overstate or understate gross profit.
The formula also depends on cutoff. Purchases recorded before period-end should match goods received before period-end under the company’s policy. Sales recorded before period-end should match inventory relieved to COGS. If goods are in transit, consigned, damaged, obsolete, or counted twice, the formula may look clean while the accounting records are wrong.
Turnover gives a practical operating signal. A low turnover ratio may suggest slow-moving goods, overbuying, weak demand, or obsolete stock. A high ratio may indicate efficient purchasing, but it may also reveal inventory levels so lean that the company risks stockouts. Compare turnover only with similar businesses and similar accounting methods. If markdowns are part of the inventory strategy, the percent off calculator can help translate pricing decisions into expected revenue effects.
Tips for reliable results
- Use cost values, not selling prices.
- Use net purchases after returns, allowances, and discounts.
- Keep beginning inventory, purchases, COGS, and ending inventory in the same accounting period.
- Investigate any negative result rather than forcing it to zero.
- Reconcile the formula to physical counts or a perpetual inventory report.
- Review turnover alongside gross margin and cash needs, not in isolation.
Sources
- AccountingTools, Ending Inventory — inventory equation and ending inventory overview.
- IRS, Publication 538: Accounting Periods and Methods — inventory and accounting method context.
- AccountingCoach, Inventory and Cost of Goods Sold — explanation of inventory, COGS, and related statements.