Table:
|  | Three Months Ended |  |  |
| --- | --- | --- | --- |
| (in days) |  |  |  |
| Three Months Ended | April 26, 2019 | April 27, 2018 | April 28, 2017 |
| Days sales outstanding (1) | 70 | 58 | 45 |
| Days inventory outstanding (2) | 21 | 18 | 26 |
| Days payables outstanding (3) | (87) | (90) | (56) |
| Cash conversion cycle (4) | 3 | (14 ) | 15 |
| Days may not add due to rounding |  |  |  |
Paragraphs:
Cash Conversion Cycle
The following table presents the components of our cash conversion cycle for the fourth quarter of each of the past three fiscal years:
(1) Days sales outstanding, referred to as DSO, calculates the average collection period of our receivables. DSO is based on ending accounts receivable and net revenue for each period. DSO is calculated by dividing accounts receivable by average net revenue per day for the current quarter (91 days for each of the fourth quarters presented above). The year over year increases in DSO in the fourth quarter of fiscal 2019 and fiscal 2018 were primarily due to less favorable shipping linearity and, in the case of fiscal 2019, one of our major distributors choosing not to take advantage of an early payment discount.
(2) Days inventory outstanding, referred to as DIO, measures the average number of days from procurement to sale of our products. DIO is based on ending inventory and cost of revenues for each period. DIO is calculated by dividing ending inventory by average cost of revenues per day for the current quarter. The increase in DIO in the fourth quarter of fiscal 2019 compared to the corresponding period of fiscal 2018 was primarily due to higher levels of finished goods on hand at the end of fiscal 2019. Compared to the corresponding period in fiscal 2017, the decrease in DIO in the fourth quarter of fiscal 2018 was due primarily to strong product sales towards the end of the fourth quarter of fiscal 2018.
(3) Days payables outstanding, referred to as DPO, calculates the average number of days our payables remain outstanding before payment. DPO is based on ending accounts payable and cost of revenues for each period. DPO is calculated by dividing accounts payable by average cost of revenues per day for the current quarter. DPO for the fourth quarter of fiscal 2019 was relatively unchanged compared to the fourth quarter of fiscal 2018, while it increased compared to the corresponding period in fiscal 2017 was primarily the result of improved vendor payables management and extensions of payment terms with our suppliers.
(4) The cash conversion cycle is the sum of DSO and DIO less DPO. Items which may cause the cash conversion cycle in a particular period to differ include, but are not limited to, changes in business mix, changes in payment terms (including extended payment terms from suppliers), the extent of shipment linearity, seasonal trends and the timing of revenue recognition and inventory purchases within the period.
Question:
What was days inventory outstanding based on?
Answer: ending inventory and cost of revenues for each period.