For many of us, that morning cup of coffee feels essential to getting the day started. And while some research has shown moderate coffee intake can be beneficial, how much is too much? That’s what researchers from Australia wanted to know.

Researchers from the University of South Australia wanted to know how coffee affects the brain (specifically, brain volume, and the risk of dementia and stroke). They studied the effects of coffee on nearly 18,000 people between the ages of 37 and 73, making this the largest study of its kind.

Based on their findings, it seems coffee in excess doesn’t reap the same brain benefits as coffee in moderation. Those who drank more than six cups of coffee per day had a 53% increased risk of dementia, as well as smaller brain volume.

As study co-author and Ph.D. candidate Kitty Pham explains in a news release, “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.”

As professor and study co-author Elina Hyppönen, Ph.D., MPH, MSc, notes in the release, the exact mechanisms behind why excess coffee consumption can have negative effects aren’t fully understood. However, she says, “One simple thing we can do is to keep hydrated and remember to drink a bit of water alongside that cup of coffee.”

Don’t Ditch The Coffee Just Yet

Don’t fret, coffee lovers! This research only linked the adverse effects on the brain to excessive coffee intake (over six cups per day). Moderate caffeine intake, on the other hand, has actually been positively associated with brain health.

According to one 2010 study, drinking three to five cups of coffee per day while middle-aged was associated with a decreased risk of dementia and Alzheimer’s disease by about 65% later in life.

On top of that, coffee is a good source of antioxidant polyphenols and trigonelline, which support cognitive functioning and may lower the risk of memory loss, says nutritional psychiatrist Uma Naidoo, M.D.

Additional research also suggests coffee has beneficial impacts on brain health, fatty liver, diabetes, and metabolic syndrome.

The Bottom Line

“Everything in moderation” is the key takeaway here. You don’t have to give up your morning brew, but if you’re reaching for your seventh cup of the day, you might want to put on the brakes and find energy elsewhere: Take a cat nap, fit in a quick workout, and consider how you can get better sleep at night and wake up more refreshed.