At Lawyers, Guns, & Money there is an interesting discussion of who the worst American president is. As you might expect, the usual suspects are named the worst.
What about my view? As a Canadian I am tempted to choose Madison. Frankly, invading your country* is an excellent way to get anyone to hate you. But nevertheless, other considerations must come into play, and these compel me to conclude that Madison is certainly not the worst.
I know this might be an unpopular position, but I retain my view that George W. Bush is not the worst president. As a matter of fact, it might be argued that it is too early to rate him. Consider Truman. When he left office, he was absolutely hated. Since then, he has become more and more highly ranked amongst historians. The distance of time allows people to move beyond partisanship and get a more objective look, while the president’s legacy gets time to develop and become fully apparent. For these reasons, one could make the case that it is too early to rate Bush (and Clinton and Obama, at least).
I think James Buchanan was the worst US president. Bush, whose achievements include an expansion of the surveillance state, statist reactionaries on SCOTUS, blowing the budget on deficits, the rise of torture, creeping theocracy, the Iraq War, and having a really smooth outgoing presidential transition, at least kept the goddamn country together. Buchanan, on the other hand, came in as President of the United States of America, and left as President of the Untied States of America. You can’t do worse than that.
*Strictly speaking, Canada did not exist during the War of 1812. Rather, various colonies of British North America existed instead. However, as those colonies later became Canada after Confederation, I don’t think it is horribly inaccurate to describe the War of 1812 as being (in part) a war between the United States and Canada.