← All articles
biologycaffeineneurosciencecoffeeOctober 1, 20269 min read

How Does Caffeine Work? The Molecule That Blocks Sleepiness

By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.

About two billion cups of coffee are drunk every day, and with tea, cola and energy drinks added, caffeine is the most widely used psychoactive drug in the world, taken by most adults most days. It works not by adding energy but by hiding the signal that says energy is running out, and the difference explains nearly everything about it: why it wears off in an afternoon, why a regular drinker needs it just to feel normal, and why the crash comes when it does.

Adenosine and the sleep pressure

All day, as the cells of the brain burn fuel, they produce a by-product called adenosine, and it accumulates. Adenosine binds to receptors on neurons and slows them down, damping arousal and building the drowsiness that grows heavier the longer one is awake; it is one of the main components of what sleep scientists call sleep pressure, and sleep clears it. Caffeine has almost the same shape as adenosine. It fits into the same receptors without switching them on, so it sits in the lock and stops the key going in. The adenosine is still there and still building, but the brain cannot feel it, and the sleepiness it would have caused does not arrive.

With the brake lifted, the brain's own stimulants run freer: dopamine, noradrenaline and glutamate all rise, which is why caffeine improves alertness, reaction time and mood, and why it raises heart rate and blood pressure a little and makes some people jittery. It does not make anyone smarter or replace sleep. It postpones the bill.

How long it lasts

Caffeine is absorbed within about forty-five minutes and has a half-life in most adults of around five hours, which means that half of a lunchtime coffee is still in the blood at six in the evening and a quarter at eleven. The variation is large: smokers clear it twice as fast, the contraceptive pill and pregnancy slow it, and some people carry a gene variant that makes the liver enzyme responsible sluggish, so that a single espresso keeps them awake all night. The crash comes when the caffeine wears off and the adenosine that built up behind it, unfelt, reaches its receptors all at once. Where it comes from:

  • •A mug of filter coffee: about 90 to 140 milligrams, depending on the beans and the brew; espresso about 60 to 80 per shot
  • •A cup of tea: about 40 to 50; green tea a little less
  • •A can of cola: about 35; an energy drink about 80 to 160
  • •A bar of dark chocolate: about 20 to 60
  • •Decaffeinated coffee: about 2 to 5, since the process removes most but not all

Tolerance and withdrawal

The brain adapts. Faced with blocked receptors, it grows more of them, and within a week or two of daily use the same dose blocks a smaller share and the effect shrinks. A habitual drinker's morning coffee mostly returns them to the baseline a non-drinker starts from, rather than lifting them above it, which studies of alertness confirm. Stop, and the extra receptors are all suddenly available to adenosine: the result is the headache, fatigue and low mood of caffeine withdrawal, which begins within a day, peaks at one to two days and passes within a week. The headache is partly caffeine's own doing, since it narrows blood vessels in the brain and their rebound widening hurts, which is also why caffeine is added to some painkillers.

Is it bad for you

The evidence is mostly reassuring. Large studies following hundreds of thousands of people for decades find that moderate coffee drinkers, three or four cups a day, live slightly longer on average than non-drinkers and have lower rates of type 2 diabetes, liver disease and Parkinson's, though coffee contains a thousand other compounds and the caffeine may not be the reason. Regulators put the safe limit for healthy adults at about 400 milligrams a day and for pregnancy at 200, above which the risk of low birth weight rises. Caffeine does raise blood pressure briefly, worsens anxiety and reflux in people prone to them, and taken late in the day cuts deep sleep even in those who fall asleep without trouble, which is the one effect most people underestimate. The recorded deaths are from powders and pills, where a teaspoon can hold a lethal dose; nobody has managed it with coffee.

Why plants make it

Caffeine is an insecticide. Coffee, tea, cacao, kola and guarana plants evolved it separately, and it paralyses and kills the insects that eat their leaves and seeds. The plants also put small amounts in their nectar, where it improves the memory of bees for the flower, so that they come back; a plant that drugs its pollinators gets more visits. Humans found the same effect in the same molecule, in Ethiopia, China and the Americas independently, and built three of the world's great trades on it. The first coffee houses opened in Mecca and Cairo around 1500, in London in 1652, and the drink was banned and un-banned several times by rulers who noticed that people who drank it talked politics.

Two popular myths: dehydration and sobering up

Coffee is often said to dehydrate you, on the grounds that caffeine makes you urinate more. In large doses it does act as a mild diuretic, but the water in the drink more than makes up for it, and regular drinkers develop tolerance to this effect as they do to the others. Studies comparing moderate amounts of coffee with the same volume of water have found little difference in the body's hydration. For most people a cup of tea or coffee counts towards their daily fluid intake rather than against it.

The other myth is that strong coffee sobers up a drunk person. Alcohol is removed by the liver at a roughly fixed rate, and nothing in coffee speeds that up, so the level of alcohol in the blood is the same with or without it. What caffeine does is mask some of alcohol's drowsiness, which can leave a person feeling more capable than they really are. That combination, alert but still impaired in judgement and reaction time, is why caffeine should never be treated as a remedy before driving.

How the caffeine is taken out of decaf

Removing caffeine without ruining the flavour is harder than it sounds, because the coffee bean contains hundreds of other compounds that give it taste and aroma. Decaffeination is done to green, unroasted beans, which are first soaked or steamed so the caffeine can move out of them. The earliest commercial process, developed by the German coffee merchant Ludwig Roselius in the early twentieth century, used benzene as the solvent, a chemical now known to be harmful and long since abandoned. Modern methods use safer solvents, water or compressed carbon dioxide.

One approach uses solvents such as ethyl acetate or methylene chloride that dissolve caffeine more readily than flavour compounds, then rinses and steams them out before roasting. The Swiss Water process uses only water: beans are soaked in water already saturated with coffee's other soluble compounds, so mostly caffeine leaves the beans, and the water is cleaned through charcoal filters and reused. The carbon dioxide method uses gas squeezed until it behaves partly like a liquid, which seeps into the beans and dissolves caffeine selectively. Each method leaves a trace behind, which is why decaf still contains a few milligrams per cup.

Caffeine in sport

Athletes used caffeine long before neuroscientists explained it, and it is one of the few legal substances with strong evidence of improving performance. Trials have found benefits in endurance events, repeated sprints and some strength tasks. Part of the effect seems to happen in the brain rather than the muscles: with adenosine's brake lifted, the same pace feels easier, so people can push harder for longer before the effort becomes unbearable. Caffeine was once restricted in elite sport above a set level in urine, but in 2004 it was removed from the World Anti-Doping Agency's banned list and is now only monitored.

Sports scientists express doses per kilogram of body weight, and the amounts that help in studies are modest, around three to six milligrams per kilogram taken about an hour before exercise. For a 60-kilogram athlete that is roughly 180 to 360 milligrams, the equivalent of two or three mugs of filter coffee. Larger doses tend not to add any benefit and bring more jitters, a racing heart and an upset stomach. Timing creates a trade-off too: an evening race fuelled by caffeine can wreck that night's sleep, which may cost more in recovery than the drug gained on the track.

What caffeine turns into, and its chemical cousins

The liver does not simply destroy caffeine; it converts it, mainly through a single enzyme known as CYP1A2, into three related molecules. The main product, paraxanthine, accounts for most of it, and paraxanthine also blocks adenosine receptors, which helps explain why the effect of a coffee lasts as long as it does. Smaller amounts become theobromine, the main stimulant in cocoa, and theophylline, which relaxes the muscle around the airways and was for decades a standard treatment for asthma. All of them belong to one chemical family, the methylxanthines, and differ only in where a few small groups of atoms are attached.

How fast an animal clears these molecules matters a great deal. Dogs break down theobromine far more slowly than people do, so an amount of dark chocolate a person would barely notice can build up to toxic levels in a dog, causing vomiting, a racing heart and sometimes seizures. Newborn babies have a similar problem with caffeine itself, because their livers have barely begun making the enzymes, and in premature babies its half-life can stretch to several days. Doctors turn that to advantage, giving caffeine to premature infants to treat pauses in their breathing, since a single daily dose keeps working around the clock.

The takeaway

Caffeine keeps you awake by blocking the receptors for adenosine, the chemical that accumulates with wakefulness and makes the brain feel tired, so that sleep pressure builds unfelt and arrives as a crash when the drug wears off after a half-life of about five hours. Daily use grows more receptors and breeds tolerance and withdrawal, moderate intake looks safe or mildly beneficial for most adults, and the molecule exists because it kills insects and rewards bees.

Practise this

Questions from Nervous System and Brain

Reading about something is not the same as being able to recall it. These are real questions from the Nervous System and Brain unit in our Biology track, answers and explanations included. The unit has 120 in total across 20 steps.

  • Guess the numberLevel 2

    1. What is the typical resting membrane potential of a neuron, in millivolts?

    Answer: -70 mV

    A resting neuron sits at about -70 mV, with the inside of the membrane negative relative to the outside.

  • Multiple choiceLevel 1

    2. The central nervous system (CNS) is made up of which two parts?

    • The brain and the spinal cordcorrect
    • The brain and the nerves in the arms
    • The spinal cord and the heart
    • The nerves and the muscles

    The CNS consists of the brain and the spinal cord.

  • Multiple choiceLevel 1

    3. What is a synapse?

    • A tiny gap between two neuronscorrect
    • The long fibre of a neuron
    • A region of the brain
    • A type of muscle

    A synapse is the tiny gap or junction between two neurons where a signal is passed on.