BACKGROUND Men appear to benefit more from being married than women with respect to mortality in middle age. However, there is some uncertainty about gender differences in mortality risks in older individuals, widowed, divorced and single individuals and about the impact of living arrangements. METHODS Longitudinal data with 1990 census records being linked to mortality data up to 2005 were used (Swiss National Cohort). The sample comprised all residents over age 44 years in Switzerland (n=2,440,242). All-cause mortality HRs for marital status and living arrangements were estimated by Cox regression for men and women and different age groups with adjustment for education and socio-professional category. RESULTS The benefit of being married was stronger for men than for women; however, mortality patterns were similar, with higher mortality in divorced and single individuals compared with widowed individuals (<80 years). After adjustment for living arrangements, the gender difference by marital status disappeared. Stratification by living arrangement revealed that mortality risks were highest for 45-64-year-old divorced (HR 1.72 (95% CI 1.67 to 1.76)) and single men (HR 1.67 (95% CI 1.63 to 1.71)) who lived alone. In women of the same age, the highest mortality risk was observed for those who were single and living with a partner (HR 1.70 (95% CI 1.58 to 1.82)). In older age groups, the impact of marital status decreased. CONCLUSIONS Evaluation of living arrangements is crucial for identifying and explaining gender differences in mortality risks by marital status. The impact of living alone and living with a partner seems to be different in men and women.