Researchers from the United States Army developed an algorithm that makes personal recommendations for timing your caffeine consumption, so you can drink the least amount of coffee to achieve the maximum level of alertness, LiveScience reported.
The study found that the algorithm helped people improve their alertness by up to 64 per cent — without consuming any more caffeine than normal. On the flip side, it found that with the right dosing schedule, people could reduce their caffeine consumption by up to 65 per cent and still achieve peak alertness.
The researchers came to this conclusion by feeding their algorithm into a pre-existing computer model predicting how sleep deprivation, schedule, and caffeine impact alertness during different times of the day.
"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 study senior author Jaques Reifman, director of the DoD Biotechnology High Performance Computing Software Applications Institute at the U.S. Army Medical Research and Materiel Command in Fort Detrick, Maryland, according to LiveScience.
The new findings, published in the Journal of Sleep Research, will be used to enhance alertness for army workers.
They'll also be offered online for anyone to use. Reifman's team plans on incorporating the algorithm into an already existing online tool, 2B-Alert. Currently, 2B-Alert predicts alertness based on how much caffeine and sleep someone has had. According to LiveScience, researchers hope to add the algorithm to the online tool before the end of the year to help users determine the best time to drink their coffee.
As a real-world example, Reifman told LiveScience that students could use the algorithm to determine the best time to drink coffee so they're "as alert as possible during the exam."
Until the algorithm is widely available, there are other ways to up your alertness — like with exercise. A study from 2011 revealed that people who worked out for 150 minutes a week slept better and were less groggy during the day.
The right snack will also help increase your energy. Here are 7 surprising foods that'll give you a much-needed energy boost.
This article originally appeared on Men's Health US.