- A new study says there is a right time to drink coffee so it's most effective.
- U.S. Army researchers created a computer algorithm that studies sleep patterns to make recommendations about coffee intake.
- The scientists hope to incorporate the algorithm in a pre-existing online tool that people can use for personal recommendations.
If you love caffeine, you may think there's never a wrong time for coffee, but a new study says there is a right time to get the most out of your daily cup.
Researchers from the United States Army developed an algorithm that makes personalized 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 percent—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 percent 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 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.
This article originally appeared on MensHealth.com. Minor edits have been made by the Cosmo.ph editors.