In one attack, in western Farah province, the insurgents stormed a security post, killing nine troops and wounding four.
The attack took place last night in Pusht Road district, said the governor's spokesman, Mohammad Naser Mehri.
An intense, four-hour gunbattle followed the attack and included the use of artillery against the army, Mehri said. Afghan warplanes were deployed and 17 Taliban fighters were killed, he added.
The second took place in neighboring Herat province, also on Tuesday night, and targeted an army post in Kushki Kuhna district, killing two soldiers and wounding five, according to Najibullah Najibi, the military's spokesman in Herat.
More From This Section
There was no immediate comment from the Taliban on the attacks in Farah and Herat but insurgents have stepped attacks all across Afghanistan, with the last two weeks being particularly deadly for Afghan forces.
Last Thursday, a Taliban attack on a military compound left 43 soldiers dead in southern Kandahar province, a Taliban heartland.
Meanwhile, Afghan officials also reported intense clashes on Monday and Tuesday in northern Jawzjan province between Taliban fighters and rival militants from an Islamic State affiliate that emerged in recent years in Afghanistan.