Every four years, tens of millions of Americans head to the polls to register their choice for president. Thanks to the nature of the electoral college, not all of those votes are created equal. It’s possible for a candidate to receive more popular votes than their opponent, but still lose the election (it’s happened five times).

So if you’re starting to question if your vote really counts, consider that sometimes a presidential election can be decided by just a few thousand votes—actual votes, not electoral ones—or even a few hundred.

Here are five American presidential elections with the narrowest margins of victory, ranked from largest to smallest.

1. 1824: A Four-Way Electoral Split

John Quincy Adams and Andrew Jackson.
Getty Images
John Quincy Adams and Andrew Jackson.

The historic 1824 presidential election saw four candidates—all from the same political party—running for the nation’s highest office. The Federalists imploded after the death of Alexander Hamilton, leaving the Democratic-Republicans with an easy path to the presidency. The challenge was choosing a candidate.

This was an era before national conventions or any organized way of nominating a presidential candidate. As a result, regional factions of Democratic-Republicans threw their support behind four different men, each with high hopes of becoming president: John Quincy Adams, Henry Clay, Andrew Jackson and William H. Crawford.

When the ballots from all 24 states were tallied, Andrew Jackson received the most electoral votes (99), followed by Adams (84), Crawford (41) and Clay (37). While Crawford and Clay finished a distant third and fourth, the fragmentation of the Democratic-Republicans prevented any single candidate from winning a majority of the electoral college.

“The 1824 election is close, in a sense, because it’s a very fractured result,” says Edward Foley, an election law expert at The Ohio State University.

The Constitution says that if no candidate receives a majority of electoral college votes (in 1824, the magic number was 131), then the vote goes to the House of Representatives. According to the 12th Amendment, only the top three electoral vote-getters move on to the House, so Clay was out of the race.

What followed were months of lobbying and horse trading as each state decided which candidate to support. A decisive moment came when Clay, who was serving as Speaker of the House, went against the wishes of his home state of Kentucky and backed Adams instead of Jackson. Adams ended up winning the House vote and therefore the presidency.

Jackson was furious when Adams turned around and chose Clay as his Secretary of State. Jackson called Clay a “Judas” and accused Adams and Clay of engaging in a “corrupt bargain” to steal the election from Jackson.

“I don’t think it’s correct to say that the election was stolen or corrupt in any conventional sense of the term,” says Foley, author of Ballot Battles: The History of Disputed Elections in the United States. “Given the lack of a majority, different factions are entitled to negotiate a coalition, like they do in parliamentary governments. The Clay faction united with the Adams faction against the Jackson faction.”

Jackson got the last laugh when he trounced Adams in a presidential rematch in 1828.

2. 1916 Election Came Down to California

Charles Evans Hughes, Governor of New York, in 1908.
Library of Congress
Charles Evans Hughes, Governor of New York, in 1908.

Today, California carries a whopping 54 electoral votes, more than any other state. But back in 1916, the state’s geographically scattered population hovered around 3 million people, giving California just 13 electoral votes.

As it turned out, California’s 13 electoral votes were enough to swing the 1916 presidential election, and the difference between the state’s electoral winner and loser was a mere 3,420 votes.

The presidential race in 1916 was between Woodrow Wilson, the Democratic incumbent, and Republican Charles Evans Hughes. Hughes is not a household name today, but he was a popular politician from New York and a Supreme Court justice. In fact, Hughes was the first Supreme Court justice to step down from the bench in order to run for president.

The Republicans picked Hughes in an attempt to heal their fractured party. In the previous election of 1912, former President Teddy Roosevelt split from the Republicans to run a third-party campaign as the progressive “Bull Moose” candidate. Roosevelt won the most electoral votes (88) of any third-party candidate in history, but essentially handed the victory to Wilson by splitting the Republican vote.

In 1916, Hughes’s job was to appeal to both the progressive and conservative factions of the Republican party, and he had his work cut out for him in California. That year, two California Republicans were vying for a seat in the Senate: progressive Hiram Johnson and conservative William Booth. The Hughes campaign needed to appeal to California Republicans backing both men in order to carry the state.

Just months before the election, Hughes made an unpardonable error. While on a campaign visit to Long Beach, California, Hughes stayed at the same hotel as Johnson, but didn’t invite the California politician for a drink or even a chat. Hughes swore that he had no idea Johnson was at the hotel, but Johnson insisted he was snubbed. Fuming at the insult, Johnson refused to campaign for Hughes in California.

Without Johnson’s support, the presidential race in California between Hughes and Wilson was incredibly tight. When the votes were finally tallied, Wilson received 465,936 votes and Hughes got 462,516, a difference of 3,420 votes or 0.34 percent of all votes cast in California.

California’s 13 electoral votes gave the 1916 election to Wilson, who won 277 to 254.

With such a small margin of victory in California, the Hughes campaign hired lawyers to dig up evidence to argue for a recount.

“But ultimately, Hughes and the Republicans said, ‘We can’t find anything,’” says Foley. “Three thousand votes in California made the difference.”

If Hughes had met Johnson for a drink, he might have been the U.S. president during World War I.

3. 1884: Decided by 1,047 Votes

James G. Blaine from Maine (left) and Grover Cleveland from New York
Library of Congress
James G. Blaine from Maine (left) and Grover Cleveland from New York faced off in 1884.

The 1884 election was somehow even closer than 1916. In this earlier election, the swing state in play was New York, the most populous state in the Union carrying 36 electoral votes.

Grover Cleveland, the Democratic candidate, should have had an easy path to office. Cleveland was governor of New York and rose to prominence for his anti-corruption crusades against Tammany Hall. The Democrats had a vice grip on the Southern states, so all Cleveland needed to do to win the election was to take his home state of New York. The Republican candidate, James G. Blaine from Maine, didn’t look like he had a chance.

Then came the scandal. Cleveland, whose supporters praised him for his moral rectitude, was accused of fathering a child out of wedlock and abandoning the mother. Republican-leaning newspapers ran a mocking cartoon of a young boy crying, “Ma, Ma, Where’s my Pa?”

Library of Congress
A September 1884 cartoon mocking Grover Cleveland who was accused of fathering a child out of wedlock and abandoning the mother.

Cleveland didn’t deny the accusation, and his campaign tried to refocus the race on political issues, not personal foibles. But Cleveland’s reputation and popularity took a hit.

As a result, the presidential race in New York went from a “sure thing” for Cleveland to an absolute barn burner. In the end, Cleveland received 563,048 votes in New York to Blaine’s 562,001. That’s a razor-thin margin of victory of 1,047 votes or 0.09 percent of all votes cast in the state.

With New York’s 36 electoral votes, Cleveland narrowly defeated Blaine 219 to 182.

Even though it’s one of the closest elections in U.S. history, the 1884 race doesn’t always make the list of hotly contested elections. Foley thinks that’s because Blaine and the Republicans accepted the results without fighting them in court.

“The 1884 election doesn't get a lot of attention, because it didn’t spin out of control and get ugly,” says Foley. “It’s an example of a success story, really. Both sides lawyered up and really inspected the ballots closely, but the Republicans accepted defeat when it showed that they lost.”

4. 1876: Republicans Win by One Electoral Vote

Samuel J. Tilden (left) and Rutherford B. Hayes (right).
Library of Congress
Samuel J. Tilden (left) and Rutherford B. Hayes (right).

By Foley’s measure, the presidential election of 1876 was anything but a “success story.” Not only was it one of the closest presidential contests in American history, but it was also riddled with anti-democratic shenanigans including voter intimidation and ballot tampering.

The candidates in 1876 were Republican Rutherford B. Hayes and Democrat Samuel Tilden. But more important than the candidates themselves were the issues at stake. This election took place a decade after the Civil War. One of the goals of Reconstruction in the South was to safeguard voting rights for Black Americans as enshrined in the 15th Amendment, but those efforts met violent resistance from groups like the Redemption movement.

“That movement engaged in what can only be called terrorism tactics against Black voting,” says Foley.

Reconstruction was effectively dead by the 1876 election, and suppression of the Black vote was rampant, resulting in Democratic victories across the South. Hayes and the Republicans cried foul and demanded recounts in South Carolina, Louisiana and Florida. But instead of fighting fair, the Republicans resorted to their own dirty tricks.

“Florida was the most egregious,” says Foley. “Republicans there used their lingering power over the recount process to manipulate the counting of the ballots,” says Foley. “Had there been an honest recount in Florida, it would have favored the Democrats, but Hayes was declared the winner."

Things got even messier from there. The Democratic attorney general of Florida came up with his own recount declaring Tilden the state’s winner. Since the Constitution doesn’t say what to do when electoral votes are contested, Congress had to come up with a solution. In this case it was a bipartisan group of 14 congressmen and one Supreme Court justice known as the Electoral Commission. 

Ultimately, this 15-person commission decided the 1876 election, giving the presidency to Hayes and the Republicans by one vote.

Note only did the commission’s decision come down to one vote, but so did the tally in the electoral college. By winning all three of the contested states, Hayes defeated Tilden by 185 electoral votes to 184, the smallest electoral margin of victory in American history. 

5. 2000: Supreme Court Weighs In

“The 2000 election is the classic when it comes to close presidential elections,” says Foley.

That contest, which dragged on for 36 days of intense legal wrangling, excruciating ballot recounts and a historic Supreme Court decision, was ultimately decided by just 537 votes.

The candidates in 2000 were Democrat Al Gore, the vice president, and Republican George W. Bush, governor of Texas and son of former president George H.W. Bush. The race was neck and neck, and once again Florida was the swing state. Whoever captured Florida’s 25 electoral votes would win the presidency.

Exit polls on election night showed Bush with a commanding lead in Florida. After midnight, Bush’s victory seemed so assured that Gore called the Texas governor to congratulate him. But just 45 minutes later, as Gore prepared to give his concession speech, aides told him that Bush’s lead in Florida was shrinking fast. In an unprecedented move, Gore called Bush a second time to rescind his concession.

“There’s a term that recount lawyers use—are the election results within the ‘margin of litigation?’” says Foley. “Gore’s lawyers determined that Bush’s lead in Florida was definitely within the margin of litigation. It was worth fighting over.”

First the courts ordered an electronic recount, but Gore’s team asked for a hand recount of paper ballots in certain voting precincts. The slow, painstaking process introduced Americans to the term “hanging chad,” referring to a punch-style ballot where the hole isn’t fully perforated.

In the 2000 Election, Vote Counting Disputes Led to 36 Days of Uncertainty
Robert King/Newsmakers/Getty Images
Contested ballots from Florida are studied following the 2000 election.

The legal fight went all the way to the Supreme Court, which handed down two rulings: 1.) the Florida recount, as it was being handled, was unconstitutional, and 2.) it was too late for Gore’s team to issue further challenges. In a 5-4 decision, the justices gave the victory to Bush.

“Four of the justices wanted to remand the case back to Florida to clean up the recount procedure,” says Foley, “But the other five justices said the clock’s run out—it’s over.”

At last count, Bush received 2,912,790 votes in Florida and Gore got 2,912,253 votes. Out of the nearly 6 million votes cast in Florida, Bush won by a margin of 537 votes, or 0.009 percent of the total votes cast in Florida.

“It’s the narrowest margin of victory in terms of percentage,” says Foley. “I can't think of any other presidential election that ends like that.”

HISTORY Vault: U.S. Presidents

Stream U.S. Presidents documentaries and your favorite HISTORY series, commercial-free