The 1876 election was one of the closest and most contentious in United States history. Rutherford B. Hayes defeated Samuel Tilden by just one electoral vote. However, Tilden would have won the election outright were it not for an error in arithmetic committed a few years earlier.

Background

This was the first time since the US Civil War that the Democrats had a legitimate shot at winning the general election. Tilden ran on an anti-corruption platform, attacking the crookedness of incumbent Ulysses Grant's presidency. In the general election, Tilden had definitely won at least 184 electoral votes and Hayes had definitely won at least 165. However, 20 votes were still in dispute between Florida, Louisiana, and South Carolina.

Initial results showed that Tilden had won these three states. The Republicans alleged that these results were suspect due to the Democrats' practice at the time of turning away Republicans at the polls and other ballot controversies. The Republican-controlled electoral commissions of these states recounted the ballots and overturned the Democratic victory in all three states. This awarded Hayes the election. This of course led to outrage among Democrats. The two parties were at an impasse.

What resulted was the the Compromise of 1877: Tilden would concede the election to Hayes. In exchange, the government agreed to remove federal troops from Southern states. The aftermath was a cynical and contentious era of American politics.

However, things would have turned out differently if it weren't for a simple arithmetic error from a few years before. As a result of this error, one of the states that voted for Tilden had fewer electoral votes than it should have had, and one of the states that voted for Hayes had one vote too many. Tilden should have won at least 185 total votes, awarding him the election. To understand how this could have happened, we must first understand the concept of apportionment.

What is Apportionment?

As of 2014, there are 435 congressmen in the US House of Representatives. Each state receives a proportional number of congressmen based on population. Congressional apportionment is the process by which exact representative counts are assigned to states. The government conducts a census every 10 years. After each census, congressional seats are redistributed (or "reapportioned") based on state populations.

Apportionment is messy. Each state must be assigned a whole (integer) number of representatives. This causes some rounding, which leads to some states being over or underrepresented in the House. As a result, there are political implications that stem from how apportionment is calculated. The United States has used several apportionment methods throughout its history. It was an error in these apportionment calculations that changed the result of the 1876 selection.

How does Apportionment Work?

If you're not interested in the mathematics of apportionment, you can skip this section by clicking here. Otherwise, read on.

To explore apportionment, let's consider a fictional country consisting of four states. This country has a House of Representatives with a fixed 80 members. They are considering a few methods of apportioning those 80 members among the four states. The populations of the states are as follows:

State Population North 2,537 South 1,240 East 143 West 80 Total Population 4,000

They first decide to try the Jefferson Method of apportionment. The United States used Jefferson's method until after the 1830 census. The step-by-step below shows how it works:

Step 1/3: Calculate the "Divisor" for the entire population. This is the average number of people for each representative. Click "Next" to continue → Next Total Population = 4000 Number of Representatives = 80 Divisor = (Total Population) / (Number of Representatives) = 4000 / 80 = 50 citizens per rep Step 2/3: Calculate the "Quotient" for each state. This is the exact number of seats each state would get if fractional seats were allowed. Previous Next Total Population = 4000 Number of Representatives = 80 Divisor = 50 Quotient k = (Population of state k) / Divisor State Population Quotient North 2,537 50.74 South 1,240 24.8 East 143 2.86 West 80 1.6 Sum 4,000 80 Step 3/3: Take the floor of the quotient for each state, and assign each state that number of seats in the House of Representatives. If the total number of seats doesn't add up to 80, then reduce the divisor and re-calculate the quotient until it does. Previous Total Population = 4000 Number of Representatives = 80 Divisor = 50 Quotient k = (Population of state k) / Divisor State Population Quotient Number of Seats North 2,537 50.74 South 1,240 24.80 East 143 2.86 West 80 1.60 Sum 4,000 80

The smaller states are unhappy with being underrepresented. The country then decides to try out the Hamilton method of apportionment. In the United States, apportionment was usually done using the Hamilton method from 1840 - 1880. The step-by-step below shows how it works:

Step 1/4: Calculate the "Divisor" for the entire population. This is the average number of people for each representative. Click "Next" to continue → Next Total Population = 4000 Number of Representatives = 80 Divisor = (Total Population) / (Number of Representatives) = 4000 / 80 = 50 citizens per rep Step 2/4: Calculate the "Quotient" for each state. This is the exact number of seats each state would get if fractional seats were allowed. Previous Next Total Population = 4000 Number of Representatives = 80 Divisor = 50 Quotient k = (Population of state k) / Divisor State Population Quotient North 2,537 50.74 South 1,240 24.8 East 143 2.86 West 80 1.6 Sum 4,000 80 Step 3/4: Take the floor of the quotient for each state, and assign each state that number of seats in the House of Representatives. Also, calculate the "remainder" — the quotient minus the number of seats assigned. Previous Next Total Population = 4000 Number of Representatives = 80 Divisor = 50 Quotient k = (Population of state k) / Divisor State Population Quotient Remainder Number of Seats North 2,537 50.74 0.74 50 South 1,240 24.80 0.80 24 East 143 2.86 0.86 2 West 80 1.60 0.60 1 Sum 4,000 80 -- 77 (3 unassigned) Step 4/4: Assign the remaining unassigned seats to the states in descending order of the remainder. In this example, this means that East gets a seat, then South, etc until all seats are assigned. Previous Total Population = 4000 Number of Representatives = 80 Divisor = 50 Quotient k = (Population of state k) / Divisor State Population Quotient Remainder Number of Seats North 2,537 50.74 0.74 50 South 1,240 24.80 0.80 24 East 143 2.86 0.86 2 West 80 1.60 0.60 1 Sum 4,000 80 -- 77 (3 unassigned)

This seems fairer, but the scholars of this country look at the history of the United States and realize that the Hamilton method isn't without its problems. It's susceptible to a few "paradoxes:"

The New States Paradox : Adding a new state with its fair share of seats can cause seat counts for other states to change.

: Adding a new state with its fair share of seats can cause seat counts for other states to change. The Alabama Paradox : It is possible for a state to lose seats when the total number of seats increases.

: It is possible for a state to lose seats when the total number of seats increases. The Population Paradox: It is possible for a state to lose seats when its own population increases.

Many favor the Webster method instead (especially the smaller states, who are even more favorably represented by the Webster method). The Webster method works as follows:

Step 1/3: Calculate the "Divisor" for the entire population. This is the average number of people for each representative. Click "Next" to continue → Next Total Population = 4000 Number of Representatives = 80 Divisor = (Total Population) / (Number of Representatives) = 4000 / 80 = 50 citizens per rep Step 2/3: Calculate the "Quotient" for each state. This is the exact number of seats each state would get if fractional seats were allowed. Previous Next Total Population = 4000 Number of Representatives = 80 Divisor = 50 Quotient k = (Population of state k) / Divisor State Population Quotient North 2,537 50.74 South 1,240 24.8 East 143 2.86 West 80 1.6 Sum 4,000 80 Step 3/3: Round the quotient for each state to the nearest whole number, and assign each state that number of seats in the House of Representatives. If the total number of seats doesn't add up to 80, then adjust the divisor and re-calculate the quotient until it does. Previous Total Population = 4000 Number of Representatives = 80 Divisor = 50 Quotient k = (Population of state k) / Divisor State Population Quotient Number of Seats North 2,537 50.74 South 1,240 24.80 East 143 2.86 West 80 1.60 Sum 4,000 80

Now that we've seen how these apportionment methods work, let's shift our focus back to the United States in the 1870s.

An Apportionment Error

Between 1840 and 1880, the only methods of apportionment used were the Hamilton and Webster methods. Smaller states favored the Webster method, while larger states pushed for the Hamilton method. The United States didn't use any other apportionment methods — with one exception.

After the 1870 census, the U.S. increased the size of the House of Representatives to 283. They chose this particular number because Hamilton and Webster's apportionment methods both yielded identical seat allocations. In 1872, they passed another resolution that increased the size of the House by 9 more seats. This resolution awarded one seat each to New Hampshire, Vermont, New York, Pennsylvania, Indiana, Tennessee, Louisiana, Alabama, and Florida.

However, this is where someone messed up: the House of Representatives didn't use Hamilton or the Webster method (or the Jefferson method, for that matter) to allocate these 9 new seats. These were the only apportionment methods that the House of Representatives used at the time, and the only methods they'd continue to use for the next 10 years. If they had used either the Hamilton or the Webster method, they would have allocated 2 of the new seats to New York and none to Vermont, rather than 1 to each. Both methods would also have awarded a seat to Illinois and none to Florida.

It's unclear whether what happened was due to a mathematical error, or due to politics. I couldn't find any literature that explains why this happened. Either way, this mistake would have a significant impact on the 1876 election.

In 1876, Tilden had 184 electoral votes to Hayes' 165, with the remaining 20 votes in dispute. A compromise was struck that made Hayes the victor in exchange for withdrawing Union troops from southern states. However if each state had been allotted the correct number of votes (based on Webster's or Hamilton's method), Tilden would have had 185 votes and Hayes 184 even after being awarded those 20 disputed votes. New York had voted for Tilden while New Hampshire, Illinois, and Florida had all voted for Hayes; correct apportionment would have tipped the scales in Tilden's favor. There would have been no need for a compromise.

Notes

I don't know how things would be different if Tilden had won. I imagine the effects of the compromise (withdrawal of Union troops from the south) would have happened regardless with a Democratic victory.

This article came about when I was messing with apportionment calculation code I wrote to generate this visualization of future electoral maps.

I did some searching and found that this historical anomaly had in fact been already discovered, but I couldn't find any sources that discuss why it happened. If anyone has any insight about why this happened, or any thoughts on what would have changed if Tilden had won, I'd love to hear about it! Hit me up on Twitter at @ravisparikh.

You can view the code I used to calculate seat assignments on Github.