Electoral College Margin Calculator
The United States elects its President through the Electoral College, with 538 total electoral votes and a 270-vote majority required to win. This calculator takes the electoral votes won by each of the two leading candidates, plus the total votes available, and reports the margin of victory, how far above the 270 majority the winner finished, and the smallest number of electoral votes that would need to flip to change the result. Adjust the total to model historical maps or hypothetical reapportionments; the majority threshold updates automatically to one more than half the total.
Electoral College formula
Majority threshold = floor(total / 2) + 1
Margin = winner votes - loser votes
Cushion = winner votes - majority threshold
Votes to flip = cushion + 1 (smallest swing to drop winner below majority)
With the standard 538 total, the majority threshold is 270. Votes to flip measures how many of the winner's electoral votes would have to move to the runner-up to deny the winner a majority.
US Electoral College context
- The 538 total equals 435 House seats plus 100 Senate seats plus 3 electors for the District of Columbia.
- A candidate must win an absolute majority of 270 electoral votes, not merely a plurality.
- If no candidate reaches 270, the House chooses the President in a contingent election.
- Most states award all their electoral votes to the statewide winner; Maine and Nebraska split by district.
- Electoral vote allocations shift after each decennial census reapportions House seats.
Electoral College: frequently asked questions
How many electoral votes are needed to win?
There are 538 electoral votes total, allocated to the 50 states and the District of Columbia. A candidate needs an absolute majority, 270 electoral votes, to win the presidency. If no candidate reaches 270, the election goes to the House of Representatives.
Why 538 electoral votes?
The total equals 435 members of the House of Representatives plus 100 senators plus 3 electors for the District of Columbia under the 23rd Amendment, which gives 435 + 100 + 3 = 538. The majority threshold of 270 is one more than half of 538.
How is the margin of victory measured?
The margin is the difference between the winning candidate's electoral votes and the runner-up's. This calculator also shows how many votes the winner held above the 270 majority and how many would need to flip to change the outcome.
What does votes to flip mean?
It is the smallest number of electoral votes that, if moved from the winner to the loser, would drop the winner below 270 or hand the other candidate a majority. It measures how close the result was in electoral terms.
Does the popular vote decide the presidency?
No. The President is chosen by electoral votes, not the national popular vote. A candidate can win the Electoral College while losing the popular vote, which has happened in U.S. history.
Official sources
- U.S. National Archives: Electoral College.
- U.S. National Archives: National Archives home.
Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.