Having more sex than your friends makes you happier, a new study finds.

Tim Wadsworth, an associate professor of sociology at the University of Colorado Boulder, said sexual frequency is similar to income: You are happy to have more of it but even happier if you are having more sex than your peers.

In other words, when it comes to sex, most people prefer to ‘keep up with the Joneses.’

Wadsworth’s paper, Sex and the Pursuit of Happiness: How Other People’s Sex Lives Are Related to Our Sense of Well-Being, was published in a recent edition of Social Indicators Research.

Wadsworth tracked national data and statistical analyses, and he found the more sex a person had, the happier they tended to be. But after controlling for high sexual frequency, people who thought they were having more sex than their friends were happier than those who thought they were having less.

“There’s an overall increase in sense of well-being that comes with engaging in sex more frequently, but there’s also this relative aspect to it,” Wadsworth said. “Having more sex makes us happy, but thinking we are having more sex than other people makes us even happier.”

Wadsworth used data from the General Social Survey, in which respondents were asked whether they are “very happy,” “pretty happy,” or “not too happy.”

The survey started asking questions about sexual frequency in 1989, and the sex sample included more than 15,000 people.

Wadsworth also noted that sex isn’t really that taboo of a subject; media provides clues all the time about our sex lives. A typical issue of a magazine like Cosmopolitan or Glamour has numerous sex surveys.

Wadsworth said if films are any indication, people discuss their sex lives within their circle of friends.

Click for more from EurekAlert.