US Military has released a tool called 2B-Alert which lets you ‘predict the effects of sleep/ wake and caffeine on alertness’.
Basically, you type in how much caffeine you’ve ingested along with your sleep schedule and it will
‘We developed algorithms that work together, and they essentially allow us to determine, at the individual level, when and how much the individual should take caffeine to achieve peak performance at the desired time, for the desired duration,’ said Jaques Reifman, director of the DoD Biotechnology High Performance Computing Software Applications Institute at the U.S. Army Medical Research and Materiel Command.