Coffee and tea lovers, rejoice. A long-term study evaluating dietary intake and cognitive health found that drinking moderate amounts of the caffeinated beverages every day was significantly associated with a lower risk of dementia.

The study, published in the Journal of the American Medical Association last month, followed over 131,000 participants in the U.S. who did not have cancer, Parkinson’s disease or dementia at the start of the study as a baseline.

The study included more than 86,000 female participants in the Nurses’ Health Study from 1980 to 2023, and more than 45,000 male participants in the Health Professionals Follow-up Study from 1983 to 2023. The female participants began the study at an average age of 46, and the average age for the male participants was 54.

To evaluate associations between coffee and tea and cognitive health, researchers collected food frequency questionnaires from the participants every two to four years.

The results showed that there were more than 11,000 cases of dementia among the participants, but that higher caffeinated coffee intake was significantly associated with lower dementia risk and a lower prevalence of subjective cognitive decline. Higher coffee intake was also associated with better objective cognitive performance among participants in the Nurses’ Health Study. A higher intake of caffeinated tea was associated with similar cognitive outcomes.