We're always looking for happiness in life, and scientists are always looking at ways to help us find it, but now they have identified a surprising new influence on how positive we're feeling.
It's not just our own happiness that matters, but the fortunes of those around us, according to a new study by researchers from University College London.
And it's not just whether the people around us are simply doing better or worse, but the inequality itself between someone else's fortunes and our own.
"Our results suggest that generosity towards strangers relates to how our happiness is affected by the inequalities we experience in our daily life," said Archy de Berker, co-lead author of the study.
Volunteers were asked to play gambling games while researchers measured their happiness throughout the day. People were happier if the partner they were playing with won along with them than if they won and their partner lost, on average. If someone lost a game, they were happier if their partner also lost compared to if they won.
"On average we are less happy if others get more or less than us, but this varies a lot from person to person," said Dr Robb Rutledge, co-lead author of the study, which appears in the latest issue of Nature Communication.
The researchers have now added this factor to its so-called happiness equation, first created in 2014.
Read more: Is happiness economics a waste of time?
"Our equation can predict exactly how happy people will be based not only on what happens to them but also what happens to the people around them," said Rutledge.
The scientists also found that this can be used to predict how altruistic people will be in a second experiment, where people were tasked with splitting money with someone else that they had only just met.
"Interestingly, the equation allows us to predict how generous an individual will be in a separate scenario when they are asked how they would like to split a small amount of money with another person. Based on exactly how inequality affects their happiness, we can predict which individuals will be altruistic," Rutledge explained.