As his second term comes to an end, President Barack Obama will turn to the next phase of his career. When he steps down in January 2017, Obama will be 55 years old, making him one of the youngest presidents to leave the White House. Although he’s dropped some hints about his retirement plans, it is uncertain how the president will approach his post-White House years.

While some former presidents have spent their post-presidency years picking up a hobby like painting, others have opted to stay very active in public life. Former Presidents Jimmy Carter and Bill Clinton, for example, each started their own foundations after their time in office.

With that in mind, InsideGov decided to take a deeper look at the post-White House lives of U.S. presidents. Using data from the Congressional Research Service, InsideGov found the presidents with the longest retirements, measured as the number of years between leaving the White House and death (or the current date of publication for living presidents).

#26. George W. Bush

Length of Retirement: 7.24 Years (as of publication)

Age at the End of Office: 62

Age at Death: N/A

Date of Death: N/A

For the most part, Bush has steered away from politics after leaving office. In 2010, he published a memoir titled “Decision Points,” which became a best-seller.

#25. James Buchanan

Length of Retirement: 7.25 Years

Age at the End of Office: 69

Age at Death: 77

Date of Death: June 1, 1868

Buchanan remained an unpopular figure in his post-presidency years, as the public blamed him for not properly handling the issue of southern secession. He retired to his home in Pennsylvania, where he largely stayed out of the public eye.

#24. Benjamin Harrison

Length of Retirement: 8.02 Years

Age at the End of Office: 59

Age at Death: 67

Date of Death: March 13, 1901

Harrison resumed his law career after his presidency, even representing Venezuela in a border dispute with British Guiana.

#23. Dwight D. Eisenhower

Length of Retirement: 8.18 Years

Age at the End of Office: 70

Age at Death: 78

Date of Death: March 28, 1969

“Ike” remained a popular figure after his presidency. During the Vietnam War, then-President Lyndon Johnson consulted with Eisenhower about strategy.

#22. Andrew Jackson

Length of Retirement: 8.26 Years

Age at the End of Office: 69

Age at Death: 78

Date of Death: June 8, 1845

Jackson retired to his estate in Tennessee, but he continued to have a political presence through his successor and confidante, then-President Martin Van Buren.

#21. Ulysses S. Grant

Length of Retirement: 8.39 Years

Age at the End of Office: 54

Age at Death: 63

Date of Death: July 23, 1885

After leaving the White House, Grant and his wife, Julia, embarked on a two-year journey around the world.

#20. Theodore Roosevelt

Length of Retirement: 9.84 Years

Age at the End of Office: 50

Age at Death: 60

Date of Death: Jan. 6, 1919

“Retirement” is certainly a misnomer for Roosevelt’s post-presidency years. Whether hunting in Africa, exploring the wilds of the Amazon basin or forming his own political party, Roosevelt kept busy after leaving the White House.

#19. Grover Cleveland

Length of Retirement: 11.3 Years (calculation accounts for years after his second nonconsecutive term ended)

Age at the End of Office: 59

Age at Death: 71

Date of Death: June 24, 1908

Despite the encouragement of his party, Cleveland refused to seek a third term in office. Instead, he retired to Princeton, New Jersey, serving as a trustee of Princeton University.

#18. Rutherford B. Hayes

Length of Retirement: 11.87 Years

Age at the End of Office: 58

Age at Death: 70

Date of Death: Jan. 17, 1893

Hayes took up many political issues after his presidency, including speaking out against the death penalty.

#17. Franklin Pierce

Length of Retirement: 12.60 Years

Age at the End of Office: 52

Age at Death: 64

Date of Death: Oct. 8, 1869

Although he supported the North when the Civil War broke out, Pierce publicly criticized then-President Abraham Lincoln, drawing the ire of many northerners.

#16. Bill Clinton

Length of Retirement: 15.24 Years (as of publication)

Age at the End of Office: 54

Age at Death: N/A

Date of Death: N/A

Since leaving office, Clinton has remained in the public spotlight through his nonprofit organization, the Clinton Foundation. The foundation has tackled issues such as global health, climate change and childhood obesity.

#15. Ronald Reagan

Length of Retirement: 15.37 Years

Age at the End of Office: 77

Age at Death: 93

Date of Death: June 5, 2004

The oldest president to leave the White House, Reagan retired to his home in Los Angeles, California. In 1994, Reagan openly acknowledged his struggle with Alzheimer’s, raising public awareness of the disease.

#14. John Tyler

Length of Retirement: 16.89 Years

Age at the End of Office: 54

Age at Death: 71

Date of Death: Jan. 18, 1862

When it appeared that the Civil War could not be avoided, Tyler became an advocate for Southern secession and was even elected to the Confederate House of Representatives in 1861.

#13. William Howard Taft

Length of Retirement: 17.01 Years

Age at the End of Office: 55

Age at Death: 72

Date of Death: March 8, 1930

Taft fulfilled his lifelong dream when President Warren Harding appointed him as chief justice of the Supreme Court in 1921. Taft served in this position until his death in 1930.

#12. Thomas Jefferson

Length of Retirement: 17.33 Years

Age at the End of Office: 65

Age at Death: 83

Date of Death: July 4, 1826

A renaissance man, Jefferson pursued a variety of interests in his post-presidency years, including philosophy, natural sciences and architecture.

#11. John Quincy Adams

Length of Retirement: 18.97 Years

Age at the End of Office: 61

Age at Death: 80

Date of Death: Feb. 23, 1848

Despite a rocky presidency, Adams had a successful political career in his post-office years. Serving nine terms in Congress after leaving the White House, Adams became one of the nation’s most outspoken abolitionists.

#10. James Madison

Length of Retirement: 19.32 Years

Age at the End of Office: 65

Age at Death: 85

Date of Death: June 28, 1836

After retiring to his Virginia plantation, Montpelier, Madison become involved with the University of Virginia, replacing Jefferson as rector in 1826.

#9. Richard Nixon

Length of Retirement: 19.70 Years

Age at the End of Office: 61

Age at Death: 81

Date of Death: April 22, 1994

Following his resignation and the public outrage over his pardoning, Nixon was hesitant to enter the public spotlight again. However, facing financial strain, he agreed to a series of interviews with British journalist David Frost in 1977.

#8. Harry S. Truman

Length of Retirement: 19.93 Years

Age at the End of Office: 68

Age at Death: 88

Date of Death: Dec. 26, 1972

Truman retired to his hometown of Independence, Missouri. He remained an active voice in politics, openly criticizing the Eisenhower administration.

#7. Millard Fillmore

Length of Retirement: 20.94 Years

Age at the End of Office: 53

Age at Death: 74

Date of Death: March 8, 1874

Three years after he left the White House, Fillmore accepted the nomination for president of the anti-immigration Know-Nothing Party. He won just over 20 percent of the popular vote in the general election.

#6. Martin Van Buren

Length of Retirement: 21.39 Years

Age at the End of Office: 58

Age at Death: 79

Date of Death: July 24, 1862

Like Fillmore, Van Buren launched an unsuccessful third-party campaign for the presidency after leaving the White House. Van Buren’s Free Soil Party, which opposed the expansion of slavery, won just 10 percent of the popular vote in the 1848 election.

#5. George H. W. Bush

Length of Retirement: 23.24 Years (as of publication)

Age at the End of Office: 68

Age at Death: N/A

Date of Death: N/A

Like his son, Bush Sr. largely returned to a private life after his presidency. In 2004, Bush worked with former President Bill Clinton to support communities affected by the Indian Ocean tsunami.

#4. John Adams

Length of Retirement: 25.33 Years

Age at the End of Office: 65

Age at Death: 90

Date of Death: July 4, 1826

Adams retired to his farm in Massachusetts, where he wrote prolifically on a number of topics. He died on July 4, 1826, a few hours after his political rival and friend Thomas Jefferson passed away.

#3. Gerald Ford

Length of Retirement: 29.93 Years

Age at the End of Office: 63

Age at Death: 93

Date of Death: Dec. 26, 2006

Despite losing re-election in 1976, Ford refused to leave the public spotlight. He authored several books and remained an important figure in the GOP.

#2. Herbert Hoover

Length of Retirement: 31.63 Years

Age at the End of Office: 58

Age at Death: 90

Date of Death: Oct. 20, 1964

Throughout his 31 years of “retirement,” Hoover was active in both domestic and foreign politics. During World War II, Hoover headed up an international relief organization and was openly against the use of the atomic bomb in Japan.

#1. Jimmy Carter

Length of Retirement: 35.24 Years (as of publication)

Age at the End of Office: 56

Age at Death: N/A

Date of Death: N/A

Carter has an extensive post-presidency career, founding the Carter Center in 1982. In 2002, Carter won the Nobel Peace Prize for his efforts to promote global peace and socioeconomic development.

Research Every President on InsideGov