The US and NATO Resolute Support mission confirmed the fatalities on Friday, but gave no details about location of the combat, Press TV reported.
"The incident is under investigation and we have no additional information to provide," said Class Debra Richardson, a Resolute Support spokeswoman.
The names of the soldiers killed in action were also being withheld until after notification of the next of kin, in accordance with US Department of Defense policy, said the mission.
The deaths come as the US has held a series of talks with the Taliban to end the 17-year-old conflict in Afghanistan.
The Taliban military group said last month that Washington has promised them to withdraw half of its troops from the country by April.
White House officials said last December that the administration of President Donald Trump was planning to withdraw about half of the 14,000 troops deployed to Afghanistan.
The Taliban's five-year rule came to an end following the 2001 US-led invasion, but 18 years on, Washington has failed to end the Taliban’s militancy campaign and is now seeking truce with the militants.
The group has strengthened their grip over the past three years, with the government in Kabul controlling just over 50 percent of the country, down from some 70 percent in 2015, according to a US government report released last year.