To examine the impact of gender and socioeconomic factors on health-related quality of life (HRQoL) one year and eight years after diabetes diagnosis. Two national incidence cohorts who contracted diabetes between the ages of 15 and 34 years (n=554) and matched control groups from the general population of Sweden (n=1,029) were surveyed. Data on HRQoL, diabetes treatment, marital status, education, social class, and employment were collected via a questionnaire mailed to the younger cohort (aged 16-35) one year after diagnosis and to the older cohort (aged 23-42) eight years after diagnosis. Response rates were 73% among people with diabetes and 68% among the controls. Multivariable linear regression models were used to analyse the impact of gender and socioeconomic factors on HRQoL in the diabetic and control groups. The dependent variable was the "general health perceptions" score of the SWED-QUAL instrument, which corresponds to the "global self-rated health" concept. A model including all the sociodemographic variables explained 6% of the variance in self-rated health one year after diabetes diagnosis and 13% of the variance eight years after diagnosis. In the control groups, the level of explanation was 2-3%. Female gender was an independent predictor of poor self-rated health in the older diabetic cohort, but not in the younger cohort. Gender and socioeconomic factors were more closely associated with self-rated health eight years after diabetes diagnosis than one year after diagnosis, indicating early sociodemographic stratification in the health of the diabetic populations studied.