The prevalence of Vit-D deficiency in older adults with cognitive impairment is approximately 70% to 90%. Likewise, epidemiological studies have shown that low levels of Vit-D in the blood are associated with an increased risk of Alzheimer's disease (AD) and dementia. Primary objective: To determine the relationship between Vitamin D deficiency with mild cognitive impairment and dementia in patients over 65 years of age. Secondary Objectives. Describe the clinical and sociodemographic characteristics of patients with vitamin D alterations. Cross-sectional study was carried out in the cognition clinic of the Institute of Medical Sciences and Nutrition Salvador Zubirán. Patients with a diagnosis of Mild Cognitive Impairment, dementia and patients without cognitive impairment (controls) were included. They will have a determination of 25-Hydroxy vitamin D. Three categories were formed according to their level:> 20ng / ml normal, 12-20ng / ml mild deficiency and <12ng / ml severe deficiency. ANOVA was used to analyze continuous variables and non-parametric test according to the variable studied. By means of post hoc analysis, differences between groups were analyzed. Finally, a correlation analysis was performed using the Spearman rho coefficient between cognitive performance and vitamin D levels. The statistical package SPSS version 22 was used. 200 patients were evaluated, of which 31 belonged to the control group, 85 to the group with MCI and 84 to the dementia group. In the three groups were more women than man, in the control group showed statistically significant difference in mean age (p <0.01), year of education (p = 0.04) and functionality (p <0.01). In the group of severe deficiency there was worse performance, in the executive functions and the evocation. The correlation for executive functions was 0.250, p = <0.001, Pearson's correlation for vitamin D and total Mini-mental score was 0.203, p = <0.005. There is a relationship between vitamin D deficiency and global cognitive functioning. Likewise, severe deficiency affects specific domains of memory (evocation and executive functions).