The explosions took place as students were leaving the building on Saturday, with pictures on social media showing abandoned school bags in the street.
Most of the victims were girls, a ministry of education spokeswoman said.
No-one has admitted carrying out the attack in Dasht-e-Barchi - an area often hit by Sunni Islamist militants.

A girl is carried to hospital after the attack
Afghan government officials blamed Taliban militants for the attack, but the group denied any involvement.
The explosions are believed to have been caused by a car bomb and two improvised explosive devices planted in the area.

Relatives mourn next to coffins of two victims of yesterday's explosion during a mass funeral ceremony in Kabul, Afghanistan May 9, 2021.
The neighbourhood in western Kabul is home to many from the Hazara minority community, who are of Mongolian and Central Asian descent and are mainly Shia Muslims.
Almost exactly a year ago, a maternity unit at the local hospital was attacked, leaving 24 women, children and babies dead.
The exact target for Saturday's bloodshed is unclear.
The blasts come against a backdrop of rising violence as the US looks to withdraw all its troops from Afghanistan by 11 September.
Reports from Kabul say the city was busy with shoppers ahead of this year's celebrations for Eid al-Fitr next week.
Students were also streaming from the school. Najiba Arian, ministry of education spokeswoman, told Reuters news agency the government-run school was open to boys and girls.

Men carry the coffin of a victim of yesterday's explosion during a mass funeral ceremony in Kabul, Afghanistan May 9, 2021/div>
Most of the those hurt were girls, who study in the second of three sessions, according to Ms Arian.
Several witnesses described hearing three separate explosions, while one woman told AFP news agency she had seen "many bloodied bodies in dust and smoke".
"I saw a woman checking the bodies and calling for her daughter," the woman, Reza, said. "She then found her daughter's bloodstained purse after which she fainted and fell to the ground."The US state department condemned "the barbarous attack".
"We call for an immediate end to violence and the senseless targeting of innocent civilians," it said.
The European Union's mission in Afghanistan said on Twitter that "targeting primarily students in a girls' school, makes this an attack on the future of Afghanistan".

More then 50 death in the blast near the school
Category: Taliban/ISIS/Terrorism, Women, Children, Education - Views: 4171
Related
02.11.2020: Attack on Kabul University by ISIS gunmen leaves 22 dead
24.10.2020: Deadly Explosion Hits Kabul Tutoring Center
30.04.2021: Afghanistan car bomb kills 30 at guesthouse in Logar province
14.04.2021: ‘Terrible days ahead’: Afghan women fear the return of the Taliban
01.04.2021: Afghanistan: Taliban Target Journalists, Women in Media
18.03.2021: 4 Civilians Killed as Blast Targets Govt Employees Bus in Kabul
17.03.2021: Five women, child killed in Afghan bus bombing
13.03.2021: Afghanistan: Car bomb kills at least 7, injures over 50 in Herat province
03.03.2021: Three female journalists killed by gunmen in Afghanistan in latest wave of violence