The study was co-led by PhD student Jue Sheng Ong who said the results could be used to highlight why certain people are at a higher risk of caffeine consumption.
"We identified that people who tasted the bitterness in caffeine were more likely to love coffee and drink more of it," Mr Ong said. "People who were less able to taste the bitterness weren't as keen on coffee."
Another indication of whether someone prefers coffee or tea can be determined by how they think brussels sprouts taste.
If someone thinks brussels sprouts taste bitter then they are more likely to want a cup of tea over a coffee.
This is the same for other leafy greens that are high in the compound propylthiouracil (PROP).
"The same was true for red wine, with people who didn't like PROP-rich foods also less likely to pour themselves a glass of red," Mr Ong said.
"That's probably because red wine shares similar compounds to those vegetables."
The head of QIMR Berghofer's statistical genetics research group, Associate Professor Stuart MacGregor, said that the study might also be able to help people who have a predisposition to drink higher amounts of alcohol or caffeine by identifying the risk early.
"It improves our understanding of people who are big drinkers of alcohol or coffee and opens the door to new research into treatments," Prof McGregor said.
"It also sheds some light on nutrition in general.
"We know that there are lots of factors which affect how and why people drink certain things, but this study highlights the importance of taste genetics on our drinking habits.
"We are now looking to expand the study to evaluate if bitter taste genes have implications on disease risks, and we'll try to also explore the genetic basis of other taste profiles such as sweet and salty."