
Six hours, eight hours, nothing after 2 p.m.: each of these rules gets passed around as if it were the answer. The research is less tidy, because the gap you need depends on how much is in your cup and how fast your body clears it. In a 2013 controlled trial, 400 mg of caffeine taken six hours before bed still cut measured sleep by more than an hour. A 2025 trial found no significant effect from 100 mg taken four hours before bed.
Thus, rather than following someone else’s calculation of how long before bedtime you should stop consuming caffeine, you can calculate your own. This method applies to drinks only (coffee, tea, cola and the like) and does not include caffeine pills or supplements. The purpose of this information is to provide general education about caffeine consumption and is not intended as medical advice or a diagnosis for individual patient treatment. The first step in understanding how long before bedtime to stop drinking caffeine is understanding the historical origins of each of these numbers.
Why There’s No Single Right Cut-Off Hour
The differences in opinions about caffeine elimination half-life are not a recent development. In 2013, Drake et al. found that the elimination half-life of caffeine in healthy adults varied considerably and, consequently, there was no consensus published regarding the appropriate time to stop using caffeine before bed, with suggested times varying “widely between 4 and 11 hours before bedtime.” Their research was conducted to attempt to restrict that time period to a narrower range. It is the study that StatPearls and AASM Sleep Education both cite for the six-hour figure.
The table below shows each of the well-established caffeine dosing estimates, as well as who these estimates apply to.
| Source | Dose and who was studied | Gap it supports | Main caveat |
|---|---|---|---|
| Drake et al., 2013 | 400 mg pill; 12 healthy adults aged 19–48 | At least 6 hours for “substantial” caffeine | Home headband may underestimate wake; funded by the device maker, Zeo |
| Gardiner et al., 2023 meta-analysis | Pooled 24 studies; modelled a 107 mg, 250 mL coffee | At least 8.8 hours | Combines studies with very different designs |
| Gardiner et al., 2025 | 100 mg and 400 mg capsules; 23 healthy men, average age about 25 | 100 mg: 4 hours was fine. 400 mg: avoid within 12 hours | Men only, all moderate habitual users |
| Sleep Foundation | No dose stated | At least 8 hours | Publisher guidance |
| Sleep Health Foundation (Australia) | No dose stated | “3 to 7 hours,” or none after lunch if you have sleep problems | Lists competing views without settling them |
| AASM Sleep Education | No dose stated | Avoid late afternoon and evening | Summarizes the 6-hour study without mentioning the 400 mg dose |
When looked at horizontally, the two sets of numbers make sense together. They answer two different questions, for two different doses, in two different groups of people. The trial that ends in 2025 shows how the dose impacts the results. The same group of study participants provided the answer “4 hours is enough” for 100 mg of caffeine, while the same group provided the answer of “12 hours will not be enough” for 400 mg of caffeine. The recommendation pages that do not specify a dose will prevent you from determining whether their number applies to your individual caffeine cup.
Guidance from reliable sources can be found in the example given by Drake and colleagues. They indicated that “caffeine should at a minimum be limited to use before 17:00” for users of moderate to large doses of caffeine. The Sleep Foundation also provided a basic worked example, stating a rule that indicates that if your bedtime is 10 p.m., you should not have caffeine after 2 p.m. This simple rule may be easy to follow, but it does not allow you to compare your caffeine dose and clearance with any assumptions made in developing the recommendation of a rule. To do this, you will need to understand how caffeine works and how long it will take for your body to eliminate it.
How Caffeine Keeps You Awake
Caffeine essentially blocks the signal for sleep. While you are awake your body produces adenosine, which builds up while you’re awake as you get sleepy; therefore adenosine’s presence informs your brain that you are ready for rest. Caffeine is an antagonist of adenosine receptors and therefore prevents adenosine from binding to those receptors, thereby blocking feelings of drowsiness. It is easy to visualize that caffeine blocks the receptor where adenosine fits. Caffeine can cross into the brain easily and it binds to all four different subtypes of adenosine receptors. Most of the wake-promoting effects of caffeine are derived from its ability to block the receptor the A2a subtype of adenosine receptors (StatPearls).
Caffeine also works quickly. When you ingest caffeine it has nearly 100% oral bioavailability; therefore, virtually all caffeine will get into the bloodstream. The AASM Sleep Education states that peak blood levels of caffeine are reached between [30 to 60 minutes](https://sleepeducation.org/sleep-caffeine/) after ingestion. The Australian Sleep Health Foundation states that peak blood levels of caffeine are reached between 30-70 minutes after ingestion.
Caffeine can shift your internal biological clock. A small study done at the University of Colorado Boulder using a double espresso equivalent dose given three hours before sleep, showed a delay in melatonin release for the subjects of about 40 minutes. The study included five subjects who were given a weight-adjusted caffeine pill. However, this study provides evidence for yet another way that late caffeine consumption could delay sleep.
None of this reduces your actual need for sleep. Caffeine changes what you notice. The body also adapts: Ferré explains that regular users produce more adenosine, so they need more caffeine over time to feel the same alertness. Since caffeine’s effect depends on it occupying those receptors, the next practical question is how long it stays around.
How Long Caffeine Stays in Your System
A half-life is the amount of time it takes for your body to eliminate half of the caffeine through metabolism; the fifty-fifty ratio is repeated until the caffeine is fully eliminated from your system (assuming that your metabolism is functioning normally). The following is an example of caffeine elimination after the ingestion of 100 mg of caffeine with a half-life of 5 hours: After 5 hours, you will have approximately 50 mg of caffeine remaining in your body; after 10 hours, you will have about 25 mg remaining; and after 15 hours, you will have about 12 mg remaining. This is why you can feel that a given cup of coffee has “worn off” when there is still a significant amount of caffeine in your bloodstream.
The confusion arises because different sources provide different estimates for the half-life of caffeine. The StatPearls website estimates that the average half-life of a typical adult is about 5 hours; the AASM Sleep Education website states that the half-life can range from 3 to 5 hours; and The Sleep Foundation, on the other hand, estimates the half-life to range from 2 to 12 hours. According to The Sleep Health Foundation, a typical adult will feel the effects of caffeine for 3 to 7 hours, and the total elimination of caffeine could take up to 24 hours. The differences likely arise from the fact that Some estimates are based on a typical adult, while others give the complete range of half-lives for individuals. In determining a half-life for caffeine for yourself, the complete range is the most important.
What speeds up or slows down clearance
Most of the variation comes from the liver. An enzyme called CYP1A2 handles about 95% of the caffeine you take in. A systematic analysis of 141 pharmacokinetic studies notes that its activity varies five- to six-fold between people. Northwestern nutrition researcher Marilyn Cornelis says how fast you break caffeine down “depends largely on your genes.” Even so, a gene label doesn’t settle the question. The 2025 trial genotyped all of its participants and found no significant main effect of the tested CYP1A2 or adenosine-receptor variants on sleep, at least in that sample of 23 men.
Several non-genetic factors also shift clearance, some a lot:
- Smoking: cuts caffeine’s half-life by up to 50% compared with nonsmokers, per StatPearls.
- Late pregnancy: can stretch the half-life to as much as 15 hours.
- Oral contraceptives: slow clearance, as both the Sleep Health Foundation and the pharmacokinetic analysis note.
- Older age: AASM Sleep Education says older adults take longer to process caffeine and can feel stronger effects.
- Liver disease or enzyme-inhibiting medications: both prolong the half-life, with cirrhosis showing the largest drop in clearance in the systematic analysis.
If you are pregnant, thinking about getting pregnant, breastfeeding, managing a liver condition, or taking a medicine on a daily basis, the FDA recommends talking with your healthcare provider about whether you should be limiting your intake of caffeine. Consider asking these two questions: 1) Does my liver condition or my medication have a direct effect on the rate this source of caffeine clears from my system? 2) Should I adjust my either my total amount of caffeine consumed or how long before or after I take a dose of my medication?
What’s Actually in Your Coffee, Tea, and Cola
The greatest variability in dosages is the input source, and you can confirm that! You will see in the table below how regulators and food safety organizations report caffeine levels in three national jurisdictions. The serving sizes are different in the three national reports; therefore, it is essential that you compare your own cup with care.
| Drink | Serving | Caffeine | Source (jurisdiction) |
|---|---|---|---|
| Brewed coffee | 237 mL (8 oz) | 135 mg | Health Canada (Canada) |
| Filter drip coffee | 237 mL | 179 mg | Health Canada |
| Instant coffee | 237 mL | 76–106 mg | Health Canada |
| Regular brewed coffee | 12 fl oz (about 355 mL) | 113–247 mg | FDA (US) |
| Filtered coffee | 200 mL | 90 mg | EUFIC, summarizing EFSA (EU) |
| Espresso | 60 mL | 80 mg | EUFIC |
| Black or green tea, brewed | 237 mL | 30–50 mg | Health Canada |
| Black tea | 12 fl oz | 71 mg | FDA |
| Green tea | 12 fl oz | 37 mg | FDA |
| Regular cola | 355 mL can | 36–46 mg | Health Canada |
| Caffeinated soft drink | 12 fl oz | 23–83 mg | FDA |
| Decaf brewed coffee | 237 mL | 3 mg | Health Canada |
The table demonstrates that coffee has the largest variability of all the entries. For standard reference values, one day cup of coffee has caffeine content measurements that range from less than 80 milligrams (mg) to approximately 250 mg depending on the size and preparation method, and cafe beverages have even higher variability. According to a report by AASM Sleep Education , researchers from the University of Florida purchased a 16 ounces cup of coffee from the same coffee shop over six consecutive days and obtained caffeine content measurements ranging from 259 mg to 564 mg. Since restaurants in the US aren’t required to tell you how much caffeine is in a drink, the FDA has recommended asking for this information. A 8-fl-oz cup of decaffeinated coffee contains less than a regular cup of coffee but is still not zero caffeine; the FDA estimates a caffeine content of 2 to 15 mg for a regular 8 fl-oz serving.
Not all sources of caffeine levels agree with each other, or with themselves. For example, in the UK, the NHS provides the following caffeine recommendations during pregnancy: instant coffee = 100 mg; tea = 75 mg; and cola = 40 mg. The EUFIC page provides a table for caffeine levels in black tea of 55 mg per 250 mL serving, while the accompanying text for the same serving provides approximate caffeine levels of 28 mg. In cases of conflicting values, you should use the higher figure for your calculations, which is a more conservative approach.
There is another connection between these two studies and the study done using the capsule and/or pill-controlled timed trial. The FDA supports this idea because they state that the human body’s ability to metabolize caffeine that occurs naturally in coffee and tea, as well as the caffeine added to other products, will be the same, and there is no difference in how your body handles caffeine that occurs naturally in coffee and tea and caffeine added to a product.
Working Out Your Own Cut-Off
The dose and half-life are two considerations affected by both of these variables. The tables below are meant to be used as a reference for this guide and are derived from the published ranges of half-life for the specific drug/substance data above – these tables are not accepted as a standard. These tables were derived from the textbook definition of the term “half-life” (i.e. “The Remaining amount of drug/substance reduces to one-half of the initial amount, and this occurs at a constant rate.”) The formula for Remaining caffeine is: Remaining Caffeine = Dose x (0.5 ^ (Hours before Sleep/Half-life)).
- Find your dose from the label, the retailer, or the table in the previous section. If you only have a range, use the upper end.
- Pick a clearance assumption. A 3-hour half-life is a fast clearer, roughly what StatPearls describes for smokers. A 5-hour half-life is its stated adult average. A 10-hour half-life illustrates a slow clearer within the Sleep Foundation’s 2-to-12-hour range.
- Count the hours from finishing the drink to your usual bedtime. Because levels peak 30 to 60 minutes after you drink, counting from the last sip is a simple, slightly cautious approximation.
- Multiply your dose by the share in the calculator table below. If you have several drinks, calculate each one and add them up.
- Compare the result with the study anchors further down, then test the result against your own sleep.
This calculator table shows what fraction of a drink’s caffeine is still in your body at bedtime:
| Hours before bed | 3-hour half-life (fast) | 5-hour half-life (average) | 10-hour half-life (slow) |
|---|---|---|---|
| 4 | 0.40 | 0.57 | 0.76 |
| 6 | 0.25 | 0.44 | 0.66 |
| 8 | 0.16 | 0.33 | 0.57 |
| 10 | 0.10 | 0.25 | 0.50 |
| 12 | 0.06 | 0.19 | 0.44 |
The slow-clearer column is the striking one. With a 10-hour half-life, half of a drink is still there ten hours later. A fast clearer is down to a tenth.
Applied to real drinks, using the regulator figures above, the estimates look like this:
| Drink, dose, timing | Fast clearer | Average clearer | Slow clearer |
|---|---|---|---|
| Brewed coffee, 135 mg, 8 hours before bed | ~21 mg | ~45 mg | ~77 mg |
| Brewed tea, 50 mg, 6 hours before bed | ~13 mg | ~22 mg | ~33 mg |
| Regular cola, 46 mg, 4 hours before bed | ~18 mg | ~26 mg | ~35 mg |
| 16-oz café coffee at the measured high of 564 mg, 8 hours before bed | ~89 mg | ~186 mg | ~324 mg |
As stated at the bottom of the table, this ultimately leads to the following statement: If ever you find yourself seated at your desk at 2 p.m.and your bedtime is 10 p.m., a single cup of coffee with a caffeine measurement in the upper end of this table will still result in more caffeine remaining at bedtime than drinking an entire brewed cup of coffee at that same date and time would yield for a fast-clearer.
Currently, there is no scientifically-backed “safe” amount of caffeine that can be consumed prior to bedtime, and therefore, results from these studies should only be viewed as general estimates and not as an accepted “safe” limit. The 2025 research did not find significant effects of 100mg of caffeine on sleep when consumed within four hours before sleeping had no significant effect. However, assuming a half-life of approximately five hours, you will have about 57mg remaining at the time of sleeping. The Drake study found that 400mg taken six hours before sleeping will have had an impact on reducing the amount of time that you could sleep by about one hour, respectively. This is based on an estimation of 174mg remaining in the body at bedtime, based on half-life. However, 400mg taken 12 hours prior to sleep from the 2025 study would still have the potential to disrupt deep sleep due to the fact that according to the results of that model, there would be an estimated 76mg remaining in your body at the time of going to bed. This is close to 57mg which did not appear to harm the study participants from the other research. Therefore, it would seem that there is significantly more than just caffeine that affects sleep and while you could use less than that amount as a guideline, it still may not work for everyone.
The final check is your own sleep. The Sleep Foundation suggests tracking when you have caffeine and how you sleep that night, and notes that some people do better with a gap of 10 hours or more. A practical way to do that, adapted from AASM’s suggestion to keep a two-week sleep diary: keep the same drink, move it a couple of hours earlier, and log your sleep for two weeks. One limitation matters a lot here, though, and it’s the subject of the next section.
Why Caffeine Can Affect Sleep Even When You Fall Asleep Fine
The amount of time it takes for an individual to actually fall asleep, i.e., “sleep latency,” is impacted by the consumption of caffeine prior to going to bed; this impact on sleep latency has been noted by those who consume caffeine prior to bedtime. Caffeine use also has an impact on an individual’s sleep after they have fallen asleep, which is much more difficult to determine when a person is sleeping. The relative impacts of caffeine on sleep were noted both through subjective self-report (using sleep diaries) and through the use of objective measurement (using headbands) during a study done by Drake et al. (2018). Both subjective and objective measurements indicated that caffeine consumption just prior to going to bed and up to three hours before going to bed disrupted the quality of sleep for the participants. The disruption to the quality of sleep (as measured through the sleep diaries) at six hours after ingesting caffeine was only detected through objective measurement. The difference between the average amount of sleep times reported in the sleep diaries and the objective sleep measurements at six hours was 41 minutes, which is close to but not statistically significant. Due to the aforementioned, the authors of the Drake et al. (2018) study considered it to be an important finding that subjective ratings of sleep quality had not detected caffeine’s disruption to sleep and suggested that the extent of the subjective ratings of sleep quality was due to the occurrence of short, fragmented awakenings.
An additional study by Lemoine et al. (2025) also documented this same gap between subjective and objective sleep quality measurements in much greater detail. When participants ingested 400 mg of caffeine eight hours before they attempted to sleep, the number of minutes they spent awake after attempting to sleep rose by about 29 minutes, and the amount of time spent in stages of deep sleep decreased by approximately 15 minutes. Twelve hours after the ingestion of caffeine, the total amount of time spent in stages of deep sleep decreased by approximately 21 minutes. Perceived sleep quality was significantly reduced only when the caffeine was ingested four hours before attempting to go to sleep. Moreover, when asked to identify both the dose of caffeine they were given and the time at which they took it, participants were poor at doing so: only 44% of participants identified the correct dose, 36% identified the correct timing, and only 22% of participants identified both. As pointed out by AASM Sleep Education, caffeine’s ability to affect a person’s ability to sleep can (and does) occur even if an individual is completely unaware of it.
Morning caffeine isn’t necessarily considered safe, either. In a small study conducted in 1995, healthy men experienced decreased sleep efficiency and total sleep time despite their caffeine saliva concentration levels decreasing from 17 µmol/L to 3 µmol/L by the time they went to bed. An analysis combining data from 24 studies concluded that caffeine consumption results in an average reduction of 45 minutes in total sleep time and an average reduction of roughly 11 minutes of deep sleep.
However, habitual users do have valid points when they say that habitual caffeine consumption will not create the same negative impact on their sleep structure and perceived quality as those who only consume caffeine during the morning and/or early afternoon. A laboratory study conducted in 2021 demonstrated that habitual caffeine consumers experienced no significant changes in sleep structure or perceived quality when compared to a placebo when they took caffeine at the same times of day as habitual users. Sleep Foundation physician reviewer Dustin Cotliar explained the opposite effect in this way: while you may be able to fall asleep soon after consuming some form of caffeine, the reality is that “you may not be sleeping as deeply.” Overall, the available evidence indicates that the development of tolerance to caffeine will likely mitigate the negative effects associated with day-to-day exposure to it when taken at either time, and it has not been conclusively proven to eliminate the effect associated with consuming large quantities or high-potency caffeine in close proximity to when you want to fall asleep.
When Caffeine Isn’t the Problem
A well-timed cut-off may be beneficial in limiting one source of disruption; however, it will not address all sources of disturbances. According to the AASM Sleep Education, the common link among many sleep disturbance issues, insomnia being the most often associated with another problem, is an additional contributing factor that needs attention. These additional contributing factors may include, but are not limited to: (1) Stress, (2) Sleep disorders such as Restless Leg Syndrome, (3) Medical conditions, (4) Depression or Anxiety, (5) Medications Containing Pseudoephedrine, (6) Noisy, Bright or Hot Bedroom.
The specific threshold to watch is defined by AASM as chronic insomnia, which can be defined as difficulty sleeping at least three times a week for three months or longer, and is a clear indication for referral to a sleep doctor. If you are experiencing insomnia for less than three months, you should speak with your healthcare provider if there is no improvement. The AASM’s 2021 Guideline strongly recommends using Cognitive Behavioral Therapy for Insomnia (CBT-I) and discourages using sleep hygiene principles alone to treat insomnia, especially the timing of caffeine. According to the lead author of the published guideline, Jack Edinger, sleep hygiene recommendations do not constitute effective therapy as a stand-alone treatment.
There are two additional points worth mentioning. A person suffering from sleep apnoea may be consuming caffeine to compensate for daytime sleepiness, delaying the diagnosis, according to the Australian Sleep Health Foundation. However, it also states that further studies are needed. According to the Sleep Foundation, if caffeine does not relieve your daytime sleepiness, you may be suffering from a sleep disorder as well as other medical issues. According to the FDA, if you are experiencing symptoms of excessive caffeine consumption, such as a rapid heartbeat, rapid pulse, feeling anxious or having ongoing sleep disruption, consult with your doctor.
When you schedule an appointment, please make sure to include your two-week sleep diary, as well as answering the following questions: 1) Are there any other causes (in addition to caffeine) that might be affecting my sleep pattern? 2) Would CBT-I be beneficial for me? 3) Could my excessive daytime sleepiness be related to a sleep disorder (such as obstructive sleep apnea)? 4) Are there medications that may cause difficulty sleeping or how I metabolize caffeine?
The Check That Changes the Decision
The time you borrow from another person’s body (with a borrowed cutoff hour) does not apply to your dose because it is not your dose or your body. The same research study that cleared 100 mg of caffeine over 4 hours showed that 400 mg still affected sleep after 12 hours. To properly determine when to stop taking caffeine, determine how much caffeine was consumed from the last beverage consumed for the day (at least the same time you drink caffeine before bedtime), especially if you are drinking coffee from cafes. The caffeine content for a single measured 16-ounce coffee cup varied from 259 mg to 564 mg, which should be tracked against your bedtime using a calculator. If you choose to leave out this step, there is a good chance that you will be timing a large café cup of coffee according to the guidelines intended for a home-brewed cup and, if sleep problems occur more than three times a week for three months, the best solution is to seek help from a clinician—not to follow a more strict cut-off.
Frequently Asked Questions
Does decaf coffee count toward my cut-off?
Decaffeinated coffee typically contains less caffeine than regular coffee (2 to 15 mg for an 8-fl-oz cup). Health Canada has reported that brewed decaffeinated has approximately 3 mg of caffeine. According to the FDA, those who are sensitive to caffeine may want to avoid drinking decaffeinated coffee altogether.
If I drink coffee every day, do late cups still matter?
Possibly. Daily daytime intake ending more than eight hours before sleep showed no clear sleep changes in one lab study. But 400 mg still reduced deep sleep at eight and twelve hours in habitual users, often without them noticing.
Will moving my caffeine earlier cause withdrawal headaches?
Although shifting caffeine consumption to a different time is not equivalent to stopping altogether, significantly reducing caffeine consumption can lead to symptoms of caffeine withdrawal. Symptoms typically appear 12-24 hours following the last consumption of caffeine and peak within one to two days. It is recommended by the FDA that individuals reduce their caffeine intake gradually.
Are energy drinks different from coffee for timing purposes?
The energy drinks provided the FDA are usually between 54-328 mg of caffeine per 16 fl oz and, according to the U.S. Food and Drug Administration, the body processes caffeine from energy drinks the same as it does caffeine from coffee. Therefore, consumers should use the caffeine content of the energy drink(s) listed on the label to assess their total daily caffeine intake.
Does pregnancy change how long caffeine lasts?
Yes, there is a significant amount of caffeine excreted into the bloodstream during pregnancy. As the previous mention by StatPearls applies to all women, a woman’s half-life for caffeine may be as long as 15 hours at the end of her third trimester. The FDA recommends discussing caffeine with your healthcare provider during pregnancy.