Barack Obama served for two terms as president
Barack Hussein Obama II ( [ bəˈrɑːk_huːˈseɪn_oʊˈbɑːmə ] ; born August 4 , 1961 ) is an American politician who served as the 44th President of the United States from 2009 to 2017 . President of the United States . The president is indirectly elected by the people through the Electoral College to a four-year term , and is one of only two nationally elected federal officers , the other being the Vice President of the United States . Barack Obama served as the 44th President of the United States from 2009 to 2017 .