Age and female sex are risk factors for dementia, and menopause is associated with cognitive dysfunction. Previous work largely considered the effects of sex and menopause as being independent of age. We studied whether age interacts with sex or menopause in explaining imaging biomarkers of dementia during midlife.In this cross-sectional study of UK Biobank participants with brain magnetic resonance imaging (MRI), we explored the interaction of age with sex or menopausal status in explaining total brain (TBV), grey matter (GMV), white matter (WMV), white matter hyperintensities (WMHV), regional cortical, and subcortical volumes.Data were available for 1827 postmenopausal women, 230 pre/perimenopausal women and 2165 men (median age 63.3 years). There was a significant interaction between age and sex (p=0.024) for TBV, where the inverse association age with TBV was steeper in women (β=-5.35 ml/year) than in men (β=-4.77 ml/year). Similar age-sex interactions were also observed for GMV and WMV. In women, there was a significant interaction between age and menopausal status (p=0.007) where the inverse association of age with TBV was steeper in postmenopausal (β=-5.89 ml/year) than in pre/perimenopausal women (β=-1.61 ml/year). Similar age-menopause interactions were found in predicting lower GMV and higher WMHV. Differences in the direction of these age-sex and age-menopause interactions were found for regional cortical and subcortical brain volumes.Sex and menopause both interact with age during midlife in explaining MRI biomarkers of dementia. Further work is required to understand the mechanisms driving these interactions to develop strategies for delaying dementia.