Exposure to severe stress in early pregnancy is associated with a lower male to female ratio (sex ratio), but whether more moderate levels of psychological discomfort have the same kind of effect is unknown. In a population based follow-up study, we aimed to test whether psychological distress was associated with the sex ratio in the offspring. From 1989 to 1992, a cohort of 8719 Danish-speaking pregnant women were followed until delivery. Questionnaires were administered to the women in early pregnancy and 6629 (76%) completed the 30-item version of the General Health Questionnaire (GHQ). We found an overall male to female ratio (sex ratio) of 1.03. There was an inverse dose response association (test for trend P < 0.01) between GHQ score and sex ratio. Each 5-point increase in the GHQ score was associated with a decreasing odds of having a boy [Odds ratio (OR) = 0.93, 95% CI 0.89–0.98]. Mothers scoring in the upper quartile of the GHQ had 47% boys as compared with 52% in the undistressed groups (Risk difference =4.8%, 95% CI 1.9–7.7%) resulting in a significantly lower sex ratio of 0.85 compared with 1.07 (OR 0.82, 95% CI 0.72–0.94). Our results suggest that not only severe stress, but also more moderate and common levels of psychological distress, may decrease the sex ratio in the offspring. Stress during pregnancy is a likely candidate involved in the decreasing sex ratio observed in many countries.