Privacy Choices

A faster site and recommendations that match what you came for. You can change this any time.

Loading...
Sleep1,958 members

How late is too late for coffee?

Within about 8 hours of bed: members' sleep window ran shorter when the last caffeinated drink came that late, by 14 minutes with drinks under 4 hours before bed.

Ultrahuman analyzed 1,958 members who wore the Ultrahuman Ring and logged caffeinated drinks in the app's Caffeine Window from October 2025 to June 2026, across 69,852 nights. Members' sleep window, from falling asleep to waking, ran shorter on average as their last drink moved closer to bedtime, compared with their own nights when the last drink came 10 hours or more before bed.

Figure 1 answers in plain units. Pick a readout where the plate says Ask Our Data.

Ultrahuman members' sleep window was shortest after a last caffeinated drink under 4 hours before usual bedtime: 14 minutes shorter (likely between 6 and 22 minutes) than their own early-caffeine nights. The shortening eased to 8 minutes, then 3.6 minutes, in the next two groups as the drink came earlier. At 8 to 10 hours out, the change was about 1 minute, no clear difference. When only nights with similar logged amounts counted, the gaps for drinks 4 to 10 hours before bed were smaller or reversed, so extra caffeine may explain part of them.

The numbers

The later the last logged caffeine came, the shorter the night's sleep, and days with later last drinks also carried more logged caffeine.

  • With the last caffeinated drink under 4 hours before usual bedtime, the sleep window was 14 minutes shorter (likely between 6 and 22 minutes) across 462 members.
  • Drinks 4 to 6 hours before bed came with a sleep window 8 minutes shorter (likely between 3 and 14 minutes) across 716 members.
  • Drinks 6 to 8 hours before bed came with a sleep window 3.6 minutes shorter (likely between 0.4 and 7.2 minutes) across 1,437 members.
  • Drinks 8 to 10 hours before bed came with a sleep window about 1 minute shorter, likely between 4 minutes shorter and 2 minutes longer. That is no clear change, across 1,806 members.
  • Days before early-caffeine nights averaged 147 mg of logged caffeine (likely between 144 and 149 mg). Each later timing group averaged more logged caffeine than that.

When does late coffee start to shorten sleep?

Sleep ran shorter when the last caffeinated drink came within about 8 hours of a member's usual bedtime, and most when it came under 4 hours before bed. A review pooling 24 studies found that caffeine shortened total sleep time by 45 minutes on average, and advised having a standard coffee at least 8.8 hours before bed [1]. This group's pattern points the same way, though the shortening here was smaller than in those trials, which measured total sleep time.

A drink counted when the member logged it in the Caffeine Window with at least 20 mg of caffeine, so decaf did not count. Every caffeinated drink counted, not only coffee: tea, cola, energy drinks and matcha too. A night's drinks were those timed between waking from the night before and falling asleep, so a drink just after midnight still belonged to that evening. A member's usual bedtime was the middle of the times they fell asleep over the 14 nights before, from at least 10 valid nights on the same ring and firmware version. It never used the night being measured, so a late night after caffeine could not move its own drink into another group.

Each night was grouped by how long before that usual bedtime the last logged caffeinated drink came: 10 hours or more, 8 to 10, 6 to 8, 4 to 6, or under 4 hours, which includes drinks after the usual bedtime. The night's sleep was timed from the start to the end of the main sleep as the ring detected them, so brief awakenings in between count toward it.

Each member's nights in a later group were compared with the same member's nights whose last caffeine came 10 hours or more before bed, so only members with both kinds of night counted in a comparison. Nights with no logged caffeine were left out, because a member may simply not have logged. Each member counted equally, however many nights they logged; the uncertainty ranges resampled whole members.

Figure 1 · Interactive

Sleep ran shorter as the last caffeine moved closer to bedtime

For drinks under 4 hours before bed, the sleep window was about 14 minutes shorter. For drinks 8 to 10 hours before bed the change was about 1 minute, which is no clear change.

462 to 1,806 members · the Ultrahuman Ring

Figure 1. Each bar shows how much the sleep window changed, against the same members' nights when their last caffeine came 10 hours or more before bed. The white line shows the likely range. The pale bar shows no clear change.

Horizontal bar chart with one row for each timing group, set by the hours between the last caffeinated drink and usual bedtime. The axis shows the change in the sleep window in minutes, with zero marked as no change. The two earliest groups' bars end at −1 minute and −3.6 minutes. The two latest groups' bars end at −8 minutes and −14 minutes. A white line across the end of each bar marks its likely range. Only the earliest group's range, likely between −4 and 2 minutes, crosses no change.

In a stricter version that kept only nights whose drink log was last changed before the member fell asleep, the gap for drinks under 4 hours before bed was smaller. Drinks under 8 hours before bed still came with shorter sleep when the usual bedtime needed a valid night on all 14 nights before. The same held when only drinks from the app's library counted.

Does the amount of caffeine matter as much as the timing?

Timing still mattered for caffeine close to bedtime, even at similar amounts. When only nights with 100 to 250 mg of logged caffeine counted, the sleep gap for drinks under 4 hours before bed was larger. Days with later last drinks also carried more logged caffeine, so timing and amount moved together in this group. Days in the latest timing group averaged 205 mg of logged caffeine (likely between 193 and 217 mg). Each logged amount came from the app's drink library or the member's own entry.

Figure 2 · Interactive

Days with later last drinks carried more logged caffeine

Each later timing group averaged more logged caffeine per day than the early-caffeine days.

462 to 1,958 members · the Ultrahuman Ring

Figure 2. Each bar shows the average caffeine logged per day in one timing group, with each member counted once. The white line shows the likely range.

Horizontal bar chart with one row for each timing group, from 10 hours or more before bed to under 4 hours. The axis shows logged caffeine in milligrams. The earliest group has the shortest bar, at 147 mg. The later groups' bars end between 197 mg and 205 mg.

The chart above shows that every later timing group averaged more logged caffeine than the early-caffeine days, with each member counted once. The step up came between the earliest group and the rest, and the later groups sat close together.

Are late coffee drinkers different sleepers anyway?

Lasting differences between late and early coffee drinkers do not explain the gaps, because each member was compared only with their own early-caffeine nights. Differences between days could still play a part. A busy day can bring both a late coffee and a late night, and a bad night can be followed by a late coffee. Comparing weeknights only with weeknights, and weekends with weekends, made the gaps larger.

What this analysis can't tell you

Late and early caffeine days can differ in other ways, so the gaps cannot show that caffeine caused shorter sleep. The last logged drink is the last one a member logged, so an unlogged later coffee would put a night in the wrong timing group. Members can edit drink times later, and only the latest edit is kept. Caffeine amounts from the app's drink library are typical values for a drink and size. Travel across time zones could put a drink in the wrong timing group. Members chose to wear the Ultrahuman Ring and log their drinks, so this group likely pays closer attention to caffeine than people who do not track their drinks.

What this means for you

If your coffee runs late, the clearest cost to sleep in this group came with caffeine within a few hours of bed. The lack of a clear change for earlier drinks does not show that caffeine 8 hours before bed leaves sleep untouched. Days with a later last drink also carried more caffeine, so the analysis cannot fully separate timing from amount. These group averages cannot say how your own sleep responds to a late coffee.

The Ultrahuman Ring measured the sleep window and sleeping heart rate on each night here, and the app's Caffeine Window recorded the drinks.

Frequently asked questions

Does late coffee raise your heart rate during sleep?

Sleeping heart rate showed no clear rise when the last caffeinated drink came under 4 hours before bed. On those nights, the difference from the same members' early-caffeine nights was −0.4 bpm (likely between −0.8 and 0.0 bpm), which is no clear change.

Does tea or an energy drink count, or only coffee?

Tea and energy drinks counted, along with every other caffeinated drink logged with at least 20 mg. On average, coffee was the last logged drink on 70.7% of each member's counted nights (likely between 69.1% and 72.3%). In a stricter version that kept only nights whose last drink was coffee, the gaps were larger. The Caffeine Window explainer describes how the app sets its window.

Who does this not apply to?

This finding does not cover teenagers, because the group was adult members. Each member also logged caffeine on at least 20 days, so people who drink caffeine only now and then are not represented. People whose bedtime moves from week to week, such as shift workers, fit the comparison less well, because each usual bedtime came from recent nights.

References

  1. Gardiner C, et al. Sleep Med Rev 2023. PMID: 36870101.

This is an observational analysis of Ultrahuman member data. It describes associations, not causation, and it is not a diagnosis or a substitute for medical advice.