Blog Product

Ending Inventory Formula: How to Calculate It

Written by
Ending Inventory Formula: How to Calculate It
SimplyDepo Team
About
The SimplyDepo Team is dedicated to helping distributors, wholesalers, and sales teams succeed in today’s competitive market. With years of experience in wholesale distribution, retail execution, and B2B technology, our experts share practical insights to help businesses streamline operations, boost efficiency, and scale profitably. At SimplyDepo, we believe distributors deserve modern tools that simplify order management, delivery, and field sales- empowering teams to sell smarter and grow faster.
Ending Inventory Formula: How to Calculate It

The ending inventory formula tells you the value of stock left at the end of an accounting period. It’s simple: take what you started with, add what you bought and subtract what you sold. For distributors, that one number feeds the balance sheet, cost of goods sold, gross margin and next period’s purchasing.

This guide explains the ending inventory formula, walks through an example and covers how valuation methods change the result. It also shows how to use ending inventory for better forecasting, which is where inventory management software earns its keep.

The ending inventory formula

Ending inventory = Beginning inventory + Purchases − Cost of goods sold (COGS)

  • Beginning inventory is the value of stock at the start of the period, which is last period’s ending inventory.
  • Purchases are the cost of new inventory received during the period, including freight-in.
  • COGS is the cost of the inventory you sold during the period.

Example calculation

A beverage distributor starts the quarter with $120,000 in inventory. During the quarter it receives $310,000 in new stock and sells products that cost $290,000.

Ending inventory = $120,000 + $310,000 − $290,000 = $140,000

That $140,000 becomes the beginning inventory for next quarter.

How valuation methods change ending inventory

When purchase costs change during the period, the method you use to assign costs affects both COGS and ending inventory.

Method How it works Effect when costs are rising
FIFO (first in, first out) Oldest stock is treated as sold first Higher ending inventory, lower COGS
LIFO (last in, first out) Newest stock is treated as sold first Lower ending inventory, higher COGS
Weighted average Uses the average cost of all units available Results fall between FIFO and LIFO

FIFO matches how most distributors physically move perishable or dated products. LIFO is allowed under US GAAP but not under IFRS. Our guide to inventory valuation covers each method in more detail. Your accountant should confirm which method fits your business and stays consistent from period to period.

Ending inventory under FIFO and LIFO: worked example

A distributor starts the month with 100 cases bought at $10 each. During the month it buys 200 cases at $11 and 100 cases at $12, and sells 250 cases.

Units in ending inventory: 100 + 200 + 100 − 250 = 150 cases

FIFO: The oldest cases are treated as sold first, so the 150 remaining cases are the newest: 100 at $12 and 50 at $11. Ending inventory = $1,200 + $550 = $1,750

LIFO: The newest cases are treated as sold first, so the 150 remaining cases are the oldest: 100 at $10 and 50 at $11. Ending inventory = $1,000 + $550 = $1,550

Weighted average: Total cost is $1,000 + $2,200 + $1,200 = $4,400 for 400 cases, or $11 per case. Ending inventory = 150 × $11 = $1,650

The same physical stock produces three different values, which is why choosing one method and applying it consistently matters.

Ending inventory formula vs a physical count

The formula gives you a calculated number. A physical count, or regular cycle counting, tells you what’s actually on the shelves. The gap between the two is shrinkage: damage, theft, spoilage, miscounts and receiving errors.

Comparing the two each period is one of the best checks on inventory accuracy. A growing gap usually points to process problems in receiving, picking or returns.

Periodic vs perpetual systems

In a periodic system, ending inventory is calculated or counted at the end of each period. In a perpetual system, every receipt, sale and adjustment updates inventory as it happens, so ending inventory is always available. Most growing distributors move to perpetual tracking because it supports daily decisions on purchasing and sales. See our guide to perpetual vs periodic inventory.

Where ending inventory shows up

  • Balance sheet: as a current asset
  • Income statement: through cost of goods sold
  • Ratios: in inventory turnover and days sales in inventory
  • Lending: banks often review inventory value for credit lines

Using ending inventory for better decisions

Purchasing. Ending inventory compared with expected demand shows whether you’re heading into next period overstocked or short.

Turnover. Ending inventory feeds average inventory, which you need for the inventory turnover formula. Low turnover means cash is sitting on shelves.

Margins. Because ending inventory and COGS are linked, an error in one distorts gross margin. Overstating ending inventory understates COGS and makes profits look better than they are.

Forecasting. Tracking ending inventory by SKU over several periods shows which products are building up and which keep running thin.

Common mistakes

Infographic: overstated inventory raises costs, understated inventory causes missed sales
  • Leaving out freight-in or other costs that belong in inventory value
  • Counting stock you don’t own yet, or forgetting goods in transit that you do own
  • Switching valuation methods between periods without adjusting
  • Relying on the formula without counting, which hides shrinkage

Keeping ending inventory accurate all period

The ending inventory formula is easiest when purchases, sales and stock movements are recorded as they happen instead of reconstructed at month end.

SimplyDepo updates inventory as orders, receipts and transfers happen across warehouses and trucks, so ending inventory is always current and easy to check against a count. Book a demo to see it with your products.

Ending inventory = Beginning inventory + Purchases − Cost of goods sold.

Yes. Ending inventory is reported as a current asset on the balance sheet.

Under FIFO, the oldest costs go to COGS first, so ending inventory reflects the most recent purchase costs. When prices are rising, that produces a higher ending inventory value.

You can use the gross profit method, which estimates COGS from sales and your historical gross margin, or take a physical count and value it at cost.

The SimplyDepo Team is dedicated to helping distributors, wholesalers, and sales teams succeed in today’s competitive market. With years of experience in wholesale distribution, retail execution, and B2B technology, our experts share practical insights to help businesses streamline operations, boost efficiency, and scale profitably. At SimplyDepo, we believe distributors deserve modern tools that simplify order management, delivery, and field sales- empowering teams to sell smarter and grow faster.

Schedule your demo

Choose a convenient time to explore SimplyDepo with our team.