A formula is worked out to predict exactly how other people's fortunes might impact your mood.
Our happiness depends not only on what happens to us but also how this compares to other people.
"On average we are less happy if others get more or less than us, but this varies a lot from person to person," explained one of the study's co-lead authors Robb Rutledge from University College London.
‘The equation of happiness is based on our expectations and how guilty or envious the outcomes of those around us make us feel.’
Various tasks were given to 47 and their level of happiness was monitored after each.
Participants were first asked how they would divide up a cash prize with someone they had never met before. They then gambled for a better prize and were able to see how others got on doing the same.
The results suggested that participants were happiest when there was equality between how they were getting on and how the stranger; inequality led to feelings of discontent.
If people won more than their partner, it led to guilt, according to the researchers.
Similarly, when people lost a gamble they were happier when their partner also lost compared to when their partner won, a difference that could be attributed to envy.
"Based on exactly how inequality affects their happiness, we can predict which individuals will be altruistic," Rutledge noted. The findings will also help scientists understand empathy which can then be used to treat various developmental disabilities.