Vaishali Ravi
·February 3, 2025
For ecommerce shop operators, it’s critical to pay close attention to metrics tied to your business’ profitability. You might have products flying off the shelves—but if you’re not valuing them properly, you still may find yourself operating at a loss when it comes time to run your P&L statement.
That’s why it’s important to understand how to calculate your ending inventory. In this article, we’ll share what ending inventory is, and provide several models for determining its value.
Ending inventory, also known as closing inventory, refers to the total value of the goods that you have available for sale at the end of an accounting period.
For example, let’s say your online shop sells three types of bags: a wristlet, a crossbody, and a sling bag. At the start of the accounting period (monthly, in this case), your stock includes 100 wristlets, 200 crossbodies, and 50 sling bags. Over the course of the month, you purchase an additional 50 wristlets, 100 crossbodies, and 20 sling bags to ensure that you have a variety of colors and styles that meets your customers’ needs. Of the total inventory, you sell 120 wristlets, 250 crossbodies, and 40 sling bags by the end of the month.
To calculate your ending inventory, you would add your beginning inventory and your additional purchases, and then subtract the sales.
This formula will give you the total numbers of your ending inventory—but from there, it’s important to decide on a method for calculating its value.
Because the cost of stocking products can fluctuate over a period of time, it’s important to use the right accounting method to understand the true value of your remaining inventory. That can help you determine how much you can discount your products and still run a profit, or understand when you’re running at an operating loss.
Here are some options for calculating your ending inventory:
Using the basic ending inventory formula, you can simply determine the price you paid for each item minus the cost of goods sold. Under this model:
In this case, the total value of your remaining inventory is $3,900.
That formula works when supplier pricing remains consistent—but what if your costs fluctuate over time? In that case, this formula may not be the most reliable.
Instead, consider these.
By using the FIFO system, you’re making the assumption that the items bought first were also sold first. Let’s say your supplier raised their prices by 5% before you re-purchased stock. In this case, only the pre-existing inventory would be calculated based on the original price, with additional stock purchases valued at the new price.
In the case of the wristlets, this would be:
100 ($20) + 50 ($21) - 100 ($20) - 20 ($21)
$3050 - $2000 - $420 = $630
The LIFO model is the converse of FIFO, with the assumption that the last items purchased are sold first to calculate the value. In this case:
100 ($20) + 50 ($21) − 50 ($21) - 70 ($20)
$3050 - $1050 - $1400 = $600
Alternatively, you can strike a balance between the two pricing models by using a weighted average cost model. In this case, you’d calculate the average price paid over the accounting period as the multiplier for your cost of goods sold.
In this case, the average price for the wristlet would be $20.33.
150 ($20.33) - 120 ($20.33)
$3049.50 - $2439.60 = $609.90
Having accurate numbers around your ending inventory makes it easier to determine your store’s profitability. You’ll be able to understand the value of the products that you’re currently holding, which can help you build a better pricing strategy to ensure that you’re selling your inventory at a profit. If you need to liquidate stock, you’ll be able to calculate how much you can discount your products in a promotion without running at a loss.
You’ll also be able to use your ending inventory to help you forecast future demand for your products, and build a sustainable plan for restocking products to ensure that you’re not carrying a lot of extra product at any given time.
By using an inventory management system to tap into real-time data around available products, ordered products that you haven’t yet received, and returns in progress, you’ll have better insights around what merchandise will soon be available for your customers to purchase, ensuring that you make smart decisions around when and what to restock.
Regardless of which inventory valuation method you choose, you’ll be able to streamline your inventory management by using automation to track your inventory value. In Shopify, you can view the month-end inventory value report to get a snapshot of your current inventory value, helping you understand your profit margins and when to restock inventory. It can also alert you to shrinkage or ordering mistakes, if the current inventory levels are different than what the calculated value should be.
Don’t forget that resellable returns should also be factored into your ending inventory. By using a returns management platform like Loop, you’ll be able to get data on incoming returns, so you can anticipate how much additional stock you have available to sell. Paying attention to reverse logistics in ecommerce will help you ensure that you’re not overspending on new products when you have returns coming back into inventory that haven’t been restocked yet.
Pairing Shopify’s robust ecommerce platform with a returns management solution like Loop can help you build a streamlined system for managing your entire supply chain. By using Shopify’s suite of ecommerce apps, you’ll be able to get better visibility into inventory management, order tracking, and reverse logistics in a centralized dashboard to help you get an instant pulse-check on your business.
Ready to learn more about how Loop can help you optimize your brand's reverse logistics? Book a demo.
In this article
Stay in the loop
Subscribe for product updates and Loop's biweekly newsletter.
With Loop, your brand can offer everything from refunds to direct exchanges to shopper incentives and more. Even better? These exchanges build your business.