According to Prof David Kennedy, director of the brain, performance and nutrition research centre at Northumbria University, and a co-author of the study, chocolate could be beneficial for mentally challenging tasks.
The study, presented at the British Psychological Society annual conference in Brighton show, is great news for students who binge on chocolate when revising for exams.
"For things that are difficult to do, mentally demanding things that maybe crop up in your work it could help," The Telegraph quoted Kennedy, as saying.
In the study, 30 volunteers were asked to count backwards in groups of three from a random number between 800 and 999 generated by a computer. They were given large amounts of compounds found in chocolate, called flavanols, in a hot cocoa drink.
The findings show that they could do the calculations more quickly and more accurately after they had been given the drink.
But, the same was not true when the group was asked to count backwards in groups of seven, which the researchers described as a more complex task.
The participants also did not get as tired doing the calculations if they had been given the cocoa drink, despite being asked to do them over and over for an hour.
Emma Wightman, one of the study's lead researchers, said: "You can get bars of chocolate that have 100mg of flavanol, and we are also going to look at the effect of lower doses of flavanol on the brain."
Prof Kennedy added: "The amount that you are giving is more than in the diet but there is quite a lot of evidence that general amounts are protective against declining function and that kind of thing.
"The more fruit and vegetables and things that are high in polyphenols the better that is for your brain in the long run."