It is the first state visit by a US president since that of President George W Bush and his wife, Laura, in 2003.
President Obama came to the UK for the G20 summit in 2009 but that was not a state visit.
In July last year David Cameron visited Washington and met Mr Obama, who will visit London from 24 to 26 May.
The First Lady, Michelle Obama, will accompany the president on the visit but details of his itinerary have not been announced.
The prime minister's official spokesman said on Thursday: "The prime minister is very pleased this visit is taking place. It is a sign of the strong and enduring relationship between our two countries."
Last year's meeting, which was dominated by recriminations after the BP oil crisis in the Gulf of Mexico, ended with President Obama describing the Anglo-American relationship as "truly special".
Add new comment