Most of the time, presidents have limited impact on the economy and their performance is dictated by where in the business cycle they take office. However, pundits keep comparing them, so here is a list.
This list ranks the growth in annualized Real GDP between the year of taking office and the year of leaving office of all the presidents from 1901 to the present. (The exception is Obama where only the three years he has been in office are used.)
For cases where the president died in office, it lists the vice president that finished out that term. In each case, these vice presidents went on the win an election on their own. Four of the top five on this list are Democrats. Four of the bottom five are Republicans.