Teachers are more lenient in their marking of girls' schoolwork, according to an international study.
An OECD report on gender in education, across more than 60 countries, found that girls receive higher marks compared with boys of the same ability.
Researchers suggest girls are better behaved in class and this influences how teachers perceive their work.
Differences in school results can sometimes "have little to do with ability", says the study.
The OECD study, examining gender inequality in education, says that girls can be put off careers in science because of a lack of self-confidence and negative stereotypes.
But it also reveals that teachers can be biased towards giving girls higher results than boys, even when they have produced the same quality of work.
The researchers suggest that this reflects expectations about girls being positive towards learning and less disruptive.
In contrast, boys are more likely to be hostile towards school and likely to do fewer hours of homework, says the OECD study.
"From a young age, boys are less likely to raise their hand in class to ask to speak, they are worse at waiting their turn to speak or engage in an activity, they are less likely to listen and pay attention before starting a project," says the study.
And as they get older, boys are more likely to "start withdrawing in class and becoming disengaged".
When it comes to teachers' marking, the study says there is a consistent pattern of girls' work being "marked up".
It suggests that "teachers hold stereotypical ideas about boys' and girls' academic strengths and weaknesses".
Teachers are said to reward "organisational skills, good behaviour and compliance" rather than objectively marking pupils' work.
The findings suggested that teachers needed to be aware of "gender bias".
It also raised questions about whether this really benefited girls.
"Is it a good thing? Maybe in the short run, you get a better school certificate," said the OECD's education director, Andreas Schleicher.
"In the long run, the world is going to penalise you because the labour market doesn't pay you for your school marks, it pays you for what you can do."
The report also showed that in science and maths, girls often underestimated their own ability. Even when they were as good or better than boys in these subjects, they still lacked the self-confidence to pursue careers in science and technology.