Biden sent thousands of US troops to the Kabul airport after the Taliban took over the city and much of the country less than two weeks ago.
The nearly 6,000 US troops are helping to evacuate American citizens and at-risk Afghans and to protect the airport so other countries can evacuate their citizens as well.
The Pentagon made the recommendation that Biden stick to his Aug. 31 target date on Monday, US officials said.
"During a meeting this morning with the G7 leaders, the President conveyed that our mission in Kabul will end based on the achievement of our objectives. He confirmed we are currently on pace to finish by August 31st," White House spokeswoman Jen Psaki said in a statement.
Biden told the other G7 leaders that completion of the mission by Aug. 31 "depends on continued coordination with the Taliban, including continued access for evacuees to the airport," she said.
"In addition, the President has asked the Pentagon and the State Department for contingency plans to adjust the timeline should that become necessary," Psaki said.
US officials told Reuters earlier that the United States has been in regular contact with the Taliban and officials are telling the Taliban that the timeline is contingent on Taliban cooperation.
Biden sent CIA Director William Burns to meet Taliban leader Abdul Ghani Baradar in Kabul on Monday in the highest level official encounter since the militant group took over the Afghan capital, a US official and a source familiar with government activity told Reuters on Tuesday.
A congressional source said Burns and Baradar had discussed the Aug. 31 date.
The Pentagon recommendation reflects increasing security concerns at the Kabul airport, where American citizens and at-risk Afghans are being evacuated.
Two US officials, speaking on condition of anonymity, said there was increasing concern about suicide bombings by Daesh at the airport.
One official said it was no longer a question of if, but when, militants would attack, and the priority was to get out before it happened.