The electoral vote was one of the closest in U.S. history – with 266 votes needed to win, Wilson took thirty states for 277 electoral votes, while Hughes won eighteen states and 254 electoral votes. Wilson was the second president in US history to win re-election with a reduced percentage of the electoral vote, following James Madison in 1812. As the raw number of electors had actually increased during Madison's first term, Wilson was also the first president to receive fewer total electoral votes. This result was repeated by Franklin D. Roosevelt in 1940 and 1944 and by Barack Obama in 2012.