“But first, coffee.”

Hold off on that latte: your body might actually be lying to you when it comes to caffeine.

In a study from the Journal of Sleep Research (“Caffeine dosing strategies to optimize alertness during sleep loss”), U.S. Army researchers used an algorithm to determine the optimal amount of caffeine for every person, as well as when you should be downing it.

Bad news: this isn’t a one-venti-fits-all-scenario. But using the algorithm, the researchers showed they could determine an ideal time for caffeine intake for different people that actually results in a potential 64% increase in concentration/performance. Then, they went one better: The study figured out how to get that enhanced performance while decreasing caffeine consumption by up to 65%.

You can try and set your own ideal caffeine regiment here. Word of warning: they haven’t figured out a friendly interface yet, so you might need to flex those counterintelligence chops to get your results.