A cortisol in urine test, typically a 24-hour urine collection, is a quantitative measurement of the level of free cortisol excreted in the urine over a specific time period. This measurement reliably reflects average cortisol production over a 24-hour period, avoiding the natural fluctuations in blood cortisol levels that occur throughout the day. It is a key test in the diagnosis of hypercortisolism (Cushing's syndrome).