The blasts happened at the Abdul Rahim Shahid high school in the Shia-dominated west of the city. The number of dead and wounded is likely to rise.
A nearby tuition centre was also targeted in a grenade attack.
There was no immediate claim of responsibility. Islamic State militants have attacked the area in the past.
Initial reports suggested Abdul Rahim Shahid pupils and staff may have been targeted by suicide bombers, but Kabul police spokesman Khalid Zadran said improvised explosive devices had been left outside the school, killing six people.
“These are preliminary figures. We are at the site and waiting for more details,” he said.
Earlier, sources from Muhammad Ali Jinnah Hospital in Kabul told the BBC they had received four dead bodies and 19 injured people so far from the school attack. Other blast victims are being treated elsewhere.
Photographs from the aftermath of the explosions show bloodstains on the ground alongside discarded notebooks.
The area in which the attacks took place – Dasht-e-Barchi – has frequently been the target of attacks by the local branch of the Islamic State group because of its largely Hazara Shia Muslim population.
Hazaras are an ethnic and religious minority frequently targeted by Sunni militant groups, who view them as heretics.
After a spate of IS attacks last year following the Taliban takeover, the group’s activities had declined.
IS has carried out a devastating campaign against Shias in Afghanistan over the last few years. Scores have been killed in bombings on targets including sports halls, cultural centres, and places of education.
Last May, more than 90 students, and staff were killed in an attack by IS on a girls’ school in Dasht-e-Barchi.
-
Taliban backtrack on reopening schools for girls
23 March -
Girls’ tears over chaotic Taliban schools U-turn
23 March -
Taliban killed 13 ethnic Hazara people, Amnesty says
5 October 2021 -
Deadly attack near secondary school in Afghanistan
9 May 2021