Mr Obama is expected to meet lawmakers as well as business and civil society leaders and youth on his trip.
The 26 June - 3 July visit will be Mr Obama's second to sub-Saharan Africa as president. He spent less than a day in Ghana in 2009.
Former Presidents Bill Clinton and George W Bush both visited Africa during their second terms in office.
Mr Clinton visited six countries while Mr Bush went to five.
"The president will reinforce the importance that the United States places on our deep and growing ties with countries in sub-Saharan Africa, including through expanding economic growth, investment, and trade; strengthening democratic institutions; and investing in the next generation of African leaders," the White House said in a statement.
"The trip will underscore the president's commitment to broadening and deepening cooperation between the United States and the people of sub-Saharan Africa to advance regional and global peace and prosperity."
Analysts say such trips are common for US presidents after they are relieved of the pressure of domestic campaigning.
Meanwhile, a developing threat of Islamist militants in the west African country of Mali has raised the region's profile in Washington.
First Lady Michelle Obama is due to accompany Mr Obama on his trip.
US President Barack Obama will visit Senegal, South Africa and Tanzania in June, the White House has said.