One pleasant Thursday at 3.20pm, Carl Roberts, the principal of the Malling School in Kent, walks to the front gates. Along with several other members of staff, he makes the same journey every morning and afternoon, greeting pupils as they arrive and leave. “It’s all about modelling positive behaviour for young people from disadvantaged backgrounds,” he explains.

Roberts is an admirable head teacher. Energetic and ambitious, he runs a school that marries warmth with a sense of order. Just outside the gates, he gently admonishes the only boy without his shirt tucked in. The child immediately apologises.

The Malling has thrived during Roberts’s eight years as head. In 2015 it was rated “good” across all of the main areas assessed by Ofsted, the schools standards agency, and “outstanding” for its students’ personal development. In recent years, its overall progress has been in the top third of schools nationally and the attainment gap between disadvantaged and non-disadvantaged pupils is less than half the UK average.

The school is nestled in East Malling, a town that at first glance seems to conform to an idealised view of 1950s England: abundant green spaces and farmland, several busy pubs and a couple of churches. There was an uproar last year when East Malling Cricket Club, which dated back to the 19th century, closed because of a shortage of funds and players – even though there remain three other clubs within four miles of the station. Tonbridge and Malling, the constituency that encompasses the town, is among the safest Conservative seats in the country and ranks above average judging by national indicators for employment, health and well-being.

This is not an obvious place to find students struggling. Yet at the Malling School last year only 30 per cent of pupils got five good GCSEs including English and maths. Of the third of students eligible for free school meals (FSMs) – the national average is one in five – just 17 per cent get five good GCSEs, falling to 15 per cent for boys. Here, almost all of these pupils are white.

These results are indicative of a wider trend. Across England, the white working class performs badly. Overall, just 28 per cent of white children on FSMs get five good GCSEs; the figure drops to 24 per cent when girls are excluded. A white working-class boy is less than half as likely to get five good GCSEs, including the core subjects, as the average student in England, and among white boys the gap between how poor and middle-class pupils do is wider than for any other ethnic background. As Theresa May noted in her first speech as Prime Minister, “If you’re a white, working-class boy, you’re less likely than anybody else in Britain to go to university.” More recently, she signalled her intention to address this and other shortcomings in education through sweeping reforms, including allowing grammar schools to expand. Britain, May said, should be the world’s “great meritocracy”.

***

A few hundred metres away from the Malling School lies the East Malling estate known to local people as Clare Park. About one-third of the school’s 700 students live in tower blocks here. Roberts says that, all too often, these pupils “will be worried about their parents, they will be worried about where their next meal is coming from. And suddenly they are no longer worried about passing exams.”

Roberts can relate to this. He grew up in the 1980s on a council estate in Tewkesbury, Gloucestershire, and his father was unemployed for many of his teenage years. Roberts attended the local comprehensive and, helped by his supportive parents, got the best GCSE grades in his year. He went on to study at the University of Bath.

“My childhood shaped my values, which is why I now work with children from disadvantaged backgrounds, with a view to ensuring they can have the future I was lucky enough to have,” he says. Maximising pupil attendance is central to doing so. On the main school noticeboard, a sign reads: “365 days a year, 190 in school, 175 not in school”. This is designed to stress to pupils how important it is to attend class, but it also serves as an unwitting reminder of the limits of what any school can achieve.

“Schools will see children for six hours a day,” Roberts says. “There’s a lot of other time when children are much more influenced. Until you sort out things like health for people from disadvantaged backgrounds, until you help them overcome the issues with crime, until you help them overcome the issues associated with poverty and lack of employment, schools are never going to be able to close that attainment gap by themselves.”

When pupils arrive at the Malling School at the age of 11, their attainment is already 20 per cent below the national average. Here, as across England, much of the damage to deprived pupils’ prospects is done even before primary school begins. In his or her first years of life, a young child with two highly educated parents will receive 40 minutes a day more parental engagement in playing and reading – 240 hours more per year – than one with two low-educated parents. By the age of five, there is an average 19-month gap in school readiness between the most and least disadvantaged children.

“This is a wider issue that’s actually nothing to do with schools,” Roberts tells me. “If you’re going to tackle [it], you need to do it between the ages of nought and two in the family home. It’s a social issue, not an education issue.” From their early years, poor white boys do particularly badly. At Key Stage 1, the exams taken when children are six or seven, white boys on FSMs already perform worse than any other ethnic group.

The challenge facing disadvantaged students is exacerbated by politicians’ neglect of primary education. Primary-school teachers in the UK are the youngest in the Organisation for Economic Co-operation and Development area. In an OECD report in 2012, the UK and Estonia were the only two out of 30 countries surveyed in which class sizes at primary were larger than at secondary level.

“There’s something fundamentally crackers about having a class size of 34 for children aged five and a class size of five for children aged 18,” says Phil Karnavas, the executive principal of the academy trust that runs Canterbury High, another school in Kent with a large proportion of underprivileged white pupils. The earlier in a child’s life money is invested, the further it goes.

Yet deprivation alone cannot explain the struggles of poor white children. Equally disadvantaged pupils from other ethnic groups perform far better. Thirty years ago, researchers divided children in Kingston, Jamaica, into three groups. One group received nutritional supplements; the parents of another group received hour-long weekly coaching sessions in parenting techniques and were encouraged to play with their children and to read and sing to them; the control group received nothing. Those whose parents were encouraged to play with them thrived both at school and in later life and now earn 25 per cent more, on average, than the other sets of children.

Parenting seems to explain some of the differences in results between white children and those of other ethnic groups on FSMs. Studies suggest that ethnic-minority parents often have higher aspirations for their children and are more involved with their education. This leads their children to engage more at school, says Simon Burgess, an economics professor at Bristol University whose speciality is education. More engaged parents can transform a child’s educational prospects. In July, a trial involving 16,000 pupils conducted in England by the Education Endowment Foundation found that children in secondary schools perform better and are absent less often when their parents receive regular text messages alerting them about forthcoming tests.

***

Demographics also work against poor white children. According to the Social Market Foundation, where a child grows up now has a greater impact on his or her results in school than in previous generations. Only about 10 per cent of England’s white population lives in London, against 45 per cent of the ethnic minorities. Schools in London have been transformed over two decades with intensive investment and focus from politicians; they are also more likely to have thriving after-school clubs, which are crucial in ensuring that children from disadvantaged areas do not fall behind. There is little selection among state schools in London but, instead, an emphasis on demanding higher standards from all students.

Disadvantaged white children perform better when they are in London but they are more often educated in small towns or rural areas where they can be “invisible”, as Michael Wilshaw, the head of Ofsted, warned in June. They can also suffer because they have longer commuting times than children in big cities, making it harder for them to take part in after-school or homework clubs, if their school offers them at all. Meanwhile, local services such as libraries are more difficult to find, especially since the cuts imposed under the government’s austerity programme. And in places such as Kent, the allure of London, which is nearby, can make it even more of a struggle for schools to attract the best teachers.

“As each year goes on, the quality of teachers gets better and better but it becomes harder to recruit teachers,” Roberts says. He is desperate to introduce a homework club after school but lacks the funding.

Throughout the Western world, boys now work less hard at school than girls and get worse results. Across 64 countries that the OECD surveyed last year, boys were less likely than girls to do homework and to read for enjoyment, but were more likely to play computer games and surf the internet, as well as have negative attitudes towards school and turn up late. Girls aged 15 were, on average, a year ahead of their male peers in reading aptitude.

Yet the gender gap is particularly high among the white working class in England. Just 9 per cent of white males on FSMs aged 18 go to university. For every two disadvantaged white boys who go to university, three disadvantaged white girls do: the highest gap between boys and girls on FSMs in any ethnic group.

White working-class boys suffer from a paucity of positive role models. The decreasing numbers of well-educated, working-class men in public life makes poor white boys less willing to work hard at school. “It’s not cool for boys to do well. They have stereotypes to live up to,” a girl at Canterbury High School tells me.

Another factor working against young boys is that most teachers in the UK are female and middle class, says Anna Wright, an educational psychologist. Less than 15 per cent of primary-school teachers in England are male (the figure rises to 37 per cent in secondary school). And poor children are more likely than advantaged children to grow up with only one parent. In nine cases out of ten, children from broken families live mostly with their mother rather than their father, and so have no male role model.

White boys suffer in particular because of the legacy of deindustrialisation and the collapse of secure jobs for life. “The culture of white, Anglo-Saxon, working-class boys is one which has historically led them from the terraces to the factory, the fields or the farm. That doesn’t exist any more,” says Karnavas, of the Canterbury Academy. “If you’re at the bottom end of generational unemployment – not just first-generation, but in some cases second- and third-generation – your assumption will be that you are not going to be employed.”

Karnavas says that when GCSEs come around, teachers are left “firefighting”, attempting to salvage a few decent results from boys facing stiff challenges from birth. This is nothing new: he argues that we could have been having a similar discussion 40 years ago. However, in a globalised world, the consequences of failure at school have become “more dramatic than they may have been in the past”, as a House of Commons education committee report warned two years ago. There is more competition for jobs than ever before. This bodes ill for white working-class boys, who now rank bottom for educational attainment in England. Their position relative both to girls and to other ethnic groups has never been lower. In the job market, poor white boys are left standing at the back of the queue.

The position of white working-class boys is falling. Ethnic minorities continue to soar: since 2005, the GCSE results of black children on FSMs have improved 50 per cent more than those of white children on FSMs. A white British boy on FSMs is now less than half as likely to get five good GCSEs as a Bangladeshi British boy on FSMs.

The gender gap, too, continues to grow. On current trends, a girl born in 2016 will be 75 per cent more likely than a boy to proceed to higher education. For the first time in history, it will become the norm for women to date and marry men with fewer educational qualifications than they have.

Back at the Malling School, Roberts is content as he lingers by the gates. “They’ve all left incredibly happy, having had a very positive day,” he says. Then he pauses, and regrets that many of the children “may not have their own bedroom or their own workspace. They may not even have books in their house.” By the time they return to school tomorrow, many boys at the Malling may have fallen even further behind.