Many people rely on a hot cup of coffee to help them wake up in the morning and start their day. That’s because coffee contains caffeine, which is technically a stimulant drug. As you pour your morning cup of joe, that fact might make you wonder — how is daily caffeine use affecting my brain?

“Caffeine has its pros and cons,” said Steven Meyers, MD, a neurologist with Endeavor Health. “It can be therapeutic in certain situations, but it can also cause a lot of problems depending on the individual.”

For some people, caffeine has a primarily positive effect. Studies show that caffeine can improve alertness, short term memory, recall and processing speed. Dr. Meyers pointed out that the benefits of caffeine are directly correlated to the amount you consume: too much caffeine, and you become over-stimulated, making it difficult to focus or concentrate.

The “right” amount of caffeine is based on individual tolerance. “People who frequently drink coffee or tea will experience much less of an acute effect than someone who hardly ever drinks caffeine,” explained Dr. Meyers. “You can build up a tolerance.”

Caffeine can also have a negative impact on the brain. Some people might experience increased levels of anxiety or insomnia. It can also increase blood pressure and heart rate, which can be a concern for people with heart disease.

“People with heart disease and people who suffer from anxiety disorders should probably limit their caffeine intake,” said Dr. Meyers.

Interestingly, caffeine can both cause and cure headaches. “A lot of over-the-counter headache medications contain caffeine, but too much caffeine can also cause headaches,” said Dr. Meyers. “There's always a fine line between how much is enough and how much is too much — depending on frequency and quantity.”

Some people who overuse caffeine can experience withdrawal headaches when they don’t have caffeine. “Caffeine is relatively short-acting, so when it wears out of your system, one of the side effects is headache,” said Dr. Meyers. “Thankfully, you can just take more caffeine to get rid of the headache.”

As a general rule, the FDA recommends consuming a maximum of 400 milligrams of caffeine, which is equal to about two cups of coffee. However, the ideal amount of caffeine will vary from person to person. “It depends on the condition that you're treating and the potential risk for negative effects,” said Dr. Meyers. “It's very individualized.”

For example, some studies show that caffeine is beneficial in people with Parkinson's disease. However, too much caffeine can also make a Parkinson’s patient’s tremor worse.

Dr. Meyers recommends that people cut back on or eliminate caffeine altogether if they experience anxiety, heart palpitations, insomnia, or difficulty with focus and concentration.

“I would never recommend someone start drinking coffee for any reason if they don’t already drink coffee,” said Dr. Meyers. “But if someone likes having a couple of cups of coffee a day, I see no problem with that as long as it doesn't bother them.