Both men and women experience post-sex regret, but for wildly different reasons, a new study published in the journal Archives of Sexual Behavior has found.

That nasty, sinking feeling after sex isn't a random feeling of making a bad choice, but might be an ingrained evolutionary trait shaping human reproduction.

Men, researchers say, are more likely to regret not having many sexual partners whereas women regret having sex with the 'wrong man'.

Researchers Andrew Galperin, a former social psychology doctoral student at the University of California-Los Angeles and colleagues wanted to find how regret shapes the way humans assess sexual partners. Interestingly, the study found that even after years of having reliable contraceptives, sexual attitudes among men and women haven't changed.

Throughout evolutionary history, men considered every sexual encounter as a potential to increase chances of fatherhood. For women, on the other hand, sex had to be a well-thought out investment because pregnancy is both tough and time-consuming, according to Martie Haselton, a UCLA social psychology professor and one of the study authors.

"The consequences of casual sex were so much higher for women than for men, and this is likely to have shaped emotional reactions to sexual liaisons even today," Haselton said.

The research was based on three studies. First study included 200 people who were asked to imagine situations where the person failed to have sex with a potential partner. Respondents were asked to rate their remorse on a five point scale.

Second study included 395 people who were asked to indicate their personal experiences from a list of common sexual regrets. The third study included over 24,000 people and was a replica of the second study. Note that the last study included gays, lesbians and bisexuals.

Losing virginity to the wrong person, cheating and having a very active sexual life were among the top three regrets for women.

For men, being shy and not having more sex during early life were among top regrets.

Among homosexuals, women tended to regret casual sex more than men.

Previous research on Canadian students had found that women were more likely to feel remorse after casual sex than men.