Why the first half of the night
A bedtime number looks at one moment, but caffeine is still around after you fall asleep. Deep sleep tends to come early in the night. Studies I read, including a 2023 meta-analysis by Gardiner and colleagues and Drake and colleagues in 2013, found that caffeine can shorten sleep and reduce deep sleep. In Drake's study, people's own sleep diaries often didn't show the effect.
Those studies didn't test the number I chose for that design. Averaging the modeled caffeine across the first half of the night is my own design choice, based on that research. The idea is to count caffeine that's still around during the hours when deep sleep usually happens.
In that build, the Today dial labeled it "in your deep-sleep hours," as in "37 mg in your deep-sleep hours." The estimate used your logged drinks, a five-hour half-life and your sleep times. Onset doesn't measure caffeine in your body, and it can't tell when you're in deep sleep.
Compared with your own nights
A milligram number means little on its own, so that design compared it with your usual:
- It waited for at least five nights before showing a usual at all.
- Your usual was the median of your nights.
- A night counted as usual if it was within 15 mg of that median, or 25% of it if that's larger.
- Tonight showed as Lower, Usual or Higher against that range, not as a score.
It compared you with your own past nights, with no target to hit.
No universal cutoff
That build didn't give everyone a 2 pm rule. Once it had enough nights, Check could show the latest time a drink would keep the estimate within the range of nights that went better. That range was a pattern in your own logs, not proof that caffeine caused the difference.
I kept that design focused on caffeine rather than adding sleep-stage charts or scores, because Apple Health and sleep trackers already show those.
Still an estimate
The model uses a five-hour half-life for everyone, and none of this is medical advice. Onset is free on the App Store.