In the 17th century, clergy believed that it was the "bitter invention of satan".
Globally we get through around 2 billion cups a day but the health effects of coffee are still widely debated
In the 20th century coffee was blamed for high blood pressure and heart attacks and more recently the caffeine contained in the drink has been linked to a risking epidemic of poor sleep.
Professor Tim Spector, a British epidemiologist and science writer, said he was brought up through medical school to warn people off coffee.
"That it was a stimulant that over-excited your heart and was probably a cause of heart attacks.
"It was also linked to cancer and other things in the 1980s. I even wrote a paper on it myself that coffee caused cancer of the pancreas. It was maybe good for my career but was total rubbish."
He said it was only over the past five years that the evidence was now "incontrovertible" that coffee drinkers have less heart disease than non-coffee drinkers.
"If you go for the good quality ones you are much more likely to have a healthy outcome.
"There is no excess in cancer to show there are any bad effects," he added.
"For most people it is a health drink, for those who tolerate it well."
However, he said there was always a caveat to this in that some people might be more sensitive to the effects of caffeine.
He said people who drink three or four cups a day were getting "considerable amounts of fibre". One cup contains more than a glass of fresh orange juice.
He said studies had shown that micronutrients that naturally occur in coffee called polyphenols have a protective effect on the heart.
"High concentrations are like rocket fuel for your gut microbes and produce these benefits.
"We don't still understand why that happens," he said.
He said the data showed that between one and five cups a day was healthy, "but as soon as you get to six or more you seem to lose that benefit and we don't really understand why.
"Like anything that has chemicals and mildly addictive properties there might be a sweet spot."
He said the same cup of coffee would have different effects on every body and cheaper coffee contains more caffeine than an espresso while women are more sensitive to it and smokers need to drink more to "get the same hit".
"On top of that you have this enormous genetic difference between people, like alcohol so everyone has to do their own experiments and try using decaffeinated coffee instead."
He said there was some indication that decaff coffee is "nearly as healthy" as the regular sort if it is good quality.
"Most of the studies lack the big numbers but most of the data pointing to decaff having some health properties as well.
Professor Tim Spector hosts the ZOE Science & Nutrition podcast.
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules here