They are known for gobbling socks from washing lines and for their fearsome headbutting capabilities but the rich emotional life of goats may have been underestimated.

Scientists have found that goats are able to distinguish emotions from each other’s calls and also respond to the feelings of their peers, a phenomenon known as emotional contagion.

“Despite its evolutionary importance, social communication of emotions in non-human animals is still not well understood,” said Luigi Baciadonna, the lead author of the study from Queen Mary University of London.

Baciadonna and colleagues selected goats as a promising candidate for having emotional intelligence as previous research had revealed them to be surprisingly clever and to have complex social lives. One experiment had indicated they could distinguish the calls of goat “friends” from strangers’ calls, raising the question of whether they could also tell how their companions were feeling.

“Expressing emotions using vocalisations and being able to detect and share the emotional state of another animal from the same species may facilitate coordination among the individuals in a group and strengthen social bonds and group cohesion,” said Elodie Briefer, a co-author of the study, who was based at ETH Zurich during the research and is now at the University of Copenhagen.

The researchers recorded goat calls when the animals were being given food pellets or being reunited with other goats from the herd (happy) and when they were watching another goat eating food pellets without having access to the food themselves (sad).

They then played these sounds to other animals and recorded their reaction. They found the goats could distinguish between the different types of calls. They also had different physiological responses depending on the emotion they heard. When listening to positive emotions, the goats’ heart rate became more erratic.

“They potentially can perceive the emotional content and be affected by the emotions of the calls they hear,” said Livio Favaro. “There might be the first suggestion of emotional contagion through vocalisations.”

The findings, published in the journal Frontiers in Zoology, could have implications for the way livestock are housed.

Frans de Waal, a primatologist and expert in animal cognition at Emory University, said: “Goats being sensitive to the emotions of others is a form of empathy. Empathy is a mammalian trait, so this makes sense.”

Rachel Sparkes, a goat keeper and spokeswoman for the British Goat Society, said the findings were in line with her experience. “I find goats to be much more sensitive to change than other livestock, so it would make sense that they notice emotional changes in the calls from other goats,” she said.

“I have found over the years that goats are excellent listeners. They seem able to read human emotions well and if I’m having a bad day the goats will always cheer me up. They know when you’re upset or happy or stressed.”