The Department of Disaster Preparedness said about 30 people were estimated to have been killed since June 27 in Panjshir Valley, north of Kabul, and seven others in Kabul Province.
Other deaths were recorded in the provinces of Kapisa, Kunar, and Paktia.
In many regions, there was also damage to homes, agricultural land, roads, wells, and livestock.
Abdurahaman Kabiri, deputy governor of Parwan Province, told RFE/RL's Radio Free Afghanistan that blocked roads have been hampering rescue operations.
The flooding is described as some of the most severe in the region in recent memory.