The purposes of this study were to evaluate the mental health status of Japanese medical students and to examine differences based on gender, as well as on university type and location, using the results of a nationwide survey. Between December 2006 and March 2007, we conducted a questionnaire survey among fourth-year medical students at 20 randomly selected medical schools in Japan. The data from 1,619 students (response rate: 90.6%; male: 1,074; female: 545) were analyzed. We used the Japanese version of the 12-item General Health Questionnaire (GHQ-12) to measure mental health status. Poor mental health status (GHQ-12 score of 4 points or higher) was observed in 36.6% and 48.8% of the male and female medical students, respectively. The ratio of the age-adjusted prevalence of poor mental health status in female versus male medical students was 1.33 (95% confidence interval: 1.10-1.62). The universities were categorized into two groups based on the university type (national/public: 15 vs. private: 5) or location (in a large city: 7 vs. in a local city: 13 cities). The prevalence of poor mental health status in both men and women differed between these groups, although not significantly. The GHQ-12 scores in men significantly differed between the categorized groups of universities. These results suggest that adequate attention must be paid to the mental health of medical students, especially females, and that a system for providing mental health care for medical students must be established in the context of actual conditions at each university.