Under initial plans, US troop numbers were to be reduced to 5,500, from a current level of 9,800.
The US ended major combat operations in Afghanistan at the end of 2014.
The mission of the remaining US troops is to train Afghan forces and support operations against al-Qaeda and other militant groups.
Mr Obama told reporters that the security situation in Afghanistan remained "precarious", with the Taliban still mounting suicide attacks in the capital Kabul and other cities.
"Instead of going down to 5,500 troops by the end of this year, the United States will maintain approximately 8,400 troops in Afghanistan into next year through the end of my administration," Mr Obama said.
"It is in our national security interest, especially after all the blood and treasure we've invested over the years, that we give our partners in Afghanistan the best chance to succeed," he added.
Afghan President Ashraf Ghani welcomed the US decision. "It shows continued partnership [between] our nations to pursue our common interests," Mr Ghani said in a message posted on Twitter.
The US launched an operation in Afghanistan - then ruled by the Taliban - after the 9/11 attacks on the United States in 2001.
More than 2,300 US soldiers have been killed in Afghan operations.
Mr Obama reiterated his support for a political settlement between the Afghan government and the Taliban.