The dead include women and children which will no doubt set off another round of riots when the soldier is put in a mental hospital rather than executed.
The soldier has not been named, but is thought to be a staff sergeant.
He is reported to have walked off his base at around 03:00 local time (22:30 GMT Saturday) and headed to nearby villages, moving methodically from house to house.
"Eleven members of my family are dead. They are all dead," Haji Samad, an elder from Najeeban village, told the AFP news agency.
Haji Sayed Jan, from Alkozai village, was quoted by the AFP as saying: "My home was attacked and I lost four family members".
A delegation from the provincial governor's office has arrived in the village to determine exactly what happened, a spokesman said.
The soldier - who had reportedly suffered a breakdown before the attacks - is said to have handed himself over to the US military authorities after carrying out the killings.
This is the first time Afghan civilians have been targeted by foreign soldiers in this way, the BBC's Quentin Sommerville reports from Kabul.
However, a US soldier was convicted last year on three counts of premeditated murder after leading a rogue "kill team" in Afghanistan.
The incident, and the almost certain street violence to follow, will give fodder to those who are asking what we are doing in Afghanistan.
It's a question fewer and fewer people seem willing to answer.