Millions more are in classrooms but don't get a quality education - here we look at some of the causes of a global learning crisis.
Theirworld's vision is to end the global education crisis and unleash the potential of the next generation. Despite the Sustainable Development Goal to have every child in school and learning by 2030, there are still 260 million children who don't go to primary or secondary school.
Without urgent action, in a decade 825 million children – half of all young people in the world – will not have the most basic skills necessary for jobs of the future.
Theirworld's #WriteTheWrong campaign is about raising awareness of the issue and advocating for big change to tackle the global education crisis.
Here we look at some of the reasons why so many young people are out of school or being denied a quality education. Each obstacle is huge to the children trying to overcome them - so we've listed 20 reasons in purely alphabetical order.
Attacks on education
Hundreds of schools around the world have been attacked - disrupting or ending the education of many children. A shocking report last year revealed more than 14,000 attacks on education - including about 10,000 directly on schools - in 34 countries over a five-year period.
The Global Coalition to Protect Education from Attack said: "Buildings were bombed, damaged or used by armed forces or groups, sometimes making them inaccessible to students. Nine countries each suffered more than 500 attacks on schools."
Schools were occupied for military purposes in at last 30 countries. Female students and teachers in particular were targeted - including through the bombings of girls’ schools, abduction, rape and harassment at school and on the routes students take to school.
The Safe Schools Declaration - a commitment to protect schools from attack and military occupation - was launched in 2015 and has now been signed by 101 countries.
More than 150 million children aged five to 17 - half of them under 11 - are victims of forced labour and often miss out on education. Of those, 73 million work in hazardous jobs, according to the International Labour Organization.
Child labour is classed as work that is mentally, physically, socially or morally dangerous and harmful to children - and interferes with their schooling.
Child labourers work in a variety of roles including in homes, mines, fields and factories. They can carry heavy loads, work long hours and suffer exposure to pesticides and other toxic substances.
Many girls begin working as young as five, mainly in agriculture or in homes as domestic servants. Child domestic workers are particularly vulnerable to trafficking, forced labour, sexual violence and many health issues.
There has been progress, with 25 million child marriages prevented in the past decade. But there is still a long way to go.
Each year, around 12 million girls a year are married before the age of 18 - including 38% of girls in sub-Saharan Africa - often with devastating consequences for their health and education. Too often marriage is seen as a higher priority for girls than going to school.
"Child marriage violates girls’ rights to health, education and opportunity. It exposes girls to violence throughout their lives and traps them in a cycle of poverty," says the charity Girls Not Brides.
Boys can be affected but most victims of child marriage are girls. There are child marriages in every part of the world, including Europe and north America. But the highest rates of girls under 18 getting married are in Niger (76%), Central African Republic and Chad (both 68%).
This can impact children's education in many ways. The obvious one is an increase in extreme weather such as flooding or typhoons, which leaves schools damaged, destroyed or being used as shelters.
Around 37 million children have their education disrupted each year because of environmental threats. In South Asia, 18,000 schools were shut in 2017 following damage or destruction in the region’s worst flooding in years.
Academic research published last year by the US National Academy of Sciences found that extreme climate changes in the global tropics can make it hard for children to attain a secondary school education.
Families affected by droughts, heat waves and crop failures often remove their children from school to work at home or because they cannot afford fees.
Almost one in five children live in countries affected by conflict - and many of them are denied an education as a result.
The long-term effects of growing up in a conflict zone are devastating and UNICEF estimates that 48.5 million children worldwide are missing school because of wars and conflicts.
Children in conflict-affected countries are 30% less likely to complete primary school and half as likely to complete lower-secondary school.
Girls are almost two and a half times more likely to be out of primary school and 90% more likely to miss secondary schooling if they live in conflict-affected countries, according to the emergencies fund Education Cannot Wait.
Children with disabilities are more likely to miss out on school than other children. Even if they go to school, they are more likely to leave before finishing their primary education. For children who are already marginalised, such as girls and children living in rural areas, a disability creates an additional barrier to accessing education.
Of the 100 million or so children around the world with a disability, 80% of them are in developing countries. In these countries, 40% of children with disabilities don't go to primary school and 55% are not in secondary education.
Beyond those stark facts are millions of other children with disabilities who are in classrooms but are left feeling excluded, intimidated and unvalued by the failings of school systems.
The UN's 2018 Disability and Development Report said: "Among the countries with data, persons with disabilities ... are less likely to attend school, they are more likely to be out of school, they are less likely to complete primary or secondary education, they have fewer years of schooling and they are less likely to possess basic literacy skills."
Lack of funding at a local, national and international level has a huge effect on the numbers of children who are in school - and on the quality of education.
Some of the poorest countries in the world struggle to finance an education system for all their children. Some systems have to charge fees to survive, which leads to families unable to afford education.
Three-quarters of the world's out-of-school population are in over 70 developing nations, which need to increase their own spending on education while continuing to receive help from the international community.
Until recently, funding for education during humanitarian crises was less than 2% of the aid total. Things are changing thanks to the 2016 launch of the Education Cannot Wait fund, which is reaching millions of children in emergencies.
The UN estimates that 130 million girls between the age of six and 17 are out of school and 15 million girls of primary-school age - half of them in sub-Saharan Africa - will never enter a classroom.
Girls are four times more likely to be out of school than boys from the same background. Often, girls are marginalised and are out of school simply because they are girls and it is not the cultural norm for them to be educated. Their chances of getting a quality education are even smaller if they come from a poor family, live in a rural area or have a disability.
Between 2000 and 2015, the gender gap in literacy narrowed dramatically and the number of girls going to primary school rose significantly. But it hasn't been enough.
Fewer than two in three girls in low-income countries complete primary school and only a third finish lower secondary school. Only about 40% of girls in sub-Saharan Africa complete lower secondary school.
Lack of daily, nutritious meals can mean children dropping out of school or not being able to concentrate in the classroom.
"Every day, countless children across the globe turn up for school on an empty stomach, which makes it hard to focus on lessons," says the UN's World Food Programme. "Many simply do not go, as their families need them to help in the fields or around the house."
The offer of a daily meal is a strong incentive for families to consistently send their children to school.
Lack of food has been a major driver behind three million children in Venezuela dropping out of school during the economic and hunger crisis.
Journey to school
A simple walk to school can be extremely unsafe or intimidating for some children. Many parents refuse to send their children - particularly girls - to school in case they are harassed, exploited or sexually abused.
Many children in remote communities also have to make the most unimaginable and dangerous journeys every day to access education.
Some walk along treacherous cliff edges. Others trek into the mountains for miles or cross broken bridges to be at school on time. For children living in rural or poverty-ridden areas there is no quick solution and often it is easier to quit school.
During violent conflicts, girls are deliberately targeted by armed groups and government forces. They often suffer sexual violence, abduction, intimidation and harassment. A study in India in 2016 found that half of all girls were sexually harassed on the way to school - including being leered at, pinched or groped.
Lack of teachers
When the Sustainable Development Goals were launched in 2015, the UN said the world would need 25.8 million additional primary school teachers by 2030.
But that isn't the only issue. Too many teachers don't have the training or qualifications needed to deliver a quality education. Only 85% of primary school teachers globally have been properly trained - in sub-Saharan Africa it's just 64% (and only 50% of secondary teachers).
Many existing teachers, especially in the least developed countries, are untrained, underpaid and working with scarce resources. Some drop out because they are poorly paid or spend too much of their time on non-teaching duties. In many countries affected by conflict, there can be a lack of teachers because they have been become targets for attacks and intimidation.
The lack of female teachers can make school a daunting experience for girls. In many African countries, such as Liberia and the Central African Republic, only about one in five primary teachers are women.
Millions of children, particularly in rural locations, are much more likely to drop out of school if they are not being taught in their mother tongue.
About 500 million children get school lessons in a language they don't speak at home with their families.
In the developing world, children are more likely to enrol and succeed in school if they are taught in their own language.
In particular, girls and rural children with less exposure to a dominant language stay in school longer and repeat grades less often if they learn in their native tongue.
The South Asia floods of 2017 destroyed or damaged 18,000 schools and put 1.8 million children out of school - but natural disasters are happening all the time and disrupting education around the world.
Natural events such as earthquakes, cyclones, floods and landslides can derail schooling for millions of children. They can damage or destroy schools or force them to be used as temporary shelters.
Even if the schools survive, it can take months or even years for them to be repaired and for education to return to normal. Families whose livelihoods have been destroyed may no longer be able to afford to send their children to school.
In the Asia Pacific region, it is estimated that climate change will lead to around 200 million children a year will have their lives severely disrupted by natural disasters over the coming decades.
Periods are a natural part of life for girls - but also a major reason for them missing out on education.
They often don't have access to sanitary products or separate toilets. They face discrimination, stigma and bullying during their periods, sometimes even from their teachers.
In many parts of the world, girls simply drop out of school for several days every month. That can lead to them quitting education altogether.
UNICEF estimates that one in 10 girls in Africa miss school because of their periods each year. In India, as many as one in five girls drop out of school after their periods start.
In many countries, girls who are pregnant - regardless of their circumstances - can be excluded from school and not allowed back even after they give birth.
That picture is improving, especially since 26 African countries adopted policies by 2018 to ensure girls can return to school after having their baby.
But even where they are allowed to return, many young mothers stay away due to stigma, fees, lack of childcare and the unavailability of flexible school programmes.
About 16 million girls aged 15 to 19 and one million girls under 15 give birth every year - most in low- and middle-income countries, according to the World Health Organization.
There are an estimated 250,000 child soldiers in the world today in at least 20 countries About 40% of child soldiers are girls, who are often used as sex slaves and taken as "wives" by male fighters.
Recruitment forces children to miss out on education for years or to drop out of school for ever.
In the past five years, children have been recruited by armed groups in the vicinity of schools in at least 15 countries, according to the Global Coalition to Protect Education from Attack.
Despite efforts to free child recruits, there are still about 19,000 child soldiers in South Sudan alone.
Conflicts like those in Syria, South Sudan and Yemen have led to the biggest refugee crisis since the Second World War.
More than half the world's school-age refugees are excluded from education as host nations struggle under the weight of growing humanitarian emergencies.
Of the 7.1 million refugee children of school age, 3.7 million do not go to school, according to the UN refugee agency UNHCR last year.
Only 63% of refugee children are at primary school - compared to 91% of all children across the world. Just 24% of adolescent refugees attend secondary school, compared to 84% globally.
Basic drinking water and sanitation is taken for granted in high-income parts of the world. But nearly half the world's schools lack clean drinking water, toilets or handwashing facilities.
Almost 900 million children have to contend with a lack of basic hygiene facilities during their education, putting their health at risk and meaning some have to miss school.
In poorer countries only 53% of upper secondary schools have drinking water. Globally, only 66% of primary schools have handwashing facilities but the average across the poorest countries is 43% - and much lower in some nations.
In the least developed countries, only 57% of schools have single-sex toilets, which can lead to problems particularly for girls such as period stigma and sexual harassment.
Conflict and military occupation aren't the only violence that children face at school or on the way there.
Gang violence, bullying and various forms of discrimination can lead to students dropping out of school.
An estimated 246 million girls and boys are harassed and abused on their way to and at school every year - with girls particularly vulnerable. In Africa, half of all children said they had been bullied at school.
18 million girls aged 15 to 19 are victims of sexual violence - often leading to them leaving school and reinforcing cultural practices such as early marriage.
And that's not all...
These are just 20 reasons why children drop out of school or miss out on quality education. We haven't even included overcrowded classrooms, a lack of learning materials, no schools nearby - sadly the list goes on and on.