For some people coffee is a gentle morning ritual; for others it brings racing thoughts, a pounding heart and a sense of dread. Searches for how long caffeine anxiety lasts and why coffee causes panic show how common the second experience is. Caffeine's link to anxiety is one of its best-studied psychological effects, and the evidence explains both why the effect is real and why people differ so much.
How caffeine can produce anxiety
Caffeine blocks adenosine receptors in the brain. That is what makes it stimulating, but adenosine also has a calming role, so blocking it can push the nervous system toward a state that feels like stress: faster heart rate, restlessness and heightened alertness to threat. A study by Childs and colleagues in Neuropsychopharmacology[1] describes caffeine as producing mild psychostimulant and sometimes anxiety-provoking effects by antagonising adenosine at A1 and A2A receptors, with possible interactions with dopamine systems.
Many of the physical effects of caffeine also overlap with the physical symptoms of anxiety. A faster heartbeat, a tremor or a churning stomach can be interpreted by the brain as anxiety, particularly in people already prone to it. That feedback loop is part of why caffeine can tip some people into a spiral.
Dose matters, a lot
The clearest evidence about dose comes from the same study by Childs and colleagues[1]. They recruited 102 healthy men and women who consumed less than 300 mg of caffeine per week, a very low intake, and gave them capsules containing 0, 50, 150 and 450 mg of caffeine in four separate double-blind sessions, measuring anxiety repeatedly afterwards.
The lowest dose, 50 mg, roughly half a cup of brewed coffee, did not increase anxiety. The highest dose, 450 mg, increased anxiety in the majority of participants. The middle dose, 150 mg, was where individual differences showed up most clearly, and those differences were linked to genes, as described below.
That dose pattern matters because it is easy to underestimate how much caffeine you are taking. A large iced coffee, several shots of espresso, or coffee combined with energy drinks and pre-workout supplements can reach the doses at which most people in controlled studies became anxious.
The genes behind caffeine sensitivity
In their 150 mg sessions, Childs and colleagues[1] found a significant association between caffeine-induced anxiety and several variants of the ADORA2A gene, which encodes the adenosine A2A receptor, as well as a variant of the DRD2 dopamine receptor gene. People with certain versions of these genes reported more anxiety at a moderate dose.
A larger study by Rogers and colleagues, also in Neuropsychopharmacology[2], confirmed the ADORA2A link. They randomised 162 non-consumers or low consumers and 217 medium-to-high consumers to 100 mg of caffeine followed by 150 mg 90 minutes later, or placebo. People with the TT genotype of the rs5751876 variant showed greater susceptibility to caffeine-induced anxiety. Intriguingly, they did not drink less coffee as a result; their coffee intake was actually higher.
Habit builds tolerance to the jitters
The same study had a reassuring finding for regular drinkers. Medium-to-high consumers had a reduced anxiety response to caffeine compared with non-consumers or low consumers, and this was true regardless of genotype. The authors concluded that with frequent consumption, substantial tolerance develops to the anxiety-provoking effect of caffeine, even in genetically susceptible individuals.
A related study by Rogers and colleagues[3] showed the same pattern from the performance side: in non-consumers and low consumers, caffeine produced a substantial increase in anxiety and jitteriness that offset its benefit on sleepiness, while regular consumers did not show this. This explains a common experience. People who rarely drink coffee often feel very jittery from a single strong cup, while daily drinkers do not, even at higher doses.
Panic disorder: a very different sensitivity
For people with panic disorder, caffeine is a much more serious issue. A systematic review and meta-analysis by Klevebrant and Frick, in General Hospital Psychiatry[4], examined blinded, placebo-controlled studies of acute caffeine challenge in adults with panic disorder. Across 9 studies involving 237 patients, 51.1% had a panic attack after caffeine, while none had one after placebo.
Six of those studies compared 128 patients with 115 healthy controls. Panic attacks followed caffeine in 53.9% of patients but only 1.7% of healthy controls, a very large difference. People with panic disorder also showed greater sensitivity to caffeine's anxiety effects than controls. The caffeine doses in these studies ranged from 400 to 750 mg, with most using 480 mg, so the authors could not assess what smaller doses do. They concluded that caffeine at doses roughly equivalent to five cups of coffee induces panic attacks in a large proportion of people with panic disorder, and that patients should be informed of this.
A family link
A caffeine challenge study by Nardi and colleagues, in Depression and Anxiety[5], adds an interesting detail. They gave 480 mg of caffeine in coffee form, or a caffeine-free version, to 25 people with panic disorder, 27 healthy first-degree relatives of people with panic disorder, and 22 healthy volunteers with no family history, in a randomised double-blind design one week apart.
After caffeine, 52.0% of patients and 40.7% of their healthy relatives had a panic attack, while none of the control volunteers did. The patients and their relatives were more sensitive than the controls to panic symptoms, but less sensitive to headache, increased blood pressure and insomnia. That suggests the vulnerability may run in families, consistent with the genetic findings above, and that caffeine sensitivity for panic is a distinct trait rather than just general sensitivity to caffeine.
Stopping caffeine can cause anxiety too
There is a twist that matters for anyone who decides to cut coffee out because of anxiety. Withdrawal from caffeine can itself raise anxiety. In the double-blind study by Silverman and colleagues[6], 62 adults with low to moderate caffeine habits were switched to placebo capsules without knowing it. During the placebo period, 8% had high trait anxiety scores, compared with none at baseline and 2% while taking their usual caffeine, alongside higher rates of headache, fatigue and low mood.
That means a person who stops a daily coffee habit abruptly may feel more anxious for several days, and may wrongly conclude that the anxiety has nothing to do with caffeine. A gradual reduction avoids most of that rebound. It also means that some of the relief regular drinkers feel from their morning cup is relief from mild withdrawal, which is consistent with the tolerance findings above.
Young people and energy drinks
Children and teenagers are a group of particular concern, both because they have smaller bodies and because energy drinks can deliver large amounts of caffeine quickly. Richards and Smith, in the Journal of Psychopharmacology[7], examined a large cohort of secondary school children in the south-west of England. After adjusting for diet, demographic and lifestyle factors, higher total weekly caffeine intake was significantly associated with more anxiety and depression, and the associations differed between boys and girls.
Caffeine from coffee initially appeared to be linked to these outcomes too, but the authors noted that coffee was the main contributor to high overall intake among the heaviest consumers, which explained that result. The study was cross-sectional, so it cannot show that caffeine caused the anxiety; anxious or stressed young people might also turn to caffeine more. Caffeine and young people are covered further in our article on whether coffee stunts growth.
Does regular coffee raise the long-term risk of anxiety disorders?
Acute anxiety after a large dose is not the same as developing an anxiety disorder over time. A large prospective study by Min and colleagues, in Psychiatry Research[8], used UK Biobank data on 146,566 participants, of whom about 80.7% drank coffee and most drank two to three cups a day. Anxiety was assessed several years later with a standard questionnaire.
The researchers found a J-shaped association: the lowest risk of both incident anxiety and depression occurred at around two to three cups a day, with higher risk at both lower and higher intakes. The pattern was similar for ground coffee, milky coffee and unsweetened coffee. This is observational, so it cannot show that moderate coffee protects against anxiety, and people who already feel anxious may avoid coffee, but it does not suggest moderate coffee drinking is a major cause of anxiety disorders in the general population.
How long does caffeine anxiety last?
This is one of the most searched versions of the question, and there is no study that measured it directly in everyday conditions. What the research does provide is caffeine's timeline. Caffeine levels peak around 40 minutes after a coffee and then decline by half every several hours, with half-lives commonly ranging from a few hours to ten or more, as described in our article on how long caffeine lasts. So anxiety driven by a large dose would be expected to peak within the first hour or two and ease gradually as caffeine clears, which may take several hours.
Caffeine also raises cortisol in people who do not use it regularly. A trial by Lovallo and colleagues[9] found a robust cortisol increase after caffeine in people who had abstained, but that daily intake abolished the cortisol response to the first morning dose. That is another reason occasional drinkers may feel a stronger stress-like response than daily drinkers.
Telling caffeine anxiety apart from other anxiety
Because caffeine produces physical sensations that overlap with anxiety, it can be hard to know whether coffee is the cause. The research suggests a few clues. Caffeine-related anxiety tends to follow a dose, especially a larger-than-usual one, and to appear within the hour or two after drinking, as caffeine rises toward its peak. It is more likely in people who do not drink caffeine regularly, and less likely in habitual drinkers who have built up tolerance. By contrast, anxiety that persists regardless of caffeine, that appears on coffee-free days, or that is accompanied by other symptoms of an anxiety disorder is less likely to be explained by coffee alone.
A simple, evidence-consistent test is to reduce caffeine gradually over a week or two and see whether the jittery episodes change, keeping in mind that an abrupt stop can temporarily increase anxiety through withdrawal. Keeping a simple daily note of how much caffeine you actually had, and when, including tea, soft drinks, energy drinks and pre-workout products, helps too, since the dose studies show that total amount matters much more than the source.
The limits of this evidence
The dose and panic studies are controlled but small, and they use doses that are high compared with a single cup of coffee. The panic disorder meta-analysis could not assess lower doses. Most genetic findings come from people of European ancestry and may not apply equally elsewhere. The long-term cohort is observational and cannot rule out reverse causation. And none of these studies separates caffeine's effect from the context in which people drink coffee, such as stress at work, poor sleep or skipped meals.
What this means in practice
Coffee can cause anxiety, mainly at higher doses and mainly in people who are not used to caffeine or who carry sensitive genetic variants. Regular drinkers develop considerable tolerance to the jitters. For people with panic disorder, caffeine is a well-documented trigger, with about half having a panic attack after a large dose in controlled tests, and family members may share some of that vulnerability. At the population level, moderate coffee intake does not look like a major cause of anxiety disorders.
If coffee makes you anxious, reducing the dose, switching to half-caf or decaf, and avoiding stacking coffee with energy drinks are the most direct changes the evidence supports. If you have panic disorder or an anxiety disorder, it is worth discussing caffeine specifically with your clinician, and cutting down gradually rather than suddenly avoids withdrawal symptoms, covered in our article on caffeine withdrawal. For coffee's broader links with mood, see our article on coffee and depression. Nothing here replaces mental health care.