IntroductionThe present article aimed to investigate 1) if mental health problems (depression and burnout including the dimensions; emotional exhaustion, mental distance and cognitive and emotional impairment) differed between nurses and physicians in Sweden, 2) if any differences were explained by differences in sex compositions, and 3) if any sex differences were larger within either of the two professions. MethodData were derived from a representative sample of nurses (n = 2903) and physicians (n = 2712) in 2022. Two scales were used to assess burnout (KEDS and BAT) and one to assess depression (SCL-6). The BAT scale has four sub-dimensions. Descriptive statistics and logistic regression were used to analyse each scale and dimension separately. ResultsResults showed that 16–28 % of nurses and physicians reported moderate to severe symptoms of burnout. The prevalence differed between occupations across the scales and dimensions used. Nurses reported higher scores on KEDS while physicians reported higher scores on BAT including the four dimensions. Also, 7 % of nurses' and 6 % of physicians' scores were above the cut-off for major depression. The inclusion of sex in the models changed the odds ratios of differences between doctors and nurses in all mental health dimensions except mental distance and cognitive impairment. LimitationsThis study was based on cross-sectional survey data which has some limitations. ConclusionOur study suggests that the prevalence of mental health problems is prominent among nurses and physicians in Sweden. Sex plays an important role in the difference in the prevalence of mental health problems between the two professions.