Published Updated
By LogisticsMaterial Team · Updated November 1, 2026
Quick answer: How to calculate ending inventory? Add your beginning inventory to purchases, then subtract the cost of goods sold. For example, 20,000 plus 35,000 minus 38,000 gives 17,000. If you lack records, count the stock and multiply by unit cost, or estimate with the retail method or gross profit method.
Guide contents
What is ending inventory?
Ending inventory is the value of the stock you still own at the end of an accounting period. It is what is left on the shelves, in the racks and in the back room after sales, returns and the odd mystery carton. Accountants love the number. Warehouse teams love it more when it matches the system. Learning to calculate ending inventory takes minutes and saves hours at year-end.
The figure matters for three reasons. It sets your cost of goods sold, it appears on the balance sheet, and it becomes the beginning inventory of the next period. Learning how to calculate ending inventory correctly matters, because one wrong figure travels into every report that follows, like a pallet with the wrong label.
This guide shows how to calculate ending inventory with four easy methods, then covers the beginning inventory formula, whether inventory is a current asset and how goods in transit are treated. Every example uses simple numbers you can copy into a sheet.
How to calculate ending inventory: the basic formula
The basic method is the standard way to calculate ending inventory when you keep purchase and sales records. Add the purchases of the period to the beginning inventory, then subtract the cost of goods sold. Many people search for the formula of ending inventory when they really need this one line.
Ending inventory = Beginning inventory + Purchases – Cost of goods sold
- Find the beginning inventory. It is the ending inventory of the previous period, taken from last period’s balance sheet.
- Add the purchases. Include freight-in and duties paid on goods you bought, because they are part of inventory cost.
- Subtract the cost of goods sold. Use what the goods cost you, not the price you charged the customer.
- Check the result. The answer cannot be negative, and it should be close to what your last count showed.
Here is a worked example for one quarter of a small distributor.
| Item | Amount |
|---|---|
| Beginning inventory | $20,000 |
| Purchases during the quarter | $35,000 |
| Goods available for sale | $55,000 |
| Cost of goods sold | $38,000 |
| Ending inventory | $17,000 |
So the ending inventory is $17,000, and that is how to calculate ending inventory for a single quarter. If the shelves hold only $15,500 of stock when you count them, the $1,500 gap is shrinkage, damage or a recording error, and it deserves a closer look.
4 easy methods to calculate ending inventory
The basic formula is the default, but you will not always have clean records. Use the method that fits the data you actually have.

Method 1: how to calculate ending inventory with the basic formula
Use it when purchases and cost of goods sold are tracked all period. It is the quickest answer to how to figure out ending inventory, and it is the one most accounting software calculates for you.
Method 2: calculate ending inventory with a physical count
To calculate ending inventory by count, count every unit, multiply by its unit cost and add the results. This is the most accurate method, and auditors expect it at least once a year. Choose a cost flow first, such as FIFO, LIFO or weighted average. Our guide to inventory costing methods explains how each one changes the number. Pre-numbered inventory tags keep a physical count controlled, so every unit is counted once.
Example: 400 units of item A at $12.50 give $5,000, and 250 units of item B at $20 give $5,000. The ending inventory is $10,000. For a clean count process, follow our steps for a physical inventory.
Method 3: calculate ending inventory with the retail method
Stores that price everything at retail can calculate ending inventory without counting each item. Compare the cost of goods available with their retail value, then apply that ratio to the unsold retail value.
- Cost-to-retail ratio. $55,000 at cost divided by $80,000 at retail is 68.75 percent.
- Ending inventory at retail. $80,000 minus $50,000 of sales is $30,000.
- Ending inventory at cost. $30,000 times 68.75 percent is $20,625.
Method 4: the gross profit method
Use it to calculate ending inventory when records are lost, after a fire or flood, or for a quick monthly estimate. It relies on your usual gross margin, so treat the answer as an estimate rather than an audited number.
- Estimate the cost of goods sold. With $50,000 of sales and a 30 percent gross margin, the cost of goods sold is $35,000.
- Subtract it from goods available. $55,000 minus $35,000 gives an ending inventory of $20,000.
Which method should you use?
| Method | Best for | Accuracy |
|---|---|---|
| Basic formula | Businesses with good records | High |
| Physical count | Year-end and audits | Highest |
| Retail method | Retail stores | Medium |
| Gross profit method | Quick estimates or lost records | Lower |
Beginning inventory formula: how to calculate beginning inventory
The beginning inventory formula is simple: beginning inventory equals the ending inventory of the previous period. Your opening balance this month is last month’s closing balance. For a brand new business it is zero.
If you lost the opening figure, rearrange the formula. This is how to find beginning inventory from the other numbers.
Beginning inventory = Ending inventory + Cost of goods sold – Purchases
Using the earlier example: $17,000 plus $38,000 minus $35,000 equals $20,000. The same logic gives the closing inventory formula, since closing and ending inventory mean the same thing. Use the same steps to calculate ending inventory for any period.
Is inventory a current asset?
So, is inventory a current asset? Yes. Inventory is a current asset because a business expects to sell it, or use it in production, within one year or one operating cycle. It sits on the balance sheet below cash and receivables, and it is normally valued at the lower of cost and what you could realistically sell it for.
That is why a mistake when you calculate ending inventory changes more than one line. It moves current assets, the cost of goods sold, gross profit and taxable income all at once. If you want the wider picture of how stock is planned and controlled, start with what inventory management is.
How ending inventory changes profit and tax
One number moves several lines. When ending inventory is higher, the cost of goods sold is lower and gross profit is higher, and the reverse is also true. Overstate it and you pay tax on profit you never earned. Understate it and you hide profit, which invites questions in an audit.
Take the earlier quarter. Sales were $60,000 and the cost of goods sold was $38,000, so gross profit was $22,000. Now suppose the ending inventory was wrongly entered as $18,500 instead of $17,000. The cost of goods sold falls to $36,500 and gross profit rises to $23,500. Same shelves, same sales, a different result.
That is why lenders, investors and tax authorities look at inventory first when the numbers look too good.
Landed cost changes the winner
Duty and fees decide which supplier is really cheaper. Estimate them before you commit, with our free calculator.
Try the calculatorPerpetual or periodic: how your system changes the method
With a perpetual system, every receipt and sale updates the stock record at once, so the system already shows ending inventory and the count only verifies it. With a periodic system, the figure changes only when you count, so the count or an estimate creates the number. If you are choosing software, read our guide to the perpetual inventory system and its features.
Small shops often start periodic and move to perpetual once barcode scanning and a simple stock sheet cost less than the mistakes they prevent. Either way, you can calculate ending inventory with the same formula.
Ending inventory for retailers, manufacturers and online stores
- Retailers count finished goods and often use the retail method for quick estimates.
- Manufacturers count raw materials, work in process and finished goods, and each category has its own value.
- Online stores include stock held at fulfilment centres and returns that are back on the shelf, and exclude items already sold but not yet shipped.
A month-end checklist to calculate ending inventory
- Set the cut-off time and stop receiving or shipping while you count.
- Match every receipt to a purchase order and every shipment to an invoice.
- Count the stock in bins, racks and the back room, and tag what is counted.
- Value each item with one consistent cost method.
- Add goods you own that are still in transit, and remove consignment stock.
- Write down damaged or obsolete items to what they can realistically sell for.
- Compare the count to the system, investigate differences and post adjustments.
- Save the final report so next month’s beginning inventory is easy to prove.
A good checklist turns a two-day panic into a two-hour routine, and it is the safest way to figure out ending inventory every month. Run it monthly and the year-end count becomes boring, which is exactly what accountants want.
Goods in transit: are they part of your ending inventory?
This is the question that surprises most students and many buyers. Goods on a truck or a vessel on the last day of the period belong in the buyer’s inventory only if the buyer owns them at that moment. Ownership follows the sales terms, not the date the boxes arrive. Check this before you calculate ending inventory.
- Shipping point terms: ownership passes when the seller hands the goods to the carrier, so the buyer includes goods in transit in its ending inventory.
- Destination terms: ownership passes on delivery, so the buyer leaves them out until they arrive and the seller still counts them.
- Consignment goods: stock held for someone else is never yours, even when it is sitting in your warehouse.
In international trade, check the agreed Incoterms rule and the contract, and ask your forwarder for the transfer date. Our freight forwarding guides explain how those handover points work. For the full rules, a comparison table and a year-end example, read our guide to goods in transit and who owns them.
5 mistakes that break how you calculate ending inventory
- A fuzzy cut-off. Receipts and shipments around the last day land in the wrong period.
- Counting dead stock at full cost. Damaged or obsolete items should be written down.
- Forgetting goods in transit. Or including them when you do not own them yet.
- Mixing cost methods. Pick FIFO, LIFO or average cost and stay consistent.
- Skipping the reconciliation. Always compare the count with the system and investigate the difference.
What to do after you calculate ending inventory
Once you know how to calculate ending inventory, put the figure to work. Add it to the beginning inventory and divide by two to calculate average inventory, which feeds turnover and days on hand. Compare it with last quarter, ask why it moved and check it against sales.
For the full map of topics, from forecasting to stock control, visit the inventory management hub. Importing the stock yourself? Estimate landed cost with the free import tariff calculator before it hits your books.
Sourcing overseas? Pick the forwarder early.
Compare freight forwarders on lead time, reliability and service, with our free evaluation checklist.
Get the checklistTrusted sources for inventory accounting
- IRS Publication 538 for how US businesses treat inventories for tax
- IFRS: IAS 2 Inventories for international valuation rules
- ICC Incoterms rules for the point where risk passes in a sale
This guide is general education, not accounting or tax advice. Check your local rules or ask a qualified accountant before you file.
Frequently asked questions
How do you calculate ending inventory?
Add purchases to the beginning inventory and subtract the cost of goods sold. For example, $20,000 plus $35,000 minus $38,000 gives $17,000. If you lack records, count the stock or use the retail or gross profit method.
What is the formula of ending inventory?
Ending inventory equals beginning inventory plus purchases minus cost of goods sold.
How do you figure out ending inventory without a count?
Use the gross profit method. Estimate the cost of goods sold from sales and your usual margin, then subtract it from the goods available for sale.
How do you calculate beginning inventory?
It equals the ending inventory of the previous period. If it is missing, use ending inventory plus cost of goods sold minus purchases.
Is inventory a current asset?
Yes. Inventory is a current asset because it is expected to be sold or used within a year or one operating cycle.
Are goods in transit included in a purchaser’s inventory?
Only when the buyer owns them. Under shipping point terms the buyer includes them, and under destination terms the buyer waits until delivery.
Is closing inventory the same as ending inventory?
Yes. Closing inventory and ending inventory both mean the stock value at the end of the period.
Is ending inventory the same as average inventory?
No. Ending inventory is a single closing value. Average inventory combines the beginning and ending values to smooth the period.









