I have commented before that the correct way to measure the closeness of a US Presidential election is to look at how many vote changes would have been needed to alter the outcome. Now Mike Sheppard has done the analysis, and ranked the elections by how close they were. The elections in 2000, 1884, 1960, 1968, 1916, 1976, 1876, and 1948 could have been reversed by less than 0.3% of the voters changing their votes. They are listed in order of closeness, with the 2000 election being the closest ever.
Some people mistakenly think that Jimmy Carter won easily in 1976 because large votes in the South gave him a comfortable lead in the popular vote. But the electoral vote is what matters, and that was quite close.
Update: By the same analysis, Barack Obama won by 450,000 votes.