Skip to content
Business

Ending Inventory Calculator

Calculate ending inventory value from starting inventory, net purchases, and COGS. Includes inventory turnover ratio with step-by-step breakdown.

Inventory details

$
$
$

Ending inventory value

$15,000.00

27.3% of total goods available ($55,000.00)

Goods available for sale

$55,000.00

Starting inventory + net purchases

Average inventory

$20,000.00

(Starting + ending inventory) / 2

Inventory turnover ratio

2.00x

COGS / average inventory

Days sales of inventory (DSI)

182.5 days

Average time to sell current stock

Goods available allocation

  • Ending inventory$15,000.0027.3%
  • Cost of goods sold (COGS)$40,000.0072.7%

How ending inventory is calculated

Four accounting steps from beginning stock and new purchases to closing inventory and turnover.

  1. Calculate goods available for sale

    Goods Available=Starting Inventory+Net Purchases\mathrm{Goods\ Available} = \mathrm{Starting\ Inventory} + \mathrm{Net\ Purchases}

    Add starting inventory ($25,000.00) and net purchases ($30,000.00) to get $55,000.00.

  2. Deduct cost of goods sold

    Ending Inventory=Goods AvailableCOGS\mathrm{Ending\ Inventory} = \mathrm{Goods\ Available} - \mathrm{COGS}

    Subtract COGS ($40,000.00) from goods available ($55,000.00) to determine the closing stock value of $15,000.00.

  3. Compute average inventory

    Average Inventory=Starting Inventory+Ending Inventory2\mathrm{Average\ Inventory} = \frac{\mathrm{Starting\ Inventory} + \mathrm{Ending\ Inventory}}{2}

    Sum starting inventory ($25,000.00) and ending inventory ($15,000.00) and divide by 2 to get $20,000.00.

  4. Determine inventory turnover and DSI

    Turnover=COGSAverage Inventory,DSI=365Turnover\mathrm{Turnover} = \frac{\mathrm{COGS}}{\mathrm{Average\ Inventory}}, \quad \mathrm{DSI} = \frac{365}{\mathrm{Turnover}}

    Divide COGS by average inventory to get 2.00x turnover, which equals 182.5 days sales of inventory.

Report tool

What is ending inventory and why does it matter?

Ending inventory represents the total monetary value of unsold goods, raw materials, and finished merchandise held by a business at the conclusion of an accounting period. Whether calculated at the end of a fiscal month, quarter, or year, ending inventory is a foundational metric that links a company balance sheet directly to its income statement.

On the balance sheet, ending inventory appears as a current asset within working capital. On the income statement, it directly determines the cost of goods sold (COGS), gross profit margins, and net taxable earnings. Tracking your ending inventory accurately prevents cash from becoming trapped in slow-moving stock while ensuring you have sufficient stock to fulfill incoming customer orders. To gauge how quickly your stock converts into cash, measure holding duration with the days inventory outstanding calculator, calculate direct merchandise costs using the cost of goods sold calculator, or evaluate overall operational cash velocity with the cash conversion cycle calculator. To determine the most cost-effective batch size to reorder from suppliers without overstocking, use the EOQ calculator, and to evaluate how effectively your stock generates gross profit relative to the cash tied up in it, calculate inventory return with the GMROI calculator.

The ending inventory formula and step-by-step breakdown

Under the standard periodic inventory accounting system, ending inventory is derived using the basic cost-flow equation:

Ending Inventory=Beginning Inventory+Net PurchasesCOGS\mathrm{Ending\ Inventory} = \mathrm{Beginning\ Inventory} + \mathrm{Net\ Purchases} - \mathrm{COGS}

This calculation relies on three primary variables:

  • Beginning inventory: The total recorded value of unsold stock carried over from the final day of the preceding accounting period.
  • Net purchases: All inventory acquired during the current period, including freight-in, shipping, and direct handling charges, minus vendor purchase returns, damaged-goods allowances, and early-payment discounts.
  • Cost of Goods Sold (COGS): The direct manufacturing or wholesale acquisition costs attributable to units that were sold to customers during the period.

Combining beginning inventory and net purchases yields the total cost of goods available for sale:

Goods Available for Sale=Beginning Inventory+Net Purchases\mathrm{Goods\ Available\ for\ Sale} = \mathrm{Beginning\ Inventory} + \mathrm{Net\ Purchases}

Every dollar of goods available for sale during the period follows one of two paths: it is either sold to generate revenue (recorded as COGS) or remains in the warehouse at period-end (recorded as ending inventory).

Inventory turnover ratio and Days Sales of Inventory (DSI)

Determining the raw dollar value of closing inventory is only the first step. High-performing finance teams evaluate inventory efficiency using two related metrics:

1. Inventory turnover ratio

Inventory turnover measures how many times a business sells and replaces its entire stock during a given period. It is calculated by dividing COGS by the average inventory value:

Average Inventory=Starting Inventory+Ending Inventory2\mathrm{Average\ Inventory} = \frac{\mathrm{Starting\ Inventory} + \mathrm{Ending\ Inventory}}{2}
Inventory Turnover=COGSAverage Inventory\mathrm{Inventory\ Turnover} = \frac{\mathrm{COGS}}{\mathrm{Average\ Inventory}}

A higher turnover ratio signals robust sales, lean inventory holding, and lower carrying costs. A subdued turnover ratio indicates overstocking, excess warehouse storage fees, or obsolete items that require markdowns.

2. Days sales of inventory (DSI)

Days sales of inventory translates the turnover multiple into the average number of days required to turn inventory into completed sales:

DSI=365Inventory Turnover=Average InventoryCOGS×365\mathrm{DSI} = \frac{365}{\mathrm{Inventory\ Turnover}} = \frac{\mathrm{Average\ Inventory}}{\mathrm{COGS}} \times 365

Because inventory cannot be liquidated into cash overnight without steep discounts, conservative lenders often evaluate short-term liquidity with the acid-test ratio calculator, which deliberately removes inventory from current assets to test immediate solvency.

How valuation methods affect ending inventory value

When acquisition costs fluctuate throughout the year, the valuation method chosen under standard accounting principles significantly impacts the reported ending inventory and bottom-line profit:

  • First-In, First-Out (FIFO): Assumes the earliest acquired items are sold first. In an inflationary environment with rising supplier prices, ending inventory is valued at recent, higher replacement costs. This produces lower COGS, higher ending assets, and higher reported profits on the accounting profit calculator. To calculate COGS and ending inventory layer-by-layer across multiple purchase batches, use the FIFO inventory calculator.
  • Last-In, First-Out (LIFO): Assumes the most recently purchased merchandise is sold first. When costs are rising, LIFO matches higher recent costs against current revenues, lowering reported gross profit and deferring corporate income tax liabilities (permitted under US GAAP, prohibited under IFRS).
  • Weighted-average cost: Blends the cost of all units available for sale during the period into a single average unit cost. This method smooths out price volatility and offers a balanced middle ground between FIFO and LIFO.

Worked example: Computing closing stock and turnover

Consider an e-commerce retail business preparing its quarterly financial statements with the following records:

  • Starting inventory: $25,000
  • Net purchases during quarter: $30,000
  • Cost of goods sold (COGS): $40,000

The calculation proceeds as follows:

  1. Total goods available for sale: $25,000 + $30,000 = $55,000.
  2. Ending inventory: $55,000 - $40,000 = $15,000. Unsold goods on the balance sheet equal $15,000, representing 27.3% of total available goods.
  3. Average inventory: ($25,000 + $15,000) / 2 = $20,000.
  4. Inventory turnover ratio: $40,000 / $20,000 = 2.00x per quarter.
  5. Days sales of inventory (DSI): 365 / (2.00 × 4) = 45.6 days on an annualized basis, or approximately 45 days to convert stock to sales.

The ripple effect of ending inventory errors

Because ending inventory is subtracted from goods available for sale to compute COGS, an inventory valuation mistake creates a dollar-for-dollar distortion across two distinct periods:

  • Understating ending inventory: Artificially increases COGS, which understates gross profit, operating margin, and net income in the current period.
  • Overstating ending inventory: Artificially reduces COGS, which overstates current gross profit and gives an overly optimistic picture of business profitability.
  • The self-reversing effect: Since ending inventory becomes the next period beginning inventory, an error in year one automatically creates an equal and opposite distortion in year two, correcting cumulative retained earnings if left unadjusted.

Strategies to optimize ending inventory levels

Striking the right balance between excess inventory carrying costs and stockout risk requires disciplined inventory management:

  • Conduct routine cycle counts: Rather than relying solely on a massive annual physical audit, count high-velocity stock categories on a continuous weekly or monthly schedule to reconcile shrinkage, breakage, and system discrepancies early.
  • Implement ABC classification: Group inventory by value. Focus rigorous reorder controls on Category A (the top 20% of items delivering 80% of revenue), while keeping looser safety stock on low-value Category C supplies.
  • Establish dynamic reorder points: Set minimum safety stock buffers based on supplier lead times, seasonal demand spikes, and average daily consumption rates to avoid emergency air-freight fees.
  • Identify and discount slow-moving goods: Items that remain in ending inventory across several quarters consume valuable warehouse space and tie up operational capital. Bundle or discount aging inventory to recover cash flow quickly.

Frequently asked questions

How does ending inventory impact cost of goods sold and net income?
Ending inventory is deducted from the total cost of goods available for sale. A higher ending inventory leaves a smaller residual cost assigned to COGS, which increases gross profit and net income. Conversely, a lower ending inventory increases COGS and reduces reported profit for that period.
What does it mean if ending inventory is calculated as negative?
In real-world accounting, physical inventory cannot be negative. If the formula yields a negative result, recorded COGS exceeds the sum of starting inventory and purchases. This typically indicates unrecorded purchases, timing mismatches in bookkeeping, inventory shrinkage, or bookkeeping misclassifications.
Can ending inventory be estimated without a physical inventory count?
Yes. When an immediate physical count is impractical, businesses frequently employ the gross profit method or the retail inventory method. The gross profit method applies historical gross margin percentages to current sales to estimate COGS and deduce closing stock value.
What is the relationship between beginning and ending inventory?
Ending inventory on the final day of one accounting period automatically becomes the beginning inventory on the first day of the subsequent accounting period. This continuous chain ensures all inventory costs are accounted for across fiscal years.
Why do lenders exclude inventory from the acid-test quick ratio?
Inventory is the least liquid of all current assets because converting merchandise into cash requires finding buyers and collecting payments. During financial distress, liquidating inventory quickly often forces severe markdowns, so lenders exclude it when measuring immediate debt-paying ability.
Are my calculation inputs saved or transmitted to a server?
No. All calculations run entirely in your local web browser. Your inputs are encoded directly into the URL parameters so you can bookmark or share your scenarios without storing any business data on our servers.

Resources and references

The formulas and methods in this calculator were checked against these independent sources.