Sleep & Energy

Caffeine Half-Life and Sleep: When to Have Your Last Coffee

How long caffeine stays in your body, why an afternoon coffee can still affect sleep at night, how sensitivity varies between people, and practical cutoff times.

Caffeine Half-Life and Sleep: When to Have Your Last Coffee

You have a coffee at 3 p.m. to get through the afternoon. You fall asleep at 11 p.m. without trouble, so you assume the coffee had no effect. But falling asleep is only one part of sleep. Caffeine can still be active in your body hours later, and studies suggest it can reduce total sleep time and deep sleep even when people do not notice.

Key Takeaways

  • Caffeine’s average half-life in healthy adults is about five hours, but it ranges widely, from roughly two to ten hours.
  • A large dose of caffeine six hours before bed has been shown to reduce sleep time.
  • Sensitivity varies with genetics, pregnancy, some medications, smoking and liver function.
  • Many people sleep better with a caffeine cutoff around early afternoon; experiment with your own timing.

What half-life means

Half-life is the time it takes for the body to eliminate half of a substance. If caffeine’s half-life is five hours and you drink a coffee with 100 milligrams of caffeine at 2 p.m.:

  • At 7 p.m., about 50 mg remains.
  • At midnight, about 25 mg remains.

That is a quarter of a cup of coffee still in your system at bedtime.

The average half-life in healthy adults is often cited as about five hours, but individual values range roughly from two to ten hours.

How caffeine affects sleep

Caffeine works mainly by blocking adenosine receptors in the brain. Adenosine builds up during waking hours and promotes sleepiness. By blocking it, caffeine makes you feel more alert.

At night, caffeine can:

  • Delay the time it takes to fall asleep
  • Reduce total sleep time
  • Reduce deep, slow-wave sleep
  • Increase nighttime awakenings

A well-known study found that 400 mg of caffeine taken six hours before bedtime reduced total sleep time by more than an hour, measured objectively, even though participants did not always report the effect.

Why sensitivity varies

Several factors affect how quickly caffeine is processed:

  • Genetics. Variations in the liver enzyme CYP1A2 mean some people are “fast” and others “slow” metabolisers.
  • Pregnancy. Caffeine half-life increases substantially, especially later in pregnancy.
  • Oral contraceptives. Can slow caffeine metabolism.
  • Smoking. Speeds caffeine metabolism; quitting slows it, so the same coffee can feel stronger.
  • Some medications. Certain antibiotics and antidepressants can slow caffeine clearance.
  • Liver function. Liver disease slows metabolism.
  • Age. Older adults may be more sensitive to caffeine’s effects on sleep.

How much caffeine is in common drinks?

Approximate amounts:

  • Brewed coffee, 8 oz: about 80 to 100 mg
  • Espresso, single shot: about 60 to 75 mg
  • Black tea, 8 oz: about 40 to 50 mg
  • Green tea, 8 oz: about 25 to 35 mg
  • Cola, 12 oz: about 30 to 40 mg
  • Energy drinks: commonly 80 to 300 mg or more per can
  • Dark chocolate, 1 oz: about 12 to 25 mg

Coffee-shop drinks can contain much more than a standard cup.

The US Food and Drug Administration has cited 400 mg a day as an amount not generally associated with negative effects for healthy adults. Pregnant people are usually advised to limit caffeine to 200 mg a day or less.

Finding your cutoff time

A practical approach:

  1. Set an initial cutoff about eight hours before your usual bedtime — for example, 2 p.m. for a 10 p.m. bedtime.
  2. Keep it for two weeks and note how you sleep and feel.
  3. Adjust earlier if you still have trouble sleeping, or later if you sleep well and want flexibility.

Some people, especially slow metabolisers, may need to stop caffeine before noon. Others tolerate later intake.

Alternatives for the afternoon slump

If you rely on afternoon caffeine, try:

  • A short walk outdoors, which provides light and activity
  • A brief nap of 10 to 20 minutes, if your schedule allows
  • Decaffeinated coffee or herbal tea
  • Water and a balanced snack, if dehydration or hunger is part of the problem

Frequently Asked Questions

Is decaf completely caffeine-free? No. Decaf coffee contains a small amount of caffeine, typically a few milligrams per cup.

Can you build tolerance to caffeine? Regular users develop some tolerance to its alerting effects, but studies suggest effects on sleep can persist.

Does caffeine affect sleep if I fall asleep easily? It can still reduce deep sleep and total sleep time without delaying sleep onset noticeably.

Is it better to have caffeine immediately after waking? Some people prefer to wait a while after waking, but evidence that this improves alertness is limited. The bigger factor for sleep is the timing of your last dose.

The bottom line

Caffeine lingers longer than most people realise. If your sleep is not as restful as you would like, try an earlier cutoff time for two weeks and see what changes.

Ingredients of a healthier week: The Afternoon Energy Slump: Circadian Dip, Sleep Debt and What You Ate for Lunch, Deep Sleep, REM and Sleep Trackers: What Your Wearable Can and Can't Tell You, Adult Preventive Screenings by Age: Blood Pressure, Colorectal, Breast, Cervical and Lung, Protein After 50: How Many Grams You Need and Why Spreading It Out Matters, Getting 25 to 38 Grams of Fiber a Day Without the Bloating.