President Barack Obama talked on the phone in the Oval Office with Russian President Vladimir Putin about the situation in Ukraine, March 1, 2014. Reuters

There were highs and there were lows, but despite what all presidents of the U.S. faced during their tenure in office a select few finished their terms with a highly favorable legacy. Debate has shrouded the question of who was the greatest president of all time, but a Public Religion Research Institute survey revealed Barack Obama was the favored Democratic president in his party while Ronald Reagan won the Republican title in a landslide.

The 2016 survey for “America’s Best President” — conducted among a random sample of 2,010 adults from Sept. 1 to Sept. 27, 2016 — asked Democrats and Democratic-leaners who their favorite Democratic president was and then, on the opposite side of the spectrum, also asked Republicans and Republican-leaners who was their favorite Republican president. The results showed that while Obama won a plurality vote of 35 percentage, he was not a majority favorite. Reagan, however, was a majority favorite in his party at 69 percent.

The other presidents who made the cut in the survey for Democrats included John F. Kennedy, Bill Clinton, Franklin D. Roosevelt, Jimmy Carter, Lyndon Johnson and Harry Truman. The Republican slate comprised of George W. Bush, Dwight Eisenhower, George H.W. Bush, Richard Nixon and Gerald Ford.

Reagan’s popularity did not win a majority for young Republican adults, although he still had a lead of 45 percent favorability. Obama – while still not winning a majority with young voters – had a higher number of 44 percent in comparison to his overall percentage. In terms of demographics, Obama was popular with minority ethnicities like African-American and Hispanic Democrats, while Reagan won tremendously among each main demographic group.

When it came to the best president in American history as of 2017, a recently released C-SPAN ranking picked former President Abraham Lincoln as the top choice among historians. Lincoln is most known for his efforts to defeat the Confederacy during the Civil War and abolishing slavery. Presidents that followed on the ranking included George Washington, Franklin Roosevelt and Teddy Roosevelt.