The 17th president of the United States was Andrew Johnson. His term lasted from April 15, 1865 to March 4, 1869.