The research shows men who spend even a few minutes in the company of an attractive woman perform less well in tests designed to measure brain function than those who chat to someone they do not find attractive.
The findings have implications for the performance of men who flirt with women in the workplace, or even exam results in mixed-sex schools.
Women, however, were not affected by chatting to a handsome man.
Researchers who carried out the study, published in the Journal of Experimental and Social Psychology, think the reason may be that men use up so much of their brain function or "cognitive resources" trying to impress beautiful women, they have little left for other tasks.
This may be simply because men are programmed by evolution to think more about mating opportunities.
Psychologists at Radboud University in The Netherlands carried out the study after one of them was so struck on impressing an attractive woman he had never met before, that he could not remember his address when she asked him where he lived.
Researchers said it was as if he was so keen to make an impression he "temporarily absorbed most of his cognitive resources"