"Having the UK in the EU gives us much greater confidence about the strength of the transatlantic union, and is part of the cornerstone of the institutions built after (the second world war) that has made the world safer and more prosperous," Obama said in an interview aired today.
"We want to make sure that the United Kingdom continues to have that influence," he told the BBC.
British Prime Minister David Cameron has said a referendum on whether or not to remain a member of the 28- nation bloc will be held by the end of 2017.
That referendum will follow a renegotiation of the existing terms of British membership.
Cameron has said he will campaign for Britain to remain in the EU if he gets the reforms he wants.
In his BBC interview, Obama denied putting pressure on Cameron to meet that NATO targets but said there had been an "honest conversation" between the two leaders.
The US President, who has 18 months left in power, also admitted that the failure to pass "common sense gun safety laws" in the US was his biggest frustration.
He was speaking to the BBC at the White House before departing for Kenya, where he begins a short tour of Africa today.
