Introduction: In this study we estimated the rate and the trajectory of cognitive impairment in a naturalistic sample of outpatients with major depressive disorder (MDD) and bipolar disorder (BD) and its correlation with different variables.Materials and methods: An overall sample of 109 outpatients with MDD or BD was assessed for multiple clinical variables, including duration of untreated illness (DUI), and tested using the Montreal Cognitive Assessment (MoCA) during Major Depressive Episodes (MDE) and after remission. Correlations between MoCA scores and the clinical variables were then computed.Results: About 50% of patients with MDD and BD showed mild cognitive impairment during MDE. Improvement of cognitive function between depression and remission was significant, even though residual symptoms were observed especially in the most impaired patients. Of note, cognitive performance during depression was negatively associated with depression severity and DUI.Discussion: Present findings confirm available evidence about patterns of cognitive impairment in mood disorders, in terms of prevalence and persistence beyond remission in most severe cases. Moreover, a longer DUI was associated with worse cognitive performance during depression, and consequently with poorer outcome, underlining the importance of prompt treatment of these disorders also in light of a cognitive perspective.KeypointsAlthough distinct entities, unipolar and bipolar depression determine similar patterns of cognitive impairment in terms of severity and types of altered domains.Depression (but not anxiety) severity is associated with cognitive performance in depression.Prolonged duration of untreated illness is associated with more severe cognitive impairment during depression, particularly but not specifically in bipolar disorder.