London: Our happiness depends not only on what happens to us but also how this compares to other people, says a study that found that inequality reduced happiness on average. This was true whether people were doing better or worse than another person they had just met, the study said. "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 findings were published in the journal Nature Communications. The study participants played gambles to try to win money and saw whether another person won or lost the same gambles. On average, when someone won a gamble they were happier when their partner also won the same gamble compared to when their partner lost. This difference could be attributed 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. "Unequal outcomes, whether advantageous or disadvantageous, reduce average momentary happiness,” the study said. The researchers also developed an equation to predict how happy people will be based not only on what happens to them but also what happens to the people around them. "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,” Rutledge said. "Based on exactly how inequality affects their happiness, we can predict which individuals will be altruistic," Rutledge noted.