How to Calculate Your Ending Inventory
Wondering how to calculate your ending inventory? Our article explains all in simple to understand terms — including a worked example for small makers.

Inventory management is crucial for any business, but it can be particularly challenging for small manufacturers — both raw materials and finished products need to be tracked simultaneously, across every accounting period.
One of the calculations that often stumps small business owners is ending inventory: the value of stock that remains unsold at the end of an accounting period. Many makers are left scratching their heads wondering how exactly to arrive at this number. Fortunately, there is a straightforward method that most small manufacturers use — the COGS (Cost of Goods Sold) method.
In this article we’ll cover what ending inventory is, how to calculate it step by step, and walk through a worked example so you can see exactly how the numbers fit together.
Instantly calculate your COGS
Take the easy road and use our award winning COGS software and get back to doing what you do best. Track raw materials and product stock levels (in real time!), COGS, shop floor assignment and much more.
It's your new production central.
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 that haven’t yet been used
- Work-in-progress (WIP) products currently being made
- Finished products that have not yet been sold
It is important to accurately calculate your ending inventory. If you under-calculate this amount, you’ll be under-claiming the expense, which will have a significant impact on your tax liability. On the other hand, over-calculating it will reduce your COGS, resulting in a higher gross profit — and therefore more taxes to pay.
The Ending Inventory Formula
The standard formula for calculating ending inventory using the COGS method is:
Ending Inventory = Beginning Inventory + Purchases − Cost of Goods Sold
- Beginning Inventory — the value of your stock at the start of the period (equal to last period’s ending inventory)
- Purchases — the cost of all raw materials and goods acquired during the period
- Cost of Goods Sold — the total cost of all products sold during the period
Read more about how to calculate COGS here.
Worked Example: A Candle Maker’s Ending Inventory
Let’s say you run a small candle-making business. Here’s how your numbers might look for the quarter:
| Item | Amount |
|---|---|
| Beginning inventory (wax, fragrance, wicks, finished candles) | $1,200 |
| Raw material purchases during the quarter | $850 |
| Cost of goods sold (candles sold during the quarter) | $1,400 |
Applying the formula:
Ending Inventory = $1,200 + $850 − $1,400 = $650
That $650 represents the value of all raw materials still on your shelves plus any finished candles that haven’t shipped yet. This is the figure you’d carry into next quarter as your new beginning inventory — and the figure that flows into your balance sheet and tax return.
Tip: Make sure all material costs are reflected as “landed costs” — the total cost to acquire them, including shipping, tariffs, handling, and any other direct costs. This is especially relevant if you source fragrance oils or wax internationally.
How to Calculate Ending Raw Materials Inventory
For makers who track materials separately, you can break the calculation down by inventory layer:
- Start with your beginning raw materials inventory value for the period.
- Add all purchases of raw materials during the period.
- Subtract the cost of raw materials consumed to produce goods that were sold during the period.
- The resulting number is your ending raw materials inventory value.
It’s also worth building out a bill of materials (BOM) for each product you make. A BOM lists every ingredient or component that goes into a finished product — which makes it much easier to calculate exactly how much raw material was consumed for each unit sold.
How to Include Work-in-Progress in Your Ending Calculation
In addition to finished goods, many makers 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 WIP inventory using the COGS method, you’ll need to know how much of your stock is in progress and its value at the close of the period. Craftybase handles this automatically: as materials are used in your in-progress manufacturing runs, the material cost is moved from raw materials inventory to WIP inventory, and then to finished goods once production is complete. This gives you an accurate, real-time picture of exactly where your inventory value sits at any point in time.
Craftybase also handles component assembly situations — you can manufacture sub-components (like pre-poured wax bases or fragrance blends) and hold them in material inventory until they’re needed in a finished product run.
How to Calculate Ending Inventory Using Weighted Average
When using the COGS method, you can calculate your ending inventory using the weighted average cost method. This takes into account the cost of each item in inventory and calculates an average cost per unit based on all available stock.
To determine your weighted average inventory value:
- Calculate the total cost of all units in beginning inventory plus all units purchased during the period.
- Determine the total number of units across both beginning inventory and purchases.
- Divide total cost by total units to get your weighted average cost per unit.
- Multiply by the number of units in ending inventory to get your ending inventory value.
This method works well for makers who buy materials in varying lot sizes at fluctuating prices — common for soap makers purchasing lye or fragrance oils in bulk.
How to Calculate Ending Inventory Using FIFO
FIFO (first-in, first-out) is another method commonly used to calculate ending inventory. It assumes that the first items purchased or produced are also the first items sold.
To calculate your ending inventory using FIFO:
- List all purchases and production runs during the period in chronological order, starting with the earliest.
- Calculate the value of each purchase using original material and labour costs.
- Work through the list chronologically, assigning those costs to units sold first.
- Whatever remains un-allocated at the end of the period is your FIFO ending inventory.
FIFO can be useful for makers who sell perishable goods (like bath bombs or food-safe products) or those who experience significant fluctuations in material costs, since it assigns the oldest — usually lower — costs to goods sold first.
What if You’re Not Using the COGS Method?
Your ending inventory calculation is entirely dependent on using the COGS method to value your stock. If you are using indirect expensing for all raw materials (i.e. writing off materials as purchased rather than when used), you’ll likely want to record your ending inventory as $0 on tax filings. It’s important to discuss this approach with your accountant to ensure it suits your specific business structure.
Tracking inventory using COGS has real advantages: it gives you an accurate understanding of profitability, lets you see the true value of your stock on hand at any time, and helps you make informed purchasing decisions.
Using Software to Calculate Your Ending Inventory
Doing this manually — across multiple products, production runs, and material purchases — quickly becomes unwieldy. Craftybase automates the entire process: it tracks your raw material purchases, records material consumption as you log manufacturing runs, and calculates your COGS and ending inventory in real time.
At the end of any accounting period, you can pull a COGS report directly from Craftybase and hand it to your accountant — with beginning inventory, purchases, COGS, and ending inventory already calculated, broken down by product or material.
Frequently Asked Questions
What is ending inventory?
Ending inventory is the total value of unsold goods — including raw materials, work-in-progress, and finished products — that remain in your business at the close of an accounting period. It is also called closing inventory. This figure flows directly into your balance sheet and your Cost of Goods Sold calculation for tax purposes.
How do you calculate ending inventory?
The standard formula is: Ending Inventory = Beginning Inventory + Purchases − Cost of Goods Sold. Start with the value of your inventory at the beginning of the period, add any new purchases made during the period, then subtract the cost of all goods you sold. The result is the value still sitting in your inventory at period-end.
Does ending inventory include work-in-progress (WIP)?
Yes — ending inventory includes raw materials, work-in-progress, and finished goods that haven't been sold. For makers, WIP typically includes batches currently in production, partially assembled products, and cured or cooling goods not yet packaged. It's important to value WIP at cost (materials consumed plus labour applied) rather than selling price.
What's the difference between ending inventory and COGS?
COGS (Cost of Goods Sold) is the total cost of goods that were actually sold during the period — it's an income statement expense. Ending inventory is the cost of goods that were NOT sold — it's a balance sheet asset. They are two sides of the same coin: the more accurately you track one, the more accurate the other will be.
How does Craftybase calculate ending inventory?
Craftybase tracks every material purchase, manufacturing run, and sale in real time. When you record a production run, the material costs are automatically moved from raw materials inventory to finished goods. When a sale is recorded, those costs shift to COGS. At the end of any accounting period, Craftybase can generate a COGS report showing your beginning inventory, purchases, COGS, and ending inventory — ready to hand to your accountant.
