Objective: To investigate associations between age, lifestyle and erectile dysfunction (ED) in the general population and to explore associations between age, lifestyle and contact with a general practitioner (GP) regarding ED.Design: Cross-sectional web-based questionnaire study.Setting: The general Danish population.Subjects: A randomly selected sample of 48,910 men aged 20 years and older.Main outcome measures: Prevalence of ED and probability of contacting a GP regarding ED. In logistic regression models we analysed associations between age, smoking status, alcohol consumption, body mass index (BMI), and self-rated physical fitness on both ED and GP contact.Results: A total of 22,198 men (47.6%) completed the question regarding ED. The overall prevalence of ED was 19.3%, varying from 2.3% among men aged 20-29 years to 55.3% among men aged 80 years and above. 31.8% of men reporting ED had contacted a GP regarding ED. Increasing age, current or former smoking, complete alcohol abstinence or alcohol consumption above seven units per week, high BMI, and poor self-rated physical fitness were significantly associated with reporting ED. The proportion of GP contacts was significantly associated with age. Overall, no significant associations between lifestyle and healthcare seeking were observed, although lower odds of GP contact were found when physical fitness was rated as poor.Conclusion: Reporting ED and GP contact were significantly associated with age. Furthermore, lifestyle was significantly associated with reporting ED, but largely not associated with healthcare seeking. These findings are important for future interventions aiming to improve diagnosis and treatment of ED.Key pointsExperiencing erectile dysfunction is frequent in the general population, especially among older men. • In this large-scale national survey, age and lifestyle were significantly associated with reporting erectile dysfunction. • Healthcare seeking with erectile dysfunction was significantly associated with age, but not with lifestyle. • Diagnosis and treatment of erectile dysfunction might be challenged when erectile dysfunction does not lead to healthcare seeking.