For years, coffee was believed to be a possible carcinogen, but the 2015 Dietary Guidelines helped to change perception. For the first time, moderate coffee drinking was included as part of a healthy diet. When researchers controlled for lifestyle factors, like how many heavy coffee drinkers also smoked, the data tipped in coffee’s favor.

A large 2017 review on coffee consumption and human health in the British Medical Journal also found that most of the time, coffee was associated with a benefit, rather than a harm. In examining more than 200 reviews of previous studies, the authors observed that moderate coffee drinkers had less cardiovascular disease, and premature death from all causes, including heart attacks and stroke, than those skipping the beverage.

In addition, experts say some of the strongest protective effects may be with Type 2 diabetes, Parkinson’s disease, and liver conditions such as cirrhosis, liver cancer and chronic liver disease. For example, having about five cups of coffee a day, instead of none, is correlated with a 30 percent decreased risk of Type 2 diabetes, according to a meta-analysis of 30 studies.

The potential benefit from coffee might be from the polyphenols, which are plant compounds that have antioxidant properties, according to Dr. Giuseppe Grosso, an assistant professor in human nutrition at University of Catania in Italy and the lead author of an umbrella review in the Annual Review of Nutrition.

However, coffee isn’t for everyone. There are concerns about overconsumption. This is especially true for expecting mothers because the safety of caffeine during pregnancy is unclear. While the research into coffee’s impact on health is ongoing, most of the work in this field is observational.