If you drink coffee or tea every day, the first days of fasting can bring a headache that has little to do with hunger. Here is what the research says and how to prepare.
Updated November 2026 · 7 min read
For many people, the first week of Ramadan brings a headache. Hunger and thirst get the blame, but if you normally have several cups of coffee or tea a day, the sudden stop in caffeine is a likely part of the story. This guide explains what caffeine withdrawal does, what the research found about headaches during fasting, and how to prepare so the first days are easier. It does not replace medical advice: some headaches need a doctor, and the last section lists them.
Sihha Fit is an Islamic fitness app. It builds workouts around your goal and equipment, makes halal meal plans, scans your food from a photo, tracks your progress, and has a Ramadan mode for suhoor and iftar. It is free to start, in English and Arabic.
If you have caffeine every day, your body adjusts to it. When you stop, you can feel the difference. A 2004 critical review analysed 57 experimental studies and 9 surveys. It found that headache, tiredness, low energy, drowsiness, difficulty concentrating, irritability, low mood and a foggy feeling were all valid signs of withdrawal. In the experiments, headache happened in about 50% of people who stopped, and about 13% had significant distress or trouble functioning.
The same review described the usual timing: symptoms start 12 to 24 hours after the last dose, peak at 20 to 51 hours and last 2 to 9 days. The higher your daily amount, the more likely and stronger the symptoms, although stopping even 100 mg a day (roughly one small cup of coffee) was enough to cause them in some people. A 2026 review adds that caffeine can both relieve headaches and trigger them, and that stopping suddenly often brings on a withdrawal headache.
A 2026 randomised trial in regular coffee drinkers, in which people alternated between caffeinated coffee and avoiding it, found that avoiding caffeine likely contributed to headaches and made them more severe when they occurred.
A 2023 survey of 755 caffeine drinkers who were due to fast asked about their intake in the last week of Shaaban and then about headaches on the first day of Ramadan. Overall, 55.5% reported a caffeine-withdrawal headache. Those who got one drank much more caffeine on average (a median of about 316 mg a day versus about 144 mg) and more per kilogram of body weight. People with signs of caffeine dependence were far more likely to be affected. Because it relied on what people reported, it shows a strong link rather than proof.
A 2026 scoping review of 20 studies concluded that Ramadan fasting reproducibly worsens migraine and can trigger fasting headache. It listed dehydration, caffeine withdrawal, low blood sugar, disrupted sleep and changed eating habits as the proposed causes, and noted that the problem tends to be strongest in the early days and then settle.
A 2026 survey across 14 countries found that headaches during Ramadan fasting were most often in the afternoon and before iftar, and eased after iftar in 54.6% of cases. People with a history of primary headache disorders, particularly migraine, were more likely to have them. So if you already get migraines, expect fasting to be more of a test, and talk to your doctor beforehand.
Many people underestimate it. The US Food and Drug Administration lists typical amounts in a 12-ounce (about 350 ml) serving: regular brewed coffee 113 to 247 mg, black tea 71 mg, green tea 37 mg, energy drinks 41 to 246 mg and soft drinks 23 to 83 mg. Chocolate, some medicines and supplements contain it too. Add up a typical day, including large takeaway cups, and you will see why the first day without it can hurt.
For healthy adults, a 2017 systematic review found that up to 400 mg a day was not linked to overt harm, and the FDA gives the same figure, about two to three 12-ounce cups of coffee. The review used 300 mg a day for pregnant women and 2.5 mg per kg of body weight for children and teenagers. If you are pregnant, breastfeeding, have a heart condition or take regular medicines, ask your doctor what is right for you.
We did not find a trial that compares tapering schedules, so treat the steps below as practical advice built on how withdrawal works, not as a proven method.
Caffeine is not harmless just because it is the end of the day. In a 2013 study, 400 mg of caffeine taken 0, 3 or 6 hours before bedtime each reduced sleep compared with placebo, and the authors supported the advice to avoid substantial caffeine for at least 6 hours before bed. In Ramadan, when your night is already split between iftar, prayers, suhoor and sleep, a late cup can make the next day's headache more likely, because poor sleep is one of the fasting triggers.
A simple rule: count back six hours from the time you plan to sleep, and have your last caffeine before that. See our guide to hydration and sleep in Ramadan for fluid timing and sleep tips.
If you take a painkiller, follow the label and the advice of your doctor or pharmacist. Painkillers taken too often can themselves lead to headaches, and some can irritate the stomach. If you wonder whether taking medicine during the day breaks your fast, that is a religious question, and a qualified scholar should answer it. If a headache is severe enough that you cannot fast safely, speak to both your doctor and a scholar.
There is rarely one cause. A 2026 scoping review of 20 studies lists dehydration, caffeine withdrawal, low blood sugar, disrupted sleep and changed eating habits as the main suspects. A survey across 14 countries found that headaches came mostly in the afternoon, before iftar, and eased after iftar in 54.6% of cases. If you drink caffeine daily, the first days are the likeliest time for withdrawal to play a part.
A 2004 review of 57 experimental studies found that symptoms usually start 12 to 24 hours after the last caffeine, peak between 20 and 51 hours, and last 2 to 9 days. Headache occurred in about half of the people who stopped. That is why the first week of Ramadan is the hardest, and why it usually gets better after that.
It may help if withdrawal is the cause, because you give the body some of its usual caffeine. But caffeine taken later in the night can cost you sleep, which is its own headache trigger. A trial found that 400 mg of caffeine even 6 hours before bedtime reduced sleep. Count back from the time you plan to sleep and keep your caffeine before that point.
That depends on your health and on the medicine, so ask your doctor or pharmacist before the month starts, especially if you have a stomach, kidney or heart condition or take other medicines. Taking painkillers often can itself cause headaches. Whether taking medicine during the day affects your fast is a religious question, so ask a qualified scholar.
Not necessarily. The aim is to lower the shock, not to quit. Cutting down slowly over one to two weeks is a common-sense approach, though we did not find a trial that compares tapering plans. Many people then keep one small cup at a sensible time during the eating hours.
Research:
Official guidance:
This page is general education. It is not medical advice and it does not diagnose or treat any condition. Speak to a qualified doctor about your health, and do not delay care because of what you read here.
Sihha Fit builds workouts and halal meal plans around your goals. Free on iPhone and Android.