Cheating makes us uncomfortable. No one wants to find out they’ve been cheated on. It’s a betrayal that cuts like no other. At the same time, we’re fascinated by reports of the infidelity of others.

In a new study, recently published in Sexuality and Culture, I surveyed more than 1000 people using the website Ashley Madison to find potential affair partners to find out whether their participation in affairs increased their happiness. I wasn’t sure what I’d find. Perhaps cheating makes you unhappier. After all, there is the guilt, the expense, the lying. What I found surprised me.

Participants did report they were happier during their last affair than before it. That wasn’t so surprising. Recall bias may cause us to rewrite history in an effort to justify our choices. More surprising was that participants said their perception of their life satisfaction was higher even after their affair ended than before they cheated.

However, this wasn’t true of everyone. There were specific traits and conditions correlated with participants’ report of increased happiness. If they believed they wanted to remain married, affairs made them happier. If they believed that to stay in their marriage, they needed to have an affair, then their cheating made them happier. In other words, if they were cheating because they believed this was the only way to keep their families together, affairs helped. However, if they wanted to leave their marriages, cheating actually decreased their happiness.

If they reported that their primary reason for seeking out and participating in an affair was to get sexual needs met, affairs made them happier. On the contrary, if they reported that what was missing in their marriages was something emotional—intimacy, emotional support—affairs decreased their happiness. Thus, a sexual deficit may be entirely easier to resolve than an emotional one—at least through cheating. The happier and more fulfilling the primary partnership, the more satisfying the experience of an affair.

People who said they saw their affair partner twice a week or more for sexual encounters were made happier by their affairs than those who saw their partners once a week or less. So, resolving an unmet sexual need through an affair is easier than an emotional one, but it has to be worth it. And apparently the cutoff for “worth it” is twice a week. If you can’t see your affair partner that often, it may not be worth the effort.

Interestingly enough, how much the person loved their spouse had no effect on their happiness with regard to affairs. But if they believed their loved their outside partner, happiness was increased. At first glance, this may seem curious. But if we take a step back, it makes sense. We can get our sexual needs met outside of a marriage, but not with just anyone. And it only makes us happier if we’re not planning to leave the marriage, and we’re getting our emotional needs met in our marriage. So, we can’t just plug-in any warm body for this.

There was also a gender effect.  Specifically, being a woman increased happiness through affairs. This could be explained by Dietrich Klusmann’s research showing that over time in long-term monogamous relationships, women’s sexual desire for their partner drops. However, if she takes on a new partner, her sexual desire returns to its high level. In other words, the reason women are made happier by cheating may be a result of what I call the “monogamy malaise” women experience in long-term partnerships.

We cannot take these findings and generalize them. We can’t use this to say, “Everyone should cheat! It makes you happier.” These people aren’t representative of everyone who’s married, or even everyone having affairs. The folks in this study specifically sought out affair partners online through a site geared to that goal. They didn’t meet someone and “fall into” an affair. No one should read this study and think, “I never considered it, but I should have an affair!” However, this does shed light into the motivations and dynamics influencing people seeking affairs, especially women who participate in cheating. More inquiry is warranted into this topic. But the findings certainly challenge traditional views of women and sexual satisfaction.

Alicia Walker is an Assistant Professor of Sociology at Missouri State University, and author of The Secret Life of the Cheating Wife: Power, Pragmatism, and Pleasure in Women’s Infidelity.