Based on 90-min sleep cycles — wake up feeling human
Sleep runs in cycles of roughly 90 minutes, moving from light sleep down into deep sleep and REM and back up again. Waking at the top of a cycle feels fine. Waking out of deep sleep in the middle of one is what produces that drugged, useless feeling for the first half hour, even after eight hours in bed. This works backwards from when you need to be up, or forwards from when you are going to bed, and lands you between cycles.
The times include about fifteen minutes to actually fall asleep, because almost nobody is unconscious the second the light goes off. If you routinely lie awake longer than that, shift the bedtime earlier by the difference.
It is an average, not a law. Real cycles run anywhere from 70 to 120 minutes, they get longer as the night goes on, and they shift with age, alcohol, stress and how sleep-deprived you already are. So treat the times as good targets rather than precise instructions — being twenty minutes off is not the disaster it sounds like.
Cycle timing also does not rescue short sleep. Five cycles well-timed still beats four, and most adults need seven to nine hours regardless of where the boundaries fall.
Persistent bad sleep is worth raising with a doctor. A calculator cannot fix insomnia.