Researchers at the University of Barcelona in Spain found that taking caffeine and sugar at the same time boosted the brain's performance more than taking them on their own.
They now believe each one boosts the effect of the other on brain functions such as attention span and working memory. The findings come from brain scans carried out on 40 volunteers who were tested after they had coffee with sugar, coffee without sugar, sugar on its own or just plain water.
"The two substances improve cognitive performance by increasing the efficiency of the two areas of the brain responsible for sustained attention and working memory," the Daily Mail quoted researcher Dr Josep Serra Grabulosa as saying.
"The brain is more efficient under the combined effect of the two substances, since it needs fewer resources to produce the same level of performance than when volunteers took only caffeine, glucose or water," Serra Grabulosa added.
But it's likely that coffee lovers who do not take sugar will get the same benefits from enjoying a sugary snack with their drink.
The results have been published in the journal Human Psychopharmacology: Clinical and Experimental.