ObjectiveWe investigated the association between socioeconomic factors and the attainment of treatment goals and pharmacotherapy in patients with type 2 diabetes in Denmark.DesignA cross-sectional population study.SettingThe municipality of Naestved, Denmark.SubjectsWe studied 907 patients with type 2 diabetes identified from a random sample of 21,205 Danish citizens.Main outcome measuresThe proportion of patients who were not achieving goals for diabetes care based on their HbA1c, LDL-cholesterol, blood pressure, and lifestyle, and the proportion of patients who were treated with antihypertensive and cholesterol- and glucose-lowering medication.MethodsWe investigated the association of the socioeconomic factors such as age, gender, education, occupation, income, and civil status and attainment of treatment goals and pharmacotherapy in logistic regression analyses. We investigated effect modification of cardiovascular disease and kidney disease.ResultsMiddle age (40–65 years), low education level (i.e. basic schooling), and low household income (i.e. less than 21,400 € per year) were associated with nonattainment of goals for diabetes care. The association of socioeconomic factors with attainment of individual treatment goals varied. Patients with low socioeconomic status were more often obese, physically inactive, smoking, and had elevated blood pressure. Socioeconomic factors were not associated with treatment goals for hyperglycemia. Socioeconomic factors were inconsistently associated with pharmacotherapy. There was no difference in contacts to general practitioners according to SES.ConclusionsIn a country with free access to health care, the socioeconomic factors such as middle age, low education, and low income were associated with nonattainment of goals for diabetes care.Key pointsMiddle age, low education, and low income were associated with nonattainment of goals for diabetes care, especially for lifestyle goals.Patients with low socioeconomic status were more often obese, physically inactive, smoking, and had elevated blood pressure.Association of socioeconomic factors with pharmacotherapy was inconsistent.