calculate_days_inventory_outstanding
Calculate days inventory outstanding (DIO): the average number of days a company holds inventory before selling it. Formula: DIO = 365 / Inventory Turnover. WHEN TO USE: Use to assess inventory efficiency and capital tied up in stock; high DIO risks obsolescence and cash drag. WHEN NOT TO USE: Do NOT apply mechanically across industries — optimal DIO differs hugely between fresh grocery and heavy machinery. BEHAVIOUR: pure deterministic calculation — no side effects, no network or storage access; idempotent and non-destructive; identical inputs always produce identical outputs. Division by zero or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { days_inventory_outstanding: number of days (e.g. 60.8), inputs }. PARAMETERS: cogs (required): Cost of goods sold for the period, e.g. 600000. Must be > 0. begin_inventory (required): Inventory at period start, e.g. 90000. Must be >= 0. end_inventory (required): Inventory at period end, e.g. 110000. Must be >= 0.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cogs | Yes | Cost of goods sold for the period, e.g. 600000. Must be > 0. | |
| end_inventory | Yes | Inventory at period end, e.g. 110000. Must be >= 0. | |
| begin_inventory | Yes | Inventory at period start, e.g. 90000. Must be >= 0. |