Franklin Delano Roosevelt. When he was elected he was a disabled person. He needed a wheelchair after contracting polio. He not only didn't give up. He ran for president in 1932! While in office he drastically decreased unemployment from 25 percent to 2 percent. He carefully prepared America to enter the battle during World War II by increasing the defense budget and converting the U.S. to a military economy. That's why we won this war.
I don't think people understand the meaning of the word "great" anymore, as it has apparently been sullied and slandered by every half baked TV commercial in the last 60 years...
Hint: it doesn't mean "looks good on TV".
I narrowed it down to T. Roosevelt and JFK. They were both strong leaders who helped put America ahead of the rest of the world with the minimal amount of partisan politics involved. JFK took my vote for his investments in to US infrastructure such as the space program and energy programs(with some help from Ike) which had some of the greatest long term benefits for the US(something modern politicians fail at). TR put a halt to the rampant capitalism that was hurting America's poor while being able to avoid extreme communist/socialist measures, and thus allowed free enterprise to drive our country without exploiting it.
I'm a history professor and wrote my third book, Presidents' Body Counts': The Twelve Worst and Four Best American Presidents Based on How Many Lived or Died Because of Their Actions.
Too often, rankings of presidents become popularity contests based on ideology, or who fits closest to their own belief system. Thus we have absurd rankings like a poll by the Wall Street Journal who ranked GW Bush the 6th best president of all time.
I rank presidents based on humanitarian standards. Who caused the most deaths? If the deaths were by mass murder, that obviously counts far more than incompetence. Thus the worst president in US history was Nixon, who ordered the carpet bombing of neutral Cambodia, outright genocide that killed 600,000. Reagan was the second worst, killing 325,000 in Central America by terrorism in Nicaragua and El Salvador and support for outright genocide in Guatemala.
The best president in US history was Lincoln. Defeating the Confederacy ended slavery, and slaves had an infant mortality twice that of free people. The Confederacy also planned wars vs Cuba, Dominican Republic, and Mexico. Lincoln saved hundreds of thousands.
But since the question is about the 20th century, the best US president was Jimmy Carter. The Camp David Peace Accords prevented perhaps as many as 100,000 future deaths in wars. Carter's human rights policy saved at least 50,000 dissidents and aided democracy in at least 25 nations, and ended the Cold War sooner. (Reagan prolonged the Cold War by his rigid anti Communism.)
Raphael's answer of FDR is partly true. He accomplished much good. But FDR also ignored the Holocaust, targeted German and Japanese civilians, and imprisoned Japanese-Americans for racist reasons.
John's answer has some problems. TR was a warmonger, invading nations in Latin America. He broke Panama away from Colombia. The building of the canal killed thousands of Panamanian Black workers, who were denied the disease free quarters of US white workers by US segregation. TR's progressivism, like other progressives of the time, was based on racism and class warfare beliefs that both nonwhites and poor people whether white or not were incapable of running their own lives or knowing what was best for themselves. Thus he hated socialists and populists, though both parties did much good for the US, giving us direct election of senators, referendums, the Pledge of Allegiance, and social security (much later.)
I have to go with LBJ. His presidency was fatally marred by the Vietnam war, but, if you can set aside a no win situation for everyone involved and poor decision making all around for that, Johnson did one thing that very few presidents have done. He made a hot button topic (Civil Rights) his platform and did everything he needed to make what he could happen - despite the political fallout for himself personally and for his party. He did what was right because it was the right thing to do.
Carter tried, but didn't have the political clout to pull it off. Lincoln did it, but wrong century for the question.
I don't believe that you can judge a president's accomplishments solely by how many people died or didn't die during his presidency. By that criteria, Lincoln would be the lowest on any presidential poll by the fact that more people died during his presidency than any other and to top that off, they were almost exclusively American lives!
Taking that further and blaming WWII presidents for the atrocities committed by Hitler is unfair to any one person's legacy. No one person, not even a president, could have stopped Hitler from doing what he did.
Best to worst:
4 George W. Bush
10 George H. W. Bush
15 Theodore Roosevelt
17-18 (tie) Obama
17-18 (tie) Lyndon Johnson
19 Franklin Roosevelt