Add days inventory outstanding and days sales outstanding, then subtract days payables outstanding. Days inventory is inventory divided by cost of goods sold, times 365. Days sales outstanding is receivables divided by revenue, times 365. Days payables is payables divided by cost of goods sold, times 365.
