The names of the deceased have been withheld until next of kin has been notified.
Taliban spokesman Zabihullah Mujahid said that the U.S. soldiers were killed during an ambush in the province of Wardak, the New York Times reported.
The fatalities came as Secretary of State Mike Pompeo said in Afghanistan's capital city of Kabul on Tuesday that the United States is prepared to start withdrawing troops from the country, where there are currently about 14,000 deployed.
"Regarding terrorism, we've made real progress and are nearly ready to conclude a draft text outlining the Taliban commitments to join fellow Afghans in ensuring that Afghan soil never again becomes a safe haven for terrorists," he said.
He didn't give a timeline on the withdrawal.