The next time you reach for an extra cup of coffee, think twice. A new study suggests that upping your caffeine intake throughout the day may trigger a migraine, especially if you’re already prone to headaches.

Between March 2016 to October 2017, researchers from Harvard followed 98 adults — 86 women and 12 men — who experience episodic migraines, or what is typically defined as having 0 to 14 headaches per month. Each day, participants recorded their “caffeinated beverage intake, other lifestyle factors, and the timing and characteristics of each migraine headache,” the researchers said.

“We compared a participant's incidence of migraines on days with caffeinated beverage intake to the incidence of migraines among the same individual on days with no intake, accounting for [the] day of [the] week,” they added.

BREAST CANCER RISK REDUCED BY SWAPPING RED MEAT FOR POULTRY, STUDY FINDS

The result? Researchers found that the participants — who reported 825 migraines during the 4,467 days of observation — were more likely to suffer from a migraine on the same day they had a “high level” of caffeine intake, or drinking a third cup of coffee when one might normally have two, for instance.

“There was a nonlinear association between caffeinated beverage intake and the odds of migraine headache occurrence on that day. This suggests that high levels of caffeinated beverage intake may be a trigger of migraine headaches on that day,” they concluded.

“In patients with episodic migraine, one to two caffeinated drinks were not associated with getting a migraine on the same day,” the study’s lead author, Elizabeth Mostofsky, a postdoctoral fellow at the Beth Israel Deaconess Medical Center and an instructor of epidemiology at Harvard’s T.H. Chan School of Public Health, told NBC News.

"This suggests that high levels of caffeinated beverage intake may be a trigger of migraine headaches on that day."

SESAME ALLERGY AFFECTS MORE AMERICANS THAN ONCE THOUGHT, STUDY FINDS

“These findings would suggest that you limit yourself to no more than two servings a day of caffeinated beverages,” Mostofsky added.

More specifically, those who consumed three or more servings of caffeine in a day — when they normally had one or two — had “1.4 times higher odds of a migraine on the same day, while those who consumed five or more servings had 2.61 times higher odds of headache on the same day,” according to NBC News.

The study seemingly confirms medical professionals’ suspicions that increased caffeine intake could trigger migraines, per the news outlet.