Obama said the timeline for closing Guantanamo will depend on cooperation from Congress.
About 220 detainees remain at the prison, and the administration must decide how to prosecute some in US courts and turn others over to other countries.
Obama spoke in an interview with Fox News Channel.
Also on Wednesday, A British judge ruled that British spies can keep some evidence secret from former Guantanamo prisoners who are suing the government for alleged complicity in their detention, the first volley in a legal battle to expose what role Britain played in the men's imprisonment.
Seven ex-Guantanamo inmates allege they were tortured or abused at the US prison camp and elsewhere - and that the British government contributed to their torment.
Their civil suit seeking damages from the spy agencies MI5 and MI6 and other government bodies has yet to come to trial, but the government won a preliminary victory by securing the right to keep selected pieces of information from the men and their lawyers.
Justice Stephen Silber warned that his ruling was a "stark question of law, not related to the facts of the case." He said lawyers would still have to work with any future trial judge to decide which evidence, if any, could be kept under wraps.