Associated Press

Political analysts are predicting that 2016 could be one of the tightest presidential races in U.S. history—assuming that Republicans choose the right candidate. It’s rare for one political party to win more than three terms in a row, but the GOP is more divided than ever. If 2016 is anything like the 2012 presidential election, it will certainly be a close fight.

With that in mind, InsideGov ranked the 17 closest presidential elections in U.S. history. Using data from the American Presidency Project, we factored in both the popular vote and the electoral vote when ranking the elections.

Some of these presidential candidates lost the popular vote, but edged by in the electoral college. One even lost both votes. Regardless of how they won, these are the presidents who barely squeaked by.

*Note: Elections up to 1824 are excluded due to a lack of popular vote data.

1892 Election

1892 Presidential Vote | FindTheBest

Winner: Grover Cleveland

Grover Cleveland ran for president three times. All three of his elections make this list. In the 1892 election, Cleveland returned to the presidency after a four-year absence, defeating the man who had previously ousted him from the White House.

1844 Election

1844 Presidential Vote | FindTheBest

Winner: James K. Polk

Polk was one of the first true dark horse candidates in U.S. history. He barely edged by in the popular vote where he had a slim 1.45% margin over rival Henry Clay. But his 32% lead in the electoral college carried him to the White House.

2012 Election

2012 Presidential Vote | FindTheBest

Winner: Barack Obama

Right up until the election, President Obama and Mitt Romney were neck-and-neck. President Obama won with a narrow 3.86% margin in the popular vote, but had a more solid lead with electoral votes. Republicans are more hopeful heading into 2016.

1948 Election

1948 Presidential Vote | FindTheBest

Winner: Harry Truman

Truman’s victory over Thomas Dewey is one of the greatest upsets in U.S. history. In fact, the Chicago Daily Tribune infamously ran the front-page headline: “Dewey Defeats Truman.” But the incumbent President Truman galvanized voters with a last-minute campaign blitz.

1896 Election

1896 Presidential Vote | FindTheBest

Winner: William McKinley

The 1896 election boiled down to economic issues. The Democratic candidate William Jennings Bryan campaigned as a populist and champion of the poor. Republican William McKinley formed a coalition with businessmen and wealthy farmers.

McKinley’s victory set the stage for nearly three decades of Republican domination, with the GOP controlling the White House for 28 of the next 36 years.

1968 Election

1968 Presidential Vote | FindTheBest

Winner: Richard Nixon

Incumbent Richard Nixon barely won the popular vote—he led rival Hubert Humphrey with a little over 500,000 votes (0.7% margin). The election is also notable for the strong performance of third-party candidate George Wallace, who campaigned on a platform of racial segregation and won several southern states.

1848 Election

1848 Presidential Vote | FindTheBest

Winner: Zachary Taylor

Zachary Taylor and opponent Lewis Cass both carried 15 states in the election. But Taylor’s states had more electoral votes, giving him the slight edge in this close race. Although he failed to win any electoral votes, former president Martin Van Buren won 10% of the popular vote as a third party candidate.

1880 Election

1880 Presidential Vote | FindTheBest

Winner: James Garfield

Garfield won the popular vote by less than 2,000 votes, the narrowest margin at the time. However, the former Civil War general secured the votes of the northern states, giving him a more solid electoral advantage.

1960 Election

1960 Presidential Vote | FindTheBest

Winner: John F. Kennedy

As the incumbent vice president, Richard Nixon was confident in his ability to triumph over the the young senator from Massachusetts. He was wrong. Kennedy used his personal charisma and campaigning skills to secure the election, although his .17% margin in the popular vote is one of the lowest in U.S. history.

1888 Election

1888 Presidential Vote | FindTheBest

Winner: Benjamin Harrison

Harrison is the first president on this list to actually lose the popular vote. The incumbent president at the time, Grover Cleveland, won nearly 100,000 more votes than his opponent but ultimately lost in the electoral college. Cleveland would get his revenge four years later.

1976 Election

1976 Presidential Vote | FindTheBest

Winner: Jimmy Carter

A former peanut farmer from Georgia, Jimmy Carter was a Washington outsider when he ran for president against Gerald Ford. That may have worked in his favor, as the American public was wary of corrupt politicians in the wake of Richard Nixon.

1884 Election

1884 Presidential Vote | FindTheBest

Winner: Grover Cleveland

Grover Cleveland never had an easy election. His first—and closest—run for president was almost a loss. Cleveland won New York state’s 36 electoral votes by just 1,047 votes. Those votes likely secured him the election.

2004 Election

2004 Presidential Vote | FindTheBest

Winner: George W. Bush

President Bush won the popular vote with a 2.46% margin, the lowest margin of victory ever for a re-elected incumbent president. Although he lost out on the presidency, John Kerry would still serve in the executive office as President Obama’s secretary of state.

1916 Election

1916 Presidential Vote | FindTheBest

Winner: Woodrow Wilson

World War I was in full swing when Woodrow Wilson ran for reelection in 1916. President Wilson narrowly edged by in the election with a 3.12% margin in the popular vote and a 4.34% margin in the electoral.

2000 Election

2000 Presidential Vote | FindTheBest

Winner: George W. Bush

The contentious 2000 election came down to one state: Florida. After polls closed on election day, the major television news networks announced that Al Gore had won Florida. However, as the results trickled in, Bush pulled ahead in the state and ended with a 900-vote lead.

When the Supreme Court overruled Gore’s demand for a Florida recount in Bush v. Gore (2000), the election officially ended, over a month later. Overall, Bush lost the popular election by more than 500,000 votes but won the electoral race by five votes.

1876 Election

1876 Presidential Vote | FindTheBest

Winner: Rutherford B. Hayes

Hayes lost the popular vote by a margin of 3%. He also appeared to have lost the electoral vote until an informal deal was struck between Republicans and Democrats.

Known as the “Compromise of 1877,” the deal secured Hayes the 20 electoral votes needed to win the election. In return, Republicans promised to withdraw federal troops from the South.

1824 Election

1824 Presidential Vote | FindTheBest

Winner John Quincy Adams

John Quincy Adams is the only president to have lost both the popular vote (by 10.4%) and the electoral vote (by 16.2%). So how did he end up in the White House instead of rival Andrew Jackson?

Since no candidate managed to win a majority of the electoral votes, the election was decided in the House of Representatives, where Speaker Henry Clay used his influence to secure Adams the win. Jackson didn’t take the news well, accusing Adams and Clay of striking a “corrupt bargain.” He would triumph over Adams in the next election.

Overall Comparison

Looking at election results over time, we see that the presidential elections of the last two decades having generally been some of the closest in U.S. history. In fact, the most recent period of elections is most similar to the 1870s-80s period, when candidates consistently failed to win a majority of the popular vote. Are our presidential candidates getting weaker? Or is the U.S. just more divided than ever?

Presidential Election Results Over Time | InsideGov

Research More U.S. Presidents on InsideGov