Days Inventory on Hand Formula: Every Variant, One Worked Example
DIO = average inventory / COGS x days in period. The 365, 360, ending-inventory and turnover variants in one table, with a worked example.
On this page
TL;DR: Days inventory on hand (DIO) = (average inventory / cost of goods sold) x days in the period. It tells you how many days your stock lasts at the current rate of sale, measured at cost. LuckPanda's free gross margin calculator gives you the COGS side today, and its Inventory module (being built) will hold the stock records the formula needs.
Work out your cost of goods sold and margin first with LuckPanda's free gross margin calculator, no account needed.
The days inventory on hand formula is DIO = (Average inventory / Cost of goods sold) x Number of days in the period, where average inventory = (beginning inventory + ending inventory) / 2 and both figures are at cost. For a year use 365 days, for a quarter 90 or 91, for a month 30 or the actual days. The same number comes from 365 / inventory turnover ratio. A business with ₹3,00,000 of average stock and ₹18,00,000 of annual COGS has 60.8 days of inventory on hand.
Days inventory on hand formula variants
This is the table most guides leave out: the same metric is calculated at least five ways, and they give different answers.
| Variant | Formula | Worked result (example below) | Use it when |
|---|---|---|---|
| Standard, 365-day | (Average inventory / COGS) x 365 | 60.83 days | Annual reports, comparing years |
| Banker's 360-day | (Average inventory / COGS) x 360 | 60.00 days | Your lender or analyst uses 360 |
| Ending inventory | (Ending inventory / COGS) x 365 | 40.56 days | You only have a closing balance |
| From turnover | 365 / (COGS / Average inventory) | 60.83 days | You already track turnover |
| Daily COGS | Average inventory / (COGS / 365) | 60.83 days | You think in "daily burn" |
| Quarterly | (Average quarterly inventory / quarterly COGS) x 90 | depends on quarter | Seasonal stock, quarterly reviews |
The 365 and 360 versions differ by about 1.4%. The ending-inventory version differs much more whenever stock rose or fell during the period, so never mix it with the average version in one trend line.

What goes into each part of the formula?
Average inventory is (beginning + ending inventory) / 2, at cost (CFI). If you have monthly closing balances, average all twelve: it smooths seasonal peaks better than two points. See average inventory for the monthly method.
Cost of goods sold is beginning inventory + purchases - ending inventory (COGS formula). Under IAS 2, sold inventory is expensed in the period its revenue is recognised, and write-downs to net realisable value and stock losses are expensed in the period they happen (IFRS, IAS 2). A large write-down raises COGS and lowers DIO without stock moving any faster.
Days in the period must match the COGS period: 365 with annual COGS, 90 with quarterly COGS. Using 365 with one quarter's COGS inflates DIO four times.
Valuation method matters: IAS 2 allows FIFO or weighted average for interchangeable items. In rising prices FIFO leaves newer, dearer stock on the balance sheet, so the same shelf can show a higher DIO than under weighted average. See beginning inventory and ending inventory.
Worked example: a hardware shop
A hardware shop in Pune closes its books for FY 2025-26:
- Opening inventory (1 April): ₹4,00,000
- Closing inventory (31 March): ₹2,00,000
- COGS for the year: ₹18,00,000
- Average inventory = (4,00,000 + 2,00,000) / 2 = ₹3,00,000
- Inventory turnover = 18,00,000 / 3,00,000 = 6.0
- DIO = 3,00,000 / 18,00,000 x 365 = 60.83 days
- Check: 365 / 6.0 = 60.83 days
Daily COGS is 18,00,000 / 365 = ₹4,932, so each ₹4,932 of stock you cut takes about one day off DIO.

This part of the WallStreetMojo lesson works the two-step method: inventory turnover from COGS and average inventory, then 365 divided by turnover. COGS of 60,000 and average inventory of 30,000 give a turnover of 2 and 182.5 inventory days.
- 2:22 The two-step method is introduced
- 2:45 Turnover = COGS / average inventory
- 3:09 Worked example: COGS 60,000, stock 40,000 and 20,000
- 4:20 365 / 2 = 182.5 days
Two mistakes in popular guides
Subtracting instead of averaging. One widely read guide defines "value of inventory" as start-of-period value minus end-of-period value (Shopify, read 2026-11-25). That gives the drop in stock, not the stock you held. Use (beginning + ending) / 2, as CFI and Wikipedia do.
Dividing by the wrong turnover. Another guide states a turnover of 4.2 and then divides 365 by 2.5 (ShipBob, read 2026-11-25). With 4.2 the answer is 365 / 4.2 = 86.90 days. Always check that DIO x turnover = days in the period.
Tracking the inputs in LuckPanda
LuckPanda's Inventory module covers items, warehouses and stock movements. The module page states plainly that it is being built, so it does not calculate DIO for you today. What it is built to do:
- One item list with unit, prices and tax, used on quotes, invoices and purchase orders.
- Stock held by warehouse, so DIO can be worked out per location rather than only in total.
- Every receipt, delivery, transfer and adjustment recorded as a stock movement with its date, quantity and the document that caused it, with stock on hand per item and location at any date. Those dated balances are the opening and closing figures this formula needs.
- Pricing: $4.99 per module per month (₹199 in India), per module, not per user (pricing).
Today you can use the free gross margin calculator for the COGS side and the inventory turnover ratio guide for the other half of the check.
How many days of stock is healthy?
A good DIO is one that is lower than your own last year and close to peers in the same industry; there is no universal number. Wikipedia notes that a high value can reflect deliberate stock policy, seasonality or the business model, so comparisons work best within an industry and over time (Days in inventory). A grocer turning fresh stock weekly and a jeweller holding pieces for months both run healthy businesses. Set your own target from your supplier lead time plus safety stock: see the reorder point formula.
DIO vs inventory turnover: what is the difference?
They are the same measure turned around. Inventory turnover = COGS / average inventory (times per period); DIO = days in period / turnover (days per cycle). Turnover of 6.0 a year equals 60.83 days; turnover of 12 equals 30.42 days. Higher turnover means lower DIO.
| Metric | Formula | Unit | Better when |
|---|---|---|---|
| Inventory turnover | COGS / average inventory | times per period | higher |
| Days inventory on hand | average inventory / COGS x days | days | lower, within reason |
Questions
What is the days inventory on hand formula?
DIO = (average inventory / cost of goods sold) x days in the period, with average inventory = (beginning + ending inventory) / 2, all at cost. Equivalently, DIO = 365 / inventory turnover for a year.
What is a good days inventory on hand?
One that beats your own prior periods and sits near peers in your industry. There is no single target; compare within an industry and over time.
DIO vs inventory turnover?
Turnover counts how many times stock sells through in a period; DIO converts that into days. DIO = days in period / turnover.
Is days inventory outstanding the same as days in inventory?
Yes. Days inventory outstanding, days in inventory, days sales of inventory, inventory days of supply and the inventory period all name the same ratio.
Should I use 365 or 360 days?
Use 365 unless your lender or analyst uses 360. Stay consistent: the 360 result is about 1.4% lower.
Why use cost, not selling price?
Inventory sits on the balance sheet at cost, so the daily usage it is divided by must also be at cost: COGS, not revenue.
Ready to keep one record of items, stock and money? Start free on LuckPanda and see what the Inventory module will cover.