inventory management

How to Calculate Your Ending Inventory

Wondering how to calculate your ending inventory? Our article explains all in simple to understand terms.

Inventory management is crucial for any business, but it can be particularly challenging for small manufacturers as both raw materials and finished product need to be tracked simultaneously.

One of the calculations that oft stumps small business owners is “Ending Inventory” - the value of the inventory that is left at the end of an accounting period. Many are left scratching their heads wondering how exactly to calculate this number. Fortunately, there is a simple and effective method that is commonly used called the COGS (Cost of Goods Sold) method.

In this article we will introduce COGS and also cover how you can calculate your ending inventory accurately.

Need to get your raw material and product inventory under control?

Try Craftybase - the inventory and manufacturing solution for DTC sellers. Track raw materials and product stock levels (in real time!), COGS, shop floor assignment and much more.
It's your new production central.

Start your 14 day free trial

What is COGS?

The COGS method (Cost of Goods Sold) is one of the most commonly used methods for calculating ending inventory. This method involves adding up the cost of all raw materials, WIP products, and finished goods that were not sold during the accounting period.

The formula for calculating ending inventory using the COGS method is:

Ending Inventory = Beginning Inventory + Purchases - Cost of Goods Sold

Read more about how to calculate COGS here

What is Ending Inventory?

Ending Inventory is the value of unsold goods at the end of an accounting period - it’s also commonly referred to as your “Closing Inventory”.

This ending total includes the cost to obtain or produce:

  • Raw materials
  • WIP products and
  • Finished products that have not yet sold.

It is important to accurately calculate your ending inventory. If you under calculate this amount, you’ll be under claiming this expense which will have a significant impact on your tax liability.

On the other hand, over calculating this amount will reduce the cost of goods sold (COGS) resulting in a higher gross profit and therefore more taxes to pay.

How to calculate ending raw materials inventory

Start by determining the beginning raw materials inventory value for the period (this is your “Starting Inventory” or “Beginning Inventory”.

  1. Add all purchases of raw materials during the period.
  2. Subtract the cost of raw materials used to produce sold finished goods during the period from your beginning and purchases total. The resulting number is your ending raw materials inventory value.

Tip: it’s important to ensure that your material costs are all reflected as “landed costs”: the total cost to acquire your materials. This should include shipping, handling and any other direct costs involved with obtaining the raw materials.

How to include work-in-progress inventory in your ending calculation

In addition to finished goods, many manufacturers also have work-in-progress (WIP) inventory that needs to be accounted for. This includes any partially completed products or materials that are currently being produced.

To calculate ending work-in-progress inventory using the COGS method, you’ll need to know how much of your stock is in progress or unsold and its value. Using a manufacturing system such as Craftybase can help you easily track and manage this information: as materials are consumed in your in-progress products, the material cost is automatically “moved” from the raw material inventory to the WIP inventory until it is sold.

Craftybase can also handle component assembly situations, whereby you can make sub-parts and hold them in your material inventory until ready for use.

How to calculate ending inventory using weighted averaging

When using the COGS method, you can also calculate your ending inventory using the weighted average cost of goods sold. This takes into account the cost of each item in inventory and calculates an average cost per unit based on the original value of all stock in the available “pool”.

To determine your weighted average inventory value, follow these steps:

  1. Calculate the total cost of all units in your beginning inventory and add to it the total cost of all units purchased during the period.
  2. Determine the total number of units in your beginning inventory and add to it the total number of units purchased during the period.
  3. Divide your total cost by your total units to determine your weighted average cost per unit.
  4. Multiply this value by the number of units in ending inventory to calculate your ending inventory value using weighted averaging.

With this method, you can get a more accurate snapshot of your inventory value and cost of goods sold, which is especially important for businesses that experience fluctuations in material costs. It also allows for easier tracking and managing bulk purchases or production runs.

How to calculate ending inventory using FIFO

FIFO, or first-in-first-out, is another method commonly used to calculate ending inventory. This approach assumes that the first items purchased or produced are also the first items sold.

To calculate your ending inventory using FIFO:

  1. Create a list of all purchases and production runs during the period, starting with the earliest date.
  2. Calculate the value of each purchase/production run using the original cost of materials and labor.
  3. Add up the values in chronological order until you reach your ending inventory date.
  4. The resulting value is your FIFO ending inventory.

This method can be useful for businesses that sell perishable goods or those that experience fluctuations in material costs, as it takes into account the actual cost of each item sold rather than an average. It can also provide a more accurate picture of inventory value for tax and financial reporting purposes.

How to calculate your ending inventory without using cost of goods sold

Your ending inventory is entirely dependant on using the COGS method of valuing your inventory. If you are not using the COGS method to calculate and track your stock (i.e. you are using indirect expensing for all raw materials) you’ll likely want to record your ending inventory as $0 on any tax filings. It’s important to discuss this approach with your accountant to ensure that this is the best approach given your specific business structure and situation.

Tracking your inventory using COGS has many advantages, such as providing a more accurate understanding of profitability, enabling you to have an accurate value for your stock on hand at any time, and assisting in making informed purchasing decisions.

Using software to calculate your ending inventory

In today’s fast-paced business environment, using software to calculate your ending inventory is not just advantageous—it’s essential. Why? Because it automates the complex and time-consuming process of inventory management, improves accuracy, and offers real-time insights into your inventory levels.

Meet Craftybase, your ultimate solution for inventory and manufacturing workflow management. It streamlines the entire inventory management process, provides real-time tracking of raw materials and finished goods, keeps track of COGS, and helps you calculate your ending inventory with precision. Craftybase is designed with Direct-to-Customer (DTC) brands in mind, catering specifically to the needs of businesses that manufacture their own products in-house.

But don’t just take our word for it. Listen to what our satisfied customers have to say: “Craftybase has revolutionized our inventory tracking. Its intuitive interface and comprehensive features have saved us countless hours and eliminated errors in our calculations.”

So, are you ready to take control of your inventory management and make informed, data-driven business decisions? Try Craftybase for free today and discover how easy inventory management could be.


In conclusion, knowing how to calculate your ending inventory using the COGS method is essential for any DTC brand looking to effectively manage their inventory and production costs. By taking into account raw materials, finished goods, work-in-progress, and utilizing different methods such as weighted averaging or FIFO, you can gain a better understanding of your inventory value and make informed decisions for your business’s growth. With the help of Craftybase, tracking and managing your inventory becomes even easier and more accurate, allowing you to focus on growing your in-house manufacturing brand.

Nicole Pascoe Nicole Pascoe - Profile

Written by Nicole Pascoe

Nicole is the co-founder of Craftybase, inventory and manufacturing software designed for small manufacturers. She has been working with, and writing articles for, small manufacturing businesses for the last 12 years. Her passion is to help makers to become more successful with their online endeavors by empowering them with the knowledge they need to take their business to the next level.