A new study points to why you may want to give your daily coffee habit a break.

University of South Australia researchers have found that consuming large quantities of coffee is linked to smaller brain volumes and heightened risk of dementia.

The university’s Australian Centre for Precision Health at SAHMRI joined an international research team to evaluate the effects of coffee on the brain among 17,702 UK Biobank participants. They ranged in age from 37 to 73. Researchers learned people who drank over six cups of coffee a day had a 53% greater risk of dementia.

Results were published in the journal Nutritional Neuroscience.

“Coffee is among the most popular drinks in the world. Yet with global consumption being more than nine billion kilograms (over 19 billion pounds) a year, it’s critical that we understand any potential health implications,” lead researcher and University of South Australia Ph.D. candidate, Kitty Pham said in a press release. “This is the most extensive investigation into the connections between coffee, brain volume measurements, the risks of dementia, and the risks of stroke — it’s also the largest study to consider volumetric brain imaging data and a wide range of confounding factors.

“Accounting for all possible permutations, we consistently found that higher coffee consumption was significantly associated with reduced brain volume — essentially, drinking more than six cups of coffee a day may be putting you at risk of brain diseases such as dementia and stroke.”

A stroke occurs when part of the brain’s blood supply is halted or limited. That prevents it from getting oxygen and nutrients.

Dementia occurs when memory, thinking and social abilities are reduced severely enough to affect daily life. It generally involves memory loss and has different causes.

Despite the study’s results, coffee doesn’t have to be removed from your life altogether.

Professor Elina Hyppönen, senior investigator and Director of the University of South Australia’s Australian Centre for Precision Health, said balance is key.

“Typical daily coffee consumption is somewhere between one and two standard cups of coffee. Of course, while unit measures can vary, a couple of cups of coffee a day is generally fine,” she said. “However, if you’re finding that your coffee consumption is heading up toward more than six cups a day, it’s about time you rethink your next drink.”