The present study aimed to investigate the association between the severity of erectile dysfunction (ED) and serum 25-hydroxy vitamin D. It also sought to determine the cut-off level of serum 25-hydroxy vitamin D for ED. This study included 130 men who had ED between 2018 and 2019. Patients were divided into three groups according to their scores on the international index of erectile function-5 (IIEF-5) Turkish validated short form questionnaire. The serum 25-hydroxy vitamin D results were compared between the groups. The mean age of the patients was 49.28 +/- 13.62 years. Groups 1, 2 and 3 included 44 (33.8%) patients with severe ED, 56 (43.1%) patients with moderate ED and 30 (23.1%) patients with mild ED, respectively. Statistical significance was observed between the groups and serum 25-hydroxy vitamin D levels. A positive correlation was detected between the IIEF-5 scores, serum testosterone and serum 25-hydroxy vitamin D levels. A cut-off level for serum 25-hydroxy vitamin D was calculated as 27.32 ng/ml. During multivariate analysis, we found that serum 25-hydroxy vitamin D levels were independent prognostic risk factors for decreased IIEF-5 scores. Decreased serum 25-hydroxy vitamin D levels were associated with decreased IIEF-5 scores. Therefore, vitamin D replacement therapy may improve symptoms.