A just-released landmark survey of gay, lesbian, bisexual and transgendered adults asked about three milestones: When they first thought they were gay, when they first knew they were gay and when they first told a close friend or relative.

Male respondents, on average, said they suspected by the age of 10, knew at 15 and told someone at 18. Females hit each milestone later: They sensed it at age 13, knew at 18 and told someone at 21.

For parents, that presents a challenge — they may spend the second half of childhood unknowingly taking care of a son or daughter who is in the closet. The message they unwittingly send during those years may impact when — or even if — they are ultimately told.

Just six out of 10 in a survey by the Pew Research Center had told one or both of their parents. The others had told friends or other relatives, while a startling 13 percent had still told no one. A handful of respondents indicated they didn’t know they were gay until they were well into their 60s.

As societal attitudes change, that “coming out” age is dropping.

Joshua Guzman of Bloomfield had already spent years knowing he was different from other boys when he finally told his mother at the age of 10. He planned to do it by letter, but when she happened upon him writing it, he tried to hide the sheet of paper. That triggered a mother’s suspicion and she demanded to know what he was writing.

He shyly handed it to her. She read the unfinished letter and asked, “Are you sure?” He answered, “Mommy, I know I’ve been gay forever. I knew since I was real small.”

Katie Fettweis, of Randolph, heard this classic line at a restaurant when her son was about to go off to college: “There’s something I’ve been meaning to tell you.” He was gay and was seeing someone.

Taken aback — she knew her youngest son was “sensitive,” but not much beyond that — she told her son it didn’t make any difference. Then she neatly segued into, “And tell us about this fellow you’re seeing.”

“Thank God,” she says now of her ability to come up a gracious response on the fly to her son’s revelation.

The Pew survey was done online and allowed for anonymity in hopes of attracting a wider range of participants. Researchers in this area typically have trouble locating closeted gays, who will hardly step forward to take part in any study in which they would have to reveal their sexual orientation, said Ritch Savin-Williams, a Cornell University psychologist who studies gay youth.

That leaves most surveys inherently incomplete. “There’s this other whole huge group, and what do we know about them?” he said.

He explains the gap in age at which boys and girls disclose their sexual orientation results from the social cues they receive.

Girls grow up knowing it’s perfectly fine to have a best friend with whom she can hold hands, exchange friendship bracelets and have emotionally charged spats. This means it takes longer for young lesbians to realize their “crush” on a friend is somehow different.

Gay boys learn from a very young age that physical affection between boys is off-limits. In a way, that helps them realize their attraction to other boys goes against the social norm.

A child’s claim to know his or her sexual orientation before puberty challenges the tradition notion that it marks the onset of sexuality. Recent research has focused on an earlier biochemical benchmark: the adrenal gland’s release of hormones, or “adrenarche.” This typically occurs around third grade, said Savin-Williams, the author of, “Mom, Dad, I’m Gay: How Families Negotiate Coming Out.”

His research — backed by this latest Pew survey — shows a gay teen will usually tell a mother first. The father will either be told later, or the teen will ask the mother to tell the father. Most parents — particularly mothers — already suspect. Extended family members, especially grandparents, are often the last to be told.

“I don’t think telling a parent at any age gets any easier.” – Joshua Guzman, 15.

“When mothers say they didn’t know, I say, ‘What?’ Most mothers would say, ‘Well, I always suspected … I just thought he was more sensitive,’âÂÂ ” Savin-Williams said.

Joshua’s mother, Beatrice Padilla, said, “I always knew in my heart he was going to grow up to be gay.” That didn’t mean, however, she was prepared to learn that day had arrived when her son was in just the fifth grade.

When the boy timidly asked, “Is there something wrong with me?” though, she rallied:

“You eat like everyone else, you sleep like everyone else, you go to school like everyone else. You’re no different,” she said.

He’s now 15 and says that while he never doubted his mother would be supportive, “I don’t think telling a parent at any age gets any easier.”

Sons expect a more negative reaction than daughters, but, in fact, they receive the same reaction. The average reaction is characterized as “slightly negative,” but it’s better than what those still in the closet dread. It can range from celebration to violence and eviction.

“I think we haven’t given parents who are really decent and reasonable enough credit,” Savin-Williams said. “Most don’t throw the kid out of the house.”

Gay teens typically tell a friend first — with both boys and girls usually telling a girlfriend.

Mothers are typically more emotional in their reaction, worrying about what the revelation means for their child’s future, Savin-Williams said. “The father usually goes, ‘Oh, okay,’ and walks away.”

Jyl Josephson’s son accidentally told his mother when he was in the eighth grade. A bunch of kids in school had been using homophobic slurs, and when he was telling her about it, he said, mid-sentence, “… and I’m the only gay person who will stand up to them.”

“Wait a minute,” his mother interrupted. “I think you just told me something.”

For some parents, acceptance comes with a large dose of fear, as they worry how society will treat their child — particularly their sons.

For example, Fettweis says she’ll always worry for her son’s safety, even though he’s almost 28.

And both Guzman’s mother and father have warned him to avoid flaunting his sexual orientation in public — likening it to flashing a lot of cash in a crowd. He takes that message to heart. Joshua says he’d tell other gay teens to avoid public displays of affection. “Save that for indoors. I’m not saying don’t be yourself — but watch where you are.”

Josephson worried about her son, especially since they were living in Lubbock, Texas, at the time. He chose to keep his sexual orientation a secret at school — not revealing it until they moved to Illinois.

“If he had been out in Texas, I would’ve feared for his physical safety,” said Josephson, a Rutgers University-Newark professor of political science who lives in Jersey City.

She, like the Padilla and Fettweis, joined PFLAG, the support group for parents of gays and lesbians. (Even Lubbock had a chapter.)

Josephson and her son ended up editing the chapter’s newsletter together.