Aims Cardiac rehabilitation (CR) not only improves cardiovascular outcomes, but also health-related quality of life (HRQOL). Unfortunately, CR is still underutilized, especially among women and older patients. Aim of this study was to highlight age- and sex-specific effects of inpatient CR on HRQOL. Methods and results From 2012 to 2018, 18 459 patients were prospectively assessed in six Swiss CR clinics. Of these, we retrospectively analysed a final sample of 8286 patients with a mean (standard deviation) age of 67.8 (11.3) in men and 72.2 (11.3) in women. HRQOL was measured at CR entry and discharge. In multivariable analyses, sex- and age-specific changes in HRQOL throughout CR were estimated, adjusting for baseline HRQOL and clinical characteristics. Participants of both sexes improved significantly (P < 0.001) in all domains of HRQOL during CR. Women reported significantly lower social (P < 0.001) and emotional (P < 0.001) HRQOL than men at CR entry. Female sex predicted greater improvement in social (F = 19.63, P < 0.001), emotional (F = 27.814, P < 0.001), and physical HRQOL (F = 20.473, P < 0.001). In a subgroup of n = 2632 elderly patients (>75 years), female sex predicted greater changes in emotional (F = 15.738, P < 0.001) and physical (F = 6.295, P = 0.012), but not in social HRQOL. Conclusion Women report poorer HRQOL at CR entry compared with men, but in turn particularly benefit from CR in this regard. Our results indicate that sex- and age-specific needs of patients should be considered.