Drink two mugs of coffee each day and you could help your heart, according to a new study from the US.
However, having five more or more mugs a day could be counter-productive.
Researchers from the Beth Israel Deaconess Medical Centre in Boston compared five previous studies from Sweden and Finland that involved more than 150,000 people.
They found those who had two coffees a day were 11 percent less likely to develop heart failure than non-coffee drinkers. That applied for both heart attack survivors and those with healthy hearts.
But drinking more than five mugs could be bad for the heart.
"As with so many things, moderation appears to be the key here too," said researcher Dr Murray Mittleman, whose study was published in the journal Circulation Heart Failure.
Dr Mittleman told America's ABC News that researchers previously thought coffee's link with blood pressure could make it bad for the heart.
"Since high blood pressure is a risk factor for many types of cardiovascular disease, researchers assumed that coffee would be harmful, but several studies have shown that although there is an increase in blood pressure shortly after consumption, there are health benefits over the long-term," he said.
"Coffee contains many active compounds, including antioxidants that may explain how coffee lowers the risk of type 2 diabetes, and in turn may lower the risk of developing heart failure."
Dr Robert Grenfell, clinical issues director at the Heart Foundation, told ninemsn that coffee is probably not the single reason for the people's increase in heart health.
"People who are low to moderate coffee drinkers probably have other healthy lifestyle behaviours, as opposed to those who are heavy coffee drinkers — that's probably the difference," he said.
Dr Grenfell said it's not necessary for non-coffee drinkers to suddenly start drinking it.
"Low to moderate consumption of coffee has an association with a decreased risk of heart failure — that doesn't mean that actually causes it," he said.
"We know that heart disease is caused by many other things — the obvious is smoking, being overweight, high blood pressure and high cholesterol."
The Heart Foundation recommends Australians limit their coffee consumption to less than five cups per day.
"Coffee is clearly not bad for you in moderated levels, that's what this study is showing," Dr Grenfell said.
"We would suggest you do it in moderation and if you have to have milk, make it low-fat, and try to reduce the amount of sugar you put into it. Then coffee can be part of a healthy, balanced diet."