What is the Days of Inventory Formula? (Importance and Example)

Last updated on by Editorial Staff
Days of Inventory Formula

Days of inventory is average inventory divided by cost of goods sold, times the days in the period. It shows how many days of sales your stock covers. Walmart’s latest 10-K works out to about 39 days, Home Depot’s to about 82 and Apple’s to about 15, so the right number depends on the business.

If you want to know how many days of stock you have left, that is days of supply, a different calculation covered below.

What is days of inventory?

Days of inventory (DOI), also called days in inventory (DII), days inventory outstanding or days sales of inventory, measures how long a business takes to sell the average stock it holds, using cost of goods sold as the sales rate.

It looks backward. It uses last period’s cost of sales, so it describes how stock behaved, not how long today’s shelves will last. That forward-looking question is days of supply: units on hand divided by expected daily demand.

Read the number against the business, not against a rule. A higher figure means cash sits in stock for longer, which can be slow or excess items or a deliberate buffer. A lower figure means stock turns quickly and frees cash, but leaves less room for a late delivery or a demand spike. The company table below runs from 15 to 82 days on the same formula.

What is the days of inventory formula?

Days of inventory = (Average inventory / Cost of goods sold) × Days in the period

Three choices change the answer, so fix them before you compare two companies or two years.

ChoiceOptionsWhat it does
Inventory figureAverage of opening and closing, or closing onlyThe average smooths a year of change. Apple’s inventory grew from $5.7 billion to $14.5 billion in its latest year, so the average gives 15.1 days and closing inventory alone gives 21.6, a gap of 6.6 days.
Days in the period365, 360, or the actual days in the fiscal yearSmall. Walmart’s fiscal year ran 364 days, which moves its result by about a tenth of a day.
Cost figureCost of goods sold, or salesStock is carried at cost, so use cost of goods sold. Sales include margin, which makes the days look shorter than they are.
Method choices that change days of inventory.

Days of inventory formula

The days in inventory formula is:

Formula of Day of Inventory

Days of inventory = (Average Inventory / Cost of Goods Sold) × 365

Where:

Average inventory is the average on-hand inventory value over the period: (Beginning inventory + Ending inventory) / 2.

Cost of goods sold is the cost of the goods sold during the same period, as the income statement reports it.

365 is the number of days in a year. Use the days in your own period for a quarter or month.

The same fact can be written with turnover: Days in inventory = 365 / Inventory turnover, where inventory turnover = Cost of goods sold / Average inventory. The inventory turnover calculator works from the same two inputs.

Days of supply and weeks of supply

Days of supply = Units on hand / Average daily demand, and weeks of supply = Days of supply / 7. This is the forward-looking measure. It needs units and a demand forecast, not accounting values.

Days of inventory calculator

Enter values in one currency for the first calculator, and units for the second. Blank or negative entries are rejected, not treated as zero.

Days of inventory

Days of supply

Days of inventory formula example

A company’s beginning inventory is $40,000, its ending inventory is $50,000 and its cost of goods sold is $200,000 for a 365-day year.

StepCalculationResult
Average inventory($40,000 + $50,000) / 2$45,000
Inventory turnover$200,000 / $45,0004.44 times
Days of inventory($45,000 / $200,000) × 36582.1 days
Check365 / 4.4482.1 days
Worked example, average-inventory method.

Using ending inventory alone gives ($50,000 / $200,000) × 365 = 91.3 days, nine days longer, because stock grew during the year.

For days of supply, take a distributor holding 12,000 units that ships 400 a day: 12,000 / 400 = 30 days, or 4.3 weeks. If demand rises to 500 a day, the same stock lasts 24 days.

Days of inventory for real companies

The formula is the same everywhere; the answer is not. Each row below is computed from the company’s latest annual report (Form 10-K) filed on the SEC’s EDGAR system, using the reported opening and closing inventory and cost of sales, and a 365-day year.

Company (10-K)Cost of sales ($B)Inventory, start to end ($B)Days (average)Days (closing)
Apple245.25.7 to 14.515.121.6
Costco264.318.1 to 19.325.926.7
Walmart535.456.4 to 58.939.340.1
Target75.512.7 to 12.360.559.5
Home Depot109.823.5 to 25.881.985.8
Fiscal years ended Apple Sep 26, Costco Aug 30, Walmart Jan 31, Target Jan 31 and Home Depot Feb 1, 2026 (all from the filings).

The range comes from what each business sells and how it buys, not from the formula. Compare a company with its own history and its direct peers, and note which inventory figure you used.

Importance of days of inventory

Infographic of Importance of days of inventory

It helps to plan and control stock levels.

Compare your days of inventory with the days you need to cover supplier lead time plus a safety buffer. Holding 60 days when replenishment takes 14 means stock far above what the lead time needs; holding 10 means the next late delivery stocks you out. See reorder point and the safety stock calculator.

It helps you manage cash flow.

Stock is bought with cash. At $200,000 of annual cost of goods sold, one day of inventory is about $548 of cost (200,000 / 365). Cutting 10 days would release about $5,500.

It helps you make better business decisions.

Track it by product line or warehouse as well as company-wide. A healthy total can hide a slow product that is quietly tying up cash.

It helps you evaluate your suppliers.

A rising figure can follow longer supplier lead times, because you hold more stock against late deliveries. It is one cause among several, so check lead-time data before blaming a supplier.

It helps you assess product demand.

A falling figure often means an item sells faster than you restock it, and a rising one that it sells slower. Check the sales trend before you change orders.

It helps you track your cost of goods sold.

Cost of goods sold is the denominator, so a cost increase alone lowers the figure without stock moving any faster. Read the two inputs separately before you read the ratio.

It helps you identify trends over time.

Compare the same quarter in successive years. Seasonal stock build-up lifts a single quarter’s figure and is not a trend.

FAQs

What are the benefits of the days of inventory formula?

It shows how long cash stays tied up in stock, and it lets you compare periods, product lines or peers on one scale. Read with the sales trend, it tells you when to cut orders or add buffer.

What is inventory turnover?

Inventory turnover is cost of goods sold divided by average inventory: how many times the stock is sold and replaced in the period. Days of inventory is 365 divided by that number. Walmart’s latest annual report gives 9.3 turns, which is about 39 days.

What is the difference between inventory turnover and days in inventory?

They state the same fact two ways: turnover counts how many times a year the stock sells through, and days of inventory expresses it as time. Days of supply is different. It looks forward, dividing units on hand by expected daily demand.

Which version to use

To compare companies, use the average-inventory version over a full year on the same fiscal calendar. To decide whether to reorder, use days of supply on current units and forecast demand.

Keep one method fixed and write it beside the number, because a change of method looks like a change in performance. For the wider picture, see inventory management.

Using Google Search? Add erp-information.com as a preferred source.