Function of the hypothalamus-pituitary-adrenal (HPA) axis has been associated with several somatic and psychiatric health problems. The amount of free cortisol excreted in the urine during 24h (24-h UFC) has often been used as a proxy for HPA-axis function. Reference values for 24-h UFC and their stability in the short and long term, as well as sources of variability, are largely lacking. This study was performed in a general population cohort. Participants collected 24-h UFC on two consecutive days (T1), and repeated this collection approximately 2 years later (T2). Cortisol in urine was measured using LC-MS/MS. Height and weight were measured at the research facilities; glomerular filtration rate was estimated using creatinine clearance. Psychological distress (General Health Questionnaire), smoking, alcohol use and exercise were measured by means of questionnaires. 24-h UFC stability on a day-to-day basis was 0.69 (T1, N=1192) and 0.72 (T2, N=963) (both p<0.001). Long-term stability as indicated by correlation between 2-day averages of T1 and T2 was 0.60 (N=972, p<0.001). Multivariable linear regression analysis revealed that 24-h UFC was predicted by urine volume (standardized beta 0.282 (T1, N=1556) and 0.276 (T2, N=1244); both p<0.001) and glomerular filtration rate (standardized beta 0.137 (T1) and 0.179 (T2); both p<0.001), while also sex explained a small part (standardized beta for female sex -0.057 (T1) and -0.080 (T2); both p<0.05). 24-h UFC is moderately stable both in the short and the long term. The effects of urine volume and glomerular filtration rate on 24-h UFC are much stronger than those of sex.