"Woman, children and employees of the (rehabilitation) ministry are among the victims", Najib Danish, spokesman for the interior ministry, said.
The explosion took place when employees were leaving their offices early for Ramadan.
The Health Ministry said 13 employees of the Ministry of Rural Development were killed and 25 were wounded when the bomber struck as they were leaving work.
A week ago, a motorcycle suicide bomber killed 14 people near a gathering of Muslim clerics in the Afghan capital after they had issued an edict against suicide bombings, officials said, in the latest in a series of attacks to hit Kabul.
Taliban fighters killed a governor and took control of his district in northern Afghanistan as clashes broke out across the country, officials said on Tuesday, accusing the militants of defying the start of a government ceasefire with them.
Yes, Trump Talked About Human Rights With Kim Jong Un - Katie Pavlich
Told by doctors he would never recover, the parents agreed to remove him from life support and he died six days later , age 22. Warmbier was evacuated in a coma on June 13, 2017, and returned home to his family in Cincinnati.
A suicide bomber blew himself up at the entrance to the education department, triggering a fierce battle between gunmen and Afghan security forces, Nangarhar provincial governor spokesman Attaullah Khogyani told AFP. Three people were also injured.
The government will continue its operations against other groups, such as IS, during the ceasefire. They said they would continue attacking US-led North Atlantic Treaty Organisation troops.
The Taliban said Saturday their fighters would stop attacking Afghan security forces, but only for the first three days of Eid, the holiday capping Ramadan.
It is the first time the militants have agreed to suspend fighting since the 2001 U.S. invasion, and the move was largely welcomed by war-weary Afghans. Both sides agreed that while results of the bilateral initiatives are extremely important but even more important is the continuity of the processes to achieve the end state objectives.
The violence occurred just before the government is due to begin a week-long truce with Taliban insurgents Tuesday.
The latest violence comes as dozens of protesters march hundreds of kilometres towards Kabul to demand an end to the almost 17-year conflict.