That's the conclusion of a new research, which found that these factors are slightly different for men and women.
According to lead author Bruce Elmslie, professor of economics at the UNH Whittemore School of Business and Economics and co-author Edinaldo Tebaldi, assistant professor of economics at Bryant University, the behaviour of men and women toward infidelity differs substantially, as men and women respond differently to the perceived costs and benefits of an affair.
For women, biological and socio-economic factors like men who are good candidates to father a child and who have the education and financial stability to provide for a family are significant factors women consider when deciding to have an affair.
These factors do not come into play for men who, overall, are 7 percent more likely to cheat than women.
The likelihood of a man having had an affair increases with age and reaches a peak when a man is about 55 years old. It then decreases with age. For women, the peak is 45 years old, which the authors say is logical when considering the biological reasons why women cheat.
The benefits of female infidelity reduce after the age of 40 because a woman would no longer benefit in terms of improved gene quality from the affair.
Men also experience a reduction of sperm quality around the age of 45, but the reproductive benefits of an affair expend further into a man's lifetime than a woman's, the researchers said.
The researchers found that upper-class women are 8 percent more likely to cheat than middle and lower-class women. In contrast, men from lower, middle and upper classes are equally likely to cheat.
College-educated men are 3 percent less likely to have an affair than men with a high school education or less. However, educational attainment has no impact on the incidence of infidelity for women.
The researchers theorize that highly educated men may do better in choosing a mate of similar calibre, which reduces their desire to cheat. Women whose husbands have a college or graduate degree are 3 percent less likely to have an affair.
On contrary, men do not consider their spouse's education level when calculating the cost of having an affair.
Elmslie said that if a couple divorces because of an extramarital affair, a woman married to a highly educated man will lose income and may not be able to find another partner of similar quality. Men act as if this consideration is not important.
Unhappy people are more likely to cheat. Religious women are 4 percent less likely to have an affair than women who are not religious. However, religion has no impact on whether men decide to have an affair.
The result that religion does not affect male behaviour toward infidelity is consistent with expectations based on biology.
As with spousal education, men don't weigh the costs like spousal quality or eternal damnation when deciding whether or not to have an affair, the researchers said.
Men living in rural areas are less likely to cheat than men in cities because of the decrease in anonymity in rural areas. And like men, women living in rural areas are less likely to cheat because they are more likely to get caught.
The study is published in the latest issue of the journal Kyklos.