Caffeine is one of the most confusing substances in the migraine world. Your doctor may have told you to cut back on coffee. But excedrin, one of the most popular migraine medications on the market, contains 65 mg of caffeine per tablet. So which is it — does caffeine cause migraines, or treat them?
The answer, frustratingly, is both. And the difference between caffeine helping or hurting your migraines depends on how much you consume, how consistently you consume it, and your individual biology. Here is what the research actually says.
How caffeine affects your brain
To understand caffeine's relationship with migraines, you need to understand what it does in your brain at a basic level.
Caffeine works primarily by blocking adenosine receptors. Adenosine is a chemical that builds up in your brain throughout the day, making you feel progressively sleepier. When caffeine blocks these receptors, you feel more alert and awake. That is the stimulant effect everyone is familiar with.
But adenosine also plays a role in blood vessel dilation. When caffeine blocks adenosine, blood vessels in the brain constrict slightly. This vasoconstriction is relevant to migraines because blood vessel dilation is one of the mechanisms involved in migraine pain.
This is why caffeine can relieve a migraine in progress. By constricting dilated blood vessels, it reduces the throbbing pain that characterizes many migraine attacks. It is also why caffeine is included in combination pain relievers like Excedrin Migraine, where it enhances the effectiveness of acetaminophen and aspirin.
Caffeine as a migraine treatment
The evidence for caffeine as a treatment is actually quite strong. A comprehensive review published in Nutrients examined the clinical research on caffeine and migraine and found that all treatment studies showed caffeine to be safe and effective in acute migraine treatment, particularly when combined with other analgesics.
Specifically, caffeine boosts the absorption and effectiveness of common pain relievers. When combined with acetaminophen and aspirin, caffeine increases pain relief by approximately 40% compared to the analgesics alone. This is not a small effect.
This is why many migraine sufferers instinctively reach for coffee at the first sign of an attack. Their experience aligns with the research: a cup of coffee (roughly 95 mg of caffeine) taken early in an attack can reduce severity, especially when combined with an over-the-counter pain reliever.
The key word is "early." Like most migraine interventions, caffeine works best when taken at the first sign of symptoms, ideally during the prodrome phase or at the very beginning of pain. Waiting until the attack is fully established reduces its effectiveness significantly.
Caffeine as a migraine trigger
Here is where things get complicated. While caffeine can treat an active migraine, it can also trigger one — but probably not in the way you think.
The same Nutrients review examined 17 studies that investigated caffeine as a migraine trigger. The findings were surprising: caffeine itself was reported as a trigger in only 2% to 30% of participants, depending on the study. That is a lower percentage than most people would expect given how often caffeine appears on "migraine trigger" lists.
The real problem is not caffeine itself. It is caffeine withdrawal.
The withdrawal problem
When you consume caffeine regularly, your brain adapts. It produces more adenosine receptors to compensate for the ones that caffeine is blocking. This means your brain becomes dependent on caffeine to maintain its new baseline of receptor activity.
When you skip your usual coffee — whether because you slept in on a Saturday, traveled and could not find your usual drink, or decided to "be healthier" and quit cold turkey — those extra adenosine receptors are suddenly unblocked. The result is a rebound effect: blood vessels dilate, adenosine activity surges, and for many people, a headache follows.
A randomized controlled trial published in Frontiers in Neurology confirmed this mechanism. Researchers found that sudden caffeine withdrawal reliably triggered migraine attacks in regular caffeine consumers. The withdrawal headache typically begins within 12 to 24 hours of the last caffeine intake, peaks at 20 to 51 hours, and can last up to 9 days.
For migraine sufferers, withdrawal headaches are often indistinguishable from a full migraine attack. They present with the same throbbing, bilateral pain and can be just as debilitating.
This creates a frustrating cycle. You drink coffee to function. You skip coffee one day. You get a migraine. You drink coffee to treat the migraine. Your brain recalibrates. The cycle continues.
The weekend migraine connection
If you tend to get migraines on weekends or days off, caffeine withdrawal may be a factor you have not considered.
Many people have a rigid caffeine routine on workdays — coffee at 7 AM, maybe another at noon — but on weekends they sleep in and delay their first cup by several hours. That delay can be enough to trigger withdrawal symptoms in someone whose brain has adapted to a consistent caffeine schedule.
This does not mean caffeine is always the cause of weekend migraines. Sleep pattern changes and stress let-down are also well-documented weekend triggers. But if you notice a pattern of weekend attacks, your caffeine timing is worth examining.
The chocolate confusion
Chocolate contains caffeine (about 12 mg per ounce of dark chocolate), and it appears on nearly every migraine trigger list. But as we discussed in our prodrome article, recent research suggests chocolate cravings are often a prodrome symptom, not a trigger.
The migraine was already starting when the craving appeared. The chocolate did not cause the attack. Your brain was craving it because the neurological process was already underway, possibly as a response to dropping serotonin or energy levels during prodrome.
This is one of the most important distinctions in migraine science: correlation is not causation. Just because you ate chocolate before a migraine does not mean the chocolate caused it. Without tracking both migraine days and non-migraine days, you cannot separate real triggers from prodrome symptoms that mimic triggers.
How much caffeine is safe?
Based on the current evidence, researchers recommend that migraine sufferers keep their daily caffeine intake below 200 mg. For reference:
- Brewed coffee (8 oz): approximately 95 mg
- Espresso (1 shot): approximately 63 mg
- Black tea (8 oz): approximately 47 mg
- Green tea (8 oz): approximately 28 mg
- Cola (12 oz): approximately 34 mg
- Dark chocolate (1 oz): approximately 12 mg
- Excedrin Migraine (2 tablets): 130 mg
The 200 mg recommendation is not arbitrary. Research suggests that higher daily intake increases the risk of migraine chronification — the process by which episodic migraines become chronic migraines (15 or more headache days per month). Overuse of caffeine-containing medications is one of the most common causes of medication overuse headache, which can transform occasional migraines into a daily or near-daily problem.
The consistency principle
More important than the total amount of caffeine is the consistency of your intake. The research points to a clear principle: if you consume caffeine, consume roughly the same amount at roughly the same time every day.
The worst pattern for migraine sufferers is variable intake — three cups on Monday, one on Tuesday, none on Wednesday, four on Thursday. This creates constant mini-cycles of adaptation and withdrawal that keep your brain in a state of instability.
If you decide to reduce your caffeine intake, do it gradually. Cut your consumption by about 25% per week over two to three weeks. This gives your brain time to downregulate those extra adenosine receptors without triggering withdrawal headaches.
Should you quit caffeine entirely?
The review in Nutrients concluded that there is "insufficient evidence to recommend caffeine cessation to all migraine patients." This is an important finding because it pushes back against the blanket advice that migraine sufferers should avoid caffeine.
For some people, moderate and consistent caffeine consumption is perfectly compatible with migraine management. For others, especially those with high intake or inconsistent patterns, reducing or eliminating caffeine may reduce attack frequency.
The only way to know which category you fall into is to track your caffeine intake alongside your migraines over time. If you consume caffeine consistently and your migraines do not correlate with your consumption pattern, caffeine is probably not a significant factor for you. If you see attacks clustering on days when your intake was lower or later than usual, withdrawal may be playing a role.
How to track caffeine as a trigger
Effective caffeine tracking for migraines requires more than just noting "had coffee" on migraine days. You need:
- Daily caffeine amount. Track how many milligrams you consumed each day, not just whether you had coffee. A day with one cup versus three cups is meaningfully different.
- Timing of consumption. When did you have your first and last caffeine of the day? Shifts in timing can matter as much as total amount.
- Non-migraine days too. You need comparison data. If you had 200 mg of caffeine on both your migraine days and your headache-free days, caffeine is less likely to be a factor.
- Withdrawal windows. How many hours passed between your last caffeine intake the previous day and the onset of your migraine? If attacks consistently appear 12-24 hours after your last caffeine, withdrawal is a strong suspect.
MigrAid lets you log dietary triggers including caffeine alongside your migraine attacks. Over time, the app can help you identify whether your caffeine patterns correlate with your attack patterns — something that is nearly impossible to figure out from memory alone.
The bottom line
Caffeine's relationship with migraines is genuinely complicated, and anyone who gives you a simple answer is oversimplifying the science. Here is what the evidence supports:
Caffeine can effectively treat a migraine in progress, especially when taken early and combined with other pain relievers. Caffeine withdrawal is a more reliable migraine trigger than caffeine itself. Consistency of intake matters more than total amount, though staying under 200 mg per day is recommended. Quitting cold turkey is one of the worst things a regular caffeine consumer with migraines can do.
Do not eliminate caffeine from your life based on a trigger list you found online. Instead, track your actual intake, look for real correlations in your data, and make changes based on what your personal patterns show. Your relationship with caffeine is individual, and the only way to understand it is through consistent tracking over time.
Track Your Triggers with MigrAid
Log caffeine, food, sleep, weather, and other triggers alongside your migraine attacks. See real correlations in your data instead of guessing.
Download for iOSSources
- Nutrients — The Ambiguous Role of Caffeine in Migraine Headache: From Trigger to Treatment (2020)
- Frontiers in Neurology — Sudden Caffeine Withdrawal Triggers Migraine: A Randomized Controlled Trial (2020)
- StatPearls — Caffeine Withdrawal (NCBI Bookshelf)
- American Migraine Foundation — Caffeine and Migraine
- Frontiers in Neurology — The S-shaped Association Between Dietary Caffeine Intake and Severe Headache or Migraine (2025)
- Migraine Canada — Caffeine and Migraine