Maximizing retail profit often comes down to one thing: mastering your ending inventory formula. It represents what’s left on your shelves, and gives a pulse check on your margins, taxes, and overall cash flow.
According to IHL Group’s 2025 inventory distortion research, excess stock and stockouts cost retailers $1.73 trillion annually, showing the financial impact of poor inventory management. Getting ending inventory right is one of the most effective ways to protect your bottom line and stay competitive.
This guide breaks down how to calculate ending inventory with simple steps and practical tips, helping you manage your stock with more accuracy and less stress.
What is ending inventory?
Ending inventory (also known as closing inventory) is the total value of goods available for sale at the end of an accounting period.
Retailers use a closing inventory formula to help calculate net income, secure financing, and maintain accurate stock records. This figure is recorded on the balance sheet at either market value or cost, depending on your accounting method.
What is the ending inventory formula?
The simplest way to calculate ending inventory is using this formula:
Beginning inventory + net purchases − cost of goods sold (COGS) = ending inventory
The three components of the formula are:
- Beginning inventory. The total value of stock you have on hand at the start of the period. It’s carried over from the end of the previous period.
- Net purchases. The value of all new stock bought during the period, minus any returns, discounts, or allowances.
- Cost of goods sold (COGS). The direct costs of producing or purchasing the goods that were actually sold during this time.
For example, if your beginning inventory was worth $10,000 and you’ve invested $5,000 in new products, you’d be sitting on $15,000 worth of inventory.
Minus the $12,000 worth of products you’ve sold through the same period, ending inventory would be $3,000.
There are two ways you can determine ending inventory:
- Physical count. Manually counting every item in your warehouse or store.
- Estimation. Using valuation methods like first in, first out (FIFO), last in, first out (LIFO), or weighted average cost to track value through your accounting software.
Depending on the size of your operation, the ending inventory formula is a great way to save time. But even if you use the formula, periodic physical counts are essential because they:
- Verify your estimates and guarantee digital records match the stock on your shelves
- Reduce shrinkage by identifying missing inventory resulting from theft, damage, or administrative errors
What is inventory value?
Inventory value is the total dollar value of the inventory you have left to sell at the end of an accounting period.
On your balance sheet, this is a current asset. For example, if you start the month with $500 in stock and sell $300 worth, your inventory value is $200.
Waiting until the end of the year to check this number is risky. Tracking it monthly or quarterly ensures your financial health stays transparent, keeps your taxes accurate, and helps you spot retail shrinkage early.
According to the 2025 National Retail Security Survey, theft and errors cost retailers billions of dollars annually, and frequent tracking helps catch these gaps before they snowball. Regularly checking your inventory value keeps your margins protected and your reporting honest.
Why do you need the ending inventory calculation?
Your ending inventory balance isn’t just a metric to keep an eye on at year end. It’s an inventory valuation method to consider throughout the year. Here are four reasons why.
1. Accurate inventory count
“Completing a full physical inventory count is the best way to calculate your ending inventory and start the new year on the right foot,” says Jara Moser, digital marketing manager at Shopventory.
“While counting every product in the store seems tedious, it ensures the products on your shelves match what’s in your books. It also means getting eyes on inventory hiding in the corner of your backstore and discovering operational trends, such as receiving errors.”
For example, if the ending inventory for your homeware line is $5,000 but you only counted $4,650 worth of finished goods in your stockroom, you have phantom inventory and it’s time to investigate what’s causing inventory shrinkage. Employee theft, return fraud, or shoplifting could be the issue.
Accurate inventory counting helps plan your open-to-buy budget, too. There’s little sense in investing $10,000 in new stock if you have $7,500 in unsold inventory. Avoid relying on intuition and ordering excess safety stock if sellable products are lingering in your stockroom. A well-organized stockroom can help mitigate this issue.
2. Calculate net income
Net income is one of the most important financial metrics for retailers to consider. It’s the money left in your bank account after paying for expenses—such as staff salaries, tax, and production costs—over a given period, usually shown on an income statement.
Compare your ending inventory value against your net income to see whether you’re overpaying for goods or underpricing stock.
For example, if your ending inventory is $25,000 but your net income is just $20,000, you’re holding more money in inventory than you’ve generated in sales. Overpaying for stock could be the issue. Consider negotiating with suppliers or increasing product prices for a better ratio of net income to ending inventory.
3. Inform future reports
Once your year-end passes, the ending inventory recorded on your balance sheet acts as the beginning inventory for the following year. Get your calculations wrong, or use a combination of methods (more on that later), and you’re setting yourself up for future problems.
Put that into perspective and say your ending inventory for 2025 was valued at $50,000. Going into the next year, that figure would be listed as your starting inventory.
Once 2026 ends, you’ll use it to calculate your ending inventory for that financial year. That’s much easier to do if the ending inventory for the year prior was accurate.
4. Obtain financing
Whether you’re looking for extra cash to buy more inventory or take on new retail associates, lenders will want to see your financial statements before approving a funding.
Loans exist to help retailers get started, survive tight financial periods and take advantage of growth opportunities when cash flow is lean.
“From opening a second retail location to manufacturing your own product line, lenders need an accurate portrayal of your business,” explains Jara.
“Accurate inventory valuation, stock counts, and sales records are key. Proper inventory management eases financial obstacles and gives lenders insight into your profitability and demand volume.”
Ending inventory is one metric lenders look at, because it’s considered an asset. They may be more willing to give your business funding—on more favorable terms—if the business has a low debt-to-asset ratio.
5. Tax preparation accuracy
Your ending inventory also impacts your tax bill. The IRS requires businesses that sell products to calculate the cost of goods sold (COGS) by valuing inventory at the start and end of each year.
These figures flow into your Schedule C reporting. Accurately representing your ending inventory is vital because misstatements warp your tax liability:
- Overstating inventory lowers your COGS and inflates taxable income, leading to overpayment.
- Understating it does the opposite, risking IRS penalties and interest for underpayment.
Get the count wrong, and you’re either giving the IRS a free loan or inviting an audit.
6. Pricing strategy decisions
When your inventory value is higher than expected, you’re likely dealing with slow sell-through, which leads to expensive carrying costs.
Try tightening discounts to specific items rather than running store-wide sales, or experiment with bundles to move slow-sellers faster.
If your inventory value is lower than expected and demand is high, it could mean you’re leaving money on the table by pricing too low or discounting too aggressively. Consider pulling back on promos for high-velocity products or testing modest price increases where demand is steady.
Make sure to keep returns in mind as well. Returns inflate your inventory, often too late to sell at full price. National Retail Federation (NRF) research shows nearly 20% of online sales were returned in 2025; your pricing needs to account for the cost of processing those items back into your stock.
7. Identifying dead stock
The fastest way to spot dead stock is to compare your ending inventory across several periods to see which items aren’t moving.
When you line up ending inventory across three to six periods, you can quickly identify slow movers by checking:
- Stock keeping unit (SKU) aging. Items with no sales for a defined window (e.g., 60/90/180 days).
- Inventory turnover. Products with persistently low turnover compared to your average.
- Days on hand (DOH). Items with growing days to sell over time.
- Sell-through rate. Items that don’t improve even after replenishment pauses or promotions.
Before you slash prices, make sure you aren’t dealing with phantom inventory. A 2025 GreyOrange survey found that nearly two-thirds of retail managers can’t find items their system claims are in stock at least once a week. A quick check on your slowest movers will confirm if the stock is actually there or just a ghost in your database.
Pull your inventory reports for the last few quarters, sort by high stock and low sales, and verify the physical items. Once you’ve identified the dead stock, you can decide whether to bundle it, move it to a different channel, or liquidate it to free up your capital.
How to calculate ending inventory
Inventory valuation helps you keep your reports accurate and cash flowing. Every business buys and sells differently, so there are different valuation methods to handle things like inflation, price swings, and variety.
Here are five of the most common choices.
TIP: Rather than wait until the end of the year, view the Month-end inventory value report in Shopify admin to get a snapshot of your inventory cost, ending quantity, and total value each month. If you see negative ending quantities, that’s a sign your inventory quantities for that product are incorrect and need to be reconciled.
FIFO method
The first-in, first-out (FIFO) method is one way to calculate ending inventory by assuming the oldest items you bought are the first ones sold. With this method, the stock left on your shelves is valued at your most recent purchase prices.
FIFO is a go-to for anyone selling perishables or products with expiration dates. It aligns your accounting with the real-world goal of moving older stock before it expires, helping reduce spoilage and write-offs.
Here’s how it works. Imagine you bought two batches of pasta sauce, with the latter being more expensive because the supplier raised their prices:
- Batch 1: 150 jars at $7 each ($1,050 total)
- Batch 2: 150 jars at $9 each ($1,350 total)
You’ve spent $2,400 on 300 jars of pasta sauce. If you sell 130 of them, FIFO assumes they all came from that first $7 batch.
- COGS: 130 × $7 = $910
- Ending inventory: $2,400 − $910 = $1,490
| Step | What happens | Units | Unit cost | Total |
|---|---|---|---|---|
| 1 | First purchase (older layer) | 150 | $7 | $1,050 |
| 2 | Second purchase (newer layer) | 150 | $9 | $1,350 |
| 3 | COGS under FIFO: sell 130 from the oldest layer | 130 | $7 | $910 |
| 4 | Remaining from $7 layer | 20 | $7 | $140 |
| 5 | Remaining from $9 layer | 150 | $9 | $1,350 |
| 6 | Ending inventory under FIFO: value remaining units by layer | 170 | — | $1,490 |
Retailers love FIFO because it’s intuitive and usually reflects how inventory actually moves—oldest items leave first, newest items stay longer.
LIFO method
The last-in, first-out (LIFO) method flips the script by assuming the newest items you bought are the ones you sold first. This means your COGS reflects today’s prices, while the stock left on your shelves is valued at older, historical costs.
In the US, retailers often choose LIFO when prices are rising, whether due to inflation or supplier hikes. By matching your most recent (and likely more expensive) costs against your sales, you record a higher COGS, which lowers your taxable income.
Here’s how it works. Using the same pasta sauce example:
- Batch 1 (Older): 150 jars at $7
- Batch 2 (Newer): 150 jars at $9
- Total Spent:$2,400
If you sell 130 jars of sauce, LIFO assumes they all came from that newer, $9 batch.
- COGS: 130 × $9 = $1,170
- Ending inventory: $2,400 − $1,170 = $1,230
LIFO is a solid choice if you’re feeling the squeeze of rising unit costs and want your margins to reflect current market pressures.
However, be aware that if you ever sell through your new stock and start dipping into those older cost layers, it can cause a sudden spike in reported profit that doesn’t actually match your current expenses.
Weighted average cost method
The weighted average cost (WAC) method is the middle ground between FIFO and LIFO. Instead of worrying about whether you sold the oldest or newest item first, it smooths out price swings by spreading your costs across all identical units.
This is a perfect fit if you sell interchangeable products, like candles, apparel basics, or packaged goods, where it’s nearly impossible to track every single unit separately.
According to IFRS and US GAAP standards, you take the average cost of the items you started with plus what you bought during the period to find a balanced value.
Here’s how it works. Using our pasta sauce example:
- Total spent: $2,400
- Total items: 300 jars
- Average cost:$8 per jar
If you sell 130 jars of sauce, your COGS would be $1,040 (130 x $8). When you plug that into the business-level formula, it looks like this:
Beginning inventory ($5,000) + new purchases ($2,400) − COGS ($1,040) = $6,360 ending inventory
WAC is a great set-it-and-forget-it approach for high-volume retailers because it consolidates your costs into a single manageable number rather than forcing you to track individual inventory layers.
Gross profit method
Gross profit, also known as gross margin, is the percentage of profit you’ll make on each product after subtracting the cost to produce it.
Use this figure to calculate ending inventory using the following formula:
- Beginning inventory + COGS = total cost of goods available for sale
- Gross profit x× sales = estimated cost of goods sold
- Total cost of goods available for sale − cost of goods sold = ending inventory
You’ll typically lean on this method for:
- Interim reporting: When you need a fast snapshot of your finances without shutting down your business for a full manual count.
- Documenting losses: When the inventory is physically gone, but you still need to report what it was worth.
💡 Pro tip: Don’t want to do the math manually? Speed things up with this free profit margin calculator.

Retail method
The retail inventory method is a great shortcut for high-volume stores where tracking the exact cost of every single item just isn’t practical. Instead of counting pennies per SKU, it uses your retail prices to estimate what your inventory is worth.
If you already perform regular physical stock checks, you just need these three numbers:
- Cost-to-retail ratio: (Cost / retail price) x 100
- Cost of goods available for sale: Cost of beginning inventory + cost of goods purchased
- Cost of sales: Dollars earned from sales x cost-to-retail ratio
From there, calculate ending inventory with this formula: Cost of goods available for sale − cost of sales = ending inventory.
Whichever method you choose, you’ll need to stick with it. Switching between multiple ending inventory methods raises the risk of making mistakes that lead to inaccurate financial reporting, which can have serious tax implications.
Which ending inventory calculation method should you use?
The right method is determined by how you move products. Whether you’re selling milk or t-shirts, picking a system that matches your real-world workflow keeps your books clean and protects your margins.
Here’s a quick guide to help you decide:
- Selling perishables or items with expiration dates? FIFO is your best bet because it mirrors the actual flow of your stock—oldest out first.
- Stocking identical or interchangeable products? Weighted average cost keeps things simple by smoothing out price fluctuations.
- Need a fast snapshot without a full count? The retail inventory method or gross profit method works well for quick estimates, provided you follow up with a physical count later.
Be sure not to switch methods mid-year. Changing your approach halfway through makes your financial reports messy and can lead to errors.
The IRS usually requires official approval via Form 3115 before you can legally change how you value your inventory. Once you pick a path, stick with it to keep your books and taxes in order.
Examples of ending inventory
Learn more about when ending inventory is calculated with the following examples:
After a sale
Let’s say a clothing store starts the month with an inventory of 200 shirts priced at $20 each. If they sell 150 shirts during the month, the remaining 50 shirts in their ending inventory would be valued at $1,000 (50 shirts x $20 per shirt) using the ending inventory formula.
After buying more stock
Now, consider a bookstore that starts with 100 books costing $10 each. Midway through the month, they purchase another 100 books at $12 each. If they sell 120 books in total for the month, they would be left with an ending inventory of 80 books.
However, because they use a first-in, first-out (FIFO) accounting method, the first 100 books sold are assumed to have cost $10 each, and the next 20 books sold would have cost $12 each. So, their ending inventory would be worth $840 (20 books x $12/book + 60 books x $10 per book).
Here’s a step-by-step table to illustrate this example:
| Step | What happens (FIFO) | Units | Unit cost | Total value |
|---|---|---|---|---|
| 1 | Beginning inventory (older layer) | 100 | $10 | $1,000 |
| 2 | New purchase (newer layer) | 100 | $12 | $1,200 |
| 3 | Total available for sale | 200 | — | $2,200 |
| 4 | Sales during the month | 120 | — | — |
| 5 | COGS (FIFO): first 100 sold from $10 layer | 100 | $10 | $1,000 |
| 6 | COGS (FIFO): next 20 sold from $12 layer | 20 | $12 | $240 |
| 7 | Total COGS (FIFO) | 120 | — | $1,240 |
| 8 | Ending inventory units (200 available – 120 sold) | 80 | — | — |
| 9 | Ending inventory value (FIFO): remaining 80 from the $12 layer | 80 | $12 | $960 |
After accounting for loss
Imagine a grocery store that starts with inventory worth $10,000. They add another $5,000 worth of goods during the month but discover at the end of the month that some produce has spoiled, reducing their inventory value by $500.
If they sold $7,000 worth of goods during the month, their ending inventory would be $7,500 ($10,000 + $5,000 − $7,000 − $500) using the ending inventory formula.
Common mistakes to avoid
Every business hits a few speed bumps when it comes to inventory. The trick is catching them before they cause tax or compliance issues.
Here are the most common pitfalls and how to steer clear of them:
Skipping physical counts
Relying solely on your software is risky. Between shipping errors and shrink, your digital numbers can easily drift from reality.
The fix: Don’t wait for a year-end crisis. Run cycle counts on your most expensive or fastest-moving items throughout the year to keep your data accurate.
Ignoring discrepancies
If you ignore mismatches between your shelves and your screen, your entire ending inventory figure becomes suspect.
The fix: Make reconciliation between physical count and what’s in your system a habit. If you find a gap, investigate why it happened, adjust your records, and move forward.
Switching methods mid-year
Changing how you value inventory in the middle of a fiscal year creates compliance issues.
The fix: Consult an accounting specialist and choose one method that best fits your business, then commit to it for the full year.
Losing track of net purchase details
Your ending inventory calculation depends on knowing exactly what you spent. If you forget to factor in shipping costs or subtract the discounts and returns you received from suppliers, your numbers will be off.
The fix: Track the landed cost (the total price to get an item to your door) so your profit margins are actually accurate.
Sitting on dead or damaged stock
Holding onto unsellable items inflates the value of your business on paper, which can lead to overpaying on taxes for items you’ll never actually sell.
The fix: Be decisive. Review your aging stock every quarter and decide whether to mark it down, donate it, or write it off entirely.
Read more
- How to Calculate Beginning Inventory & Give Stock a Dollar Value
- A Retailer’s Guide to Reorder Points and the ROP Formula
- What Is Last Mile Delivery Logistics?
- Purchase Orders: How to Create, Manage, and Use POs for Your Retail Store
- A Complete Guide to the Retail Inventory Method (RIM)
- 10 Ways On-Demand Manufacturing Can Help Retailers Streamline Their Operations
- Keeping Up With Demand: Tactics to Boost Productivity And Get Orders Out on Time
- Diversify Your Offerings: Takeaways From 5 Service-Based Businesses Turned Retailers
- 4 Inventory Valuation Methods for Retailers (+ How to Choose One)
- The Complete Guide to Purchasing Product Samples
Ending inventory formula FAQ
How do you calculate value of inventory?
You calculate ending inventory by taking the beginning inventory for a particular period, adding any inventory purchases made, and then subtracting the cost of goods sold (COGS) during the same period. If there’s any inventory shrinkage due to theft, spoilage, or other losses, this should also be subtracted from the total.
What are beginning inventory and ending inventory?
Beginning inventory refers to the value of goods or products that a retail business has in its stock at the start of an accounting period. Ending inventory refers to the value of goods or products still in stock at the end of that same accounting period.
What is an example of ending inventory?
An example of ending inventory would be a shoe store that starts the month with 300 pairs of shoes valued at $30 each, purchases another 200 pairs for $40 each during the month, and sells 350 pairs during the same month. If the store follows the first-in, first-out (FIFO) accounting method, the ending inventory would be valued at $6,000.
Should ending inventory be high or low?
There’s no perfect ending inventory number. The key is balancing sales pace with supplier lead times. Too much inventory ties up cash and risks markdowns, while too little inventory causes stockouts and loses customers. The goal is meeting demand without wasting capital.
Successful retailers track ending inventory alongside health metrics like sell-through and turnover. Monitoring these trends is the best way to stay agile and protect your bottom line.
Does ending inventory mean closing stock?
Yes, ending inventory is essentially the same as closing stock. Both terms refer to the value of unsold goods or products a retail business has in its stock at the end of a specific accounting period.





