Caffeine Headache: Why Coffee Both Causes and Cures Head Pain

You skipped your usual morning coffee, and by early afternoon a dull, pounding headache has settled in behind your eyes. You are not imagining it, and you are not alone. A caffeine headache is one of the most common and most predictable headaches there is, and the good news is that it is also one of the easiest to understand and prevent.
Caffeine has a strange double life when it comes to head pain. It can ease a headache in the moment, yet skipping your regular dose can bring one on. Here is what is actually happening, how long it lasts, and what you can do about it.
What is a caffeine headache?
A caffeine headache is head pain linked to your caffeine habit, and it shows up in two main ways. The most common is a caffeine-withdrawal headache, which happens when someone who regularly drinks coffee, tea, soda, or energy drinks suddenly cuts back or stops. The other is a headache made worse by too much caffeine, especially when caffeine is overused alongside pain relievers.
The withdrawal version has formal medical criteria. The International Classification of Headache Disorders (ICHD-3) defines a caffeine-withdrawal headache as one that develops within 24 hours of interrupting regular caffeine intake that exceeded 200 mg per day for more than two weeks. By definition, it is relieved within one hour of taking 100 mg of caffeine and resolves on its own within seven days if no further caffeine is consumed.
Why does skipping caffeine cause a headache?
Caffeine works by blocking adenosine, a brain chemical that promotes drowsiness and widens blood vessels. Technically, caffeine is a non-selective adenosine A1/A2A receptor antagonist. When you drink it regularly, your brain adapts to having those receptors blocked, settling into a state of heightened sensitivity.
When you suddenly remove caffeine, adenosine floods back in unopposed. Blood vessels in the brain relax and widen, and the pain-dampening effect of caffeine disappears. That rebound is what you feel as a throbbing headache. Because your brain has adapted over time, the more caffeine you typically use and the more abruptly you stop, the stronger the rebound tends to be.
How long does a caffeine headache last?
For a withdrawal headache, the timeline is fairly consistent. According to StatPearls (NIH), caffeine-withdrawal symptoms typically begin 12 to 24 hours after your last dose, peak somewhere around 20 to 51 hours, and resolve within two to nine days. The ICHD-3 criteria note that the headache itself clears within seven days when no more caffeine is consumed.
Withdrawal is more than just a headache. Common symptoms include:
- Headache, often dull and throbbing
- Fatigue and decreased alertness
- Irritable or low mood
- Trouble concentrating
- Flu-like feelings such as achiness or nausea
Is caffeine a headache trigger or a treatment?
Both, which is what makes caffeine so confusing. The same molecule that can set off a withdrawal headache is also added to many combination pain relievers because it boosts their effect. Caffeine competes with adenosine at A2A receptors and can dampen the inflammatory signaling involved in pain, which is why a small dose sometimes eases a headache quickly.
The catch is overuse. Relying on caffeine, or on caffeine-containing pain pills, day after day can push your brain toward a pro-nociceptive state of cortical hyperexcitability, where it becomes primed for pain. In habitual users this can intensify primary headaches or contribute to medication-overuse headache. A randomized controlled trial even found that sudden caffeine withdrawal can trigger migraine attacks in people who are used to caffeine, which is a strong argument for cutting back slowly rather than all at once.
How to prevent and treat a caffeine headache
If your headache is from withdrawal, the most reliable fix is to taper gradually instead of quitting cold turkey. Mayo Clinic notes that up to 400 mg of caffeine per day, about four cups of brewed coffee, is safe for most healthy adults, but abruptly stopping can cause withdrawal headaches. Reducing your intake step by step over days to weeks gives your brain time to readjust and keeps the rebound mild.
Practical steps that tend to help:
- Cut back slowly, for example by half a cup every few days, rather than stopping all at once
- Stay well hydrated and don't skip meals while you taper
- If a withdrawal headache hits, a small amount of caffeine can relieve it, though that also restarts the cycle
- Watch hidden sources like soda, tea, energy drinks, and some pain relievers
- Aim for a consistent daily routine so your body isn't swinging between a lot of caffeine and none
When to see a doctor
Most caffeine headaches are mild and predictable, and they ease as your body adjusts. But head pain is not always about coffee. Seek prompt medical care for a sudden, severe headache that peaks within seconds, the worst headache of your life, or a headache with fever, stiff neck, confusion, weakness, vision changes, or that follows a head injury. These can signal something more serious and need urgent evaluation.
It is also worth talking to a clinician if your headaches are frequent, if you are relying on pain relievers several days a week, or if cutting back on caffeine doesn't help. Frequent headaches and medication overuse deserve a real plan. If you'd like personalized guidance, a clinician (including through a service like Nolla) can help you sort out triggers and a safe path forward.
Medical Disclaimer: This article is for informational purposes only and does not constitute medical advice. Always consult with a qualified healthcare provider before starting any new skincare treatment, especially if you have underlying health conditions, are pregnant, or are taking medications.






