Many 45-year-olds hide their homosexuality, the research found (See-ming Lee/flickr)

A significant number of straight men have gay sex, a study has shown.

The analysis of 24,000 undergraduate students revealed that of the men whose last hookup was with a male partner, one in eight defined as heterosexual.

This figure twice as high among women, with one in four whose last sexual experience was a lesbian one identifying as straight.

One explanation for this gap in same-sex encounters between men and women is another study, published in March, which showed that women who have sex with women are much, much more likely to orgasm.

Related: This is why straight men watch gay porn

That study, which had 2,300 respondents, found that women were 33 percent more likely to orgasm when they were having sex with another woman.

The newly released results were discovered by Arielle Kuperberg – an associate professor of sociology at the University of North Carolina at Greensboro – and Alicia M. Walker, assistant professor of sociology at Missouri State University.

Published in Archives of Sexual Behaviour, “Heterosexual College Students Who Hookup with Same-Sex Partners” listed some characteristics of people who would have sexual relations with same-sex partners but continue to self-identify as straight.

Tellingly, these included “more conservative attitudes.”

The researchers also found that there were distinct types of stright people who would engage in gay sex.

“Three types,” they explained, “comprising 60% of students, could be classified as mostly private sexual experimentation among those with little prior same-sex experience, including some who did not enjoy the encounter.”

But, Kuperberg and Walker continued, “the other two types in this group enjoyed the encounter, but differed on drunkenness and desire for a future relationship with their partner.”

They said that though some of the hookups were explained away as “performative bisexuality” by women, this factor made up a small minority of the students – just 12 percent, in fact.

More than one in four – 28 percent – had “strong religious practices and/or beliefs that may preclude a non-heterosexual identity, including 7 percent who exhibited ‘internalised heterosexism.'”

A study revealed in March that no-one is 100 percent heterosexual.

Researchers studied the reaction of men and women who identified as heterosexual when they were shown different kinds of pornographic material.

The study’s author, Ritch C. Savin-Williams, said he wasn’t surprised by the research findings, but that he was shocked how many people still identified as heterosexual despite the evidence.

“We’re trying to get at the way people really are,” he said. “Sometimes, it seems people are one way but believe they have to report themselves in another way, and that’s not good.”

Savin-Williams added that the findings of his study proved a “loosening of the boundaries”.

“I think that’s happening for both sexes. It’s probably a good thing, because it gives kids growing up more diversity, more options, so they don’t feel like they have to fit in [at all costs].”