Under national laws in many countries, men accused of illegal sex with a minor can claim on "reasonable grounds" that they were not aware that the girl was underage.
Factors often taken into account in such cases are how much alcohol a man has imbibed, or how much make-up the young lady might have been wearing.
But the new study, led by Vincent Egan from the University of Leicester in Britain, shows that even when thoroughly soused, a man remains a shrewd judge of female maturity.
The researchers asked 240 people, half men and half women, to look at a series of 10 photos of 17-year-old girls and then comment on their age and attractiveness. Some of the photos had been digitally enhanced to add makeup, or make the young women look older or even younger.
All of the respondents were heterosexual adults, but only half had consumed alcohol before taking the test.
The results showed that alcohol slightly impaired the ability of women to see past the digital manipulations.
But the men, no matter how much they had boozed it up, remained keen judges of age.
"The study suggests that alcohol consumption and make-up use do not interfere with how old we perceive someone to be," Egan said in a statement.
"Even heavy alcohol consumption ... is not of itself an excuse for apparent mistaken age in cases of unlawful sex with a minor."
The findings held true across all age groups, ranging from men in their 20s to men in their 60s.
Nor does peering through a drunken haze enhance the attractiveness of the person one is looking at, an effect sometimes called "beer goggles," the study concludes.
"Overall, participants who drank alcohol actually rated all the women in the photos as less attractive," Egan said.
The study was published in the British Journal of Psychology.