How it works
What this site does with your ballots, step by step. For why it does it this way, see Why Ranked Pairs.
1. The ballots
On a preferential ballot, each voter ranks the choices: 1 for their first choice, 2 for their second, and so on. Only the order matters. Equal numbers are ties, and choices left blank are tied for that voter's last place. A * means the voter may not rank that choice (for example, a conflict of interest), so that ballot counts for neither side in any matchup involving it. Column A of the spreadsheet says how many votes each ballot is worth (1 if blank).
2. Head-to-head matchups
With every voter's ranking in hand, we can ask of any two choices: if only these two were running, who would win? Suppose
- 52 voters rank the choices A, B, X
- 43 voters rank the choices B, A, X
- 5 voters rank the choices X, B, A
Then A beats B, 52 to 48. A beats X, 95 to 5. And B beats X, 95 to 5.
3. The margin of victory matrix
All of the matchups fit in one table. The square in row A, column B is how many more voters preferred A to B than B to A. It is negative when A lost.
| 1 | 2 | 3 | |
|---|---|---|---|
| 1 A | +4 | +90 | |
| 2 B | −4 | +90 | |
| 3 X | −90 | −90 |
A's row has no red: A beat every other choice head to head.
4. Condorcet winners
A choice that beats every other choice head to head is called a Condorcet winner, after the Marquis de Condorcet (1743–1794). There can be at most one. A single-vote ballot cannot tell whether there is one; a preferential ballot always can. Most real elections counted here have one.
5. Cycles
A cycle is a chain of head-to-head results that comes back to where it started: A beats B, B beats C, and so on, until the last choice in the chain beats A. When the choices at the top are caught in a cycle, there is no Condorcet winner, since every one of them loses to another. For example, suppose
- 8 voters rank the choices A, B, C
- 7 voters rank the choices B, C, A
- 6 voters rank the choices C, A, B
Then A beats B, 14 to 7. B beats C, 15 to 6. And C beats A, 13 to 8. Each choice loses to another. This is known as Condorcet's paradox.
6. Ranked Pairs
Ranked Pairs, defined in 1987 by the economist Nicolaus Tideman, ranks all of the choices by giving priority to the greatest majorities:
- List every head-to-head result, largest margin first.
- Go down the list, and keep each result unless it makes a cycle with the results already kept.
- The results that were kept put the choices in order. That order is the result of the election.
In the cycle above:
| Margin | Result | |
|---|---|---|
| 9 | B beats C | kept |
| 7 | A beats B | kept |
| 5 | C beats A | set aside: A beats B and B beats C already put A above C |
The result is A, then B, then C. When there is a Condorcet winner, none of its victories is ever set aside, so it always comes first.
7. Ties
With few voters, exactly equal margins are common, and Ranked Pairs needs to know which comes first. WeVoteHere breaks every tie with one fully ranked tie-breaking vote, assembled from the ballots in this order:
- Ballots marked TB in the spreadsheet, in order. An organization can fix its tie-breaking rule in advance, for example "the chair's ballot".
- The voters' ballots, in a random order where each ballot's chance of coming first is proportional to its number of votes.
- Ballots worth zero votes, then, if anything is still undecided, a computer-generated random ballot.
Each ballot only settles what the ones before it left open. The tie-breaking vote only orders results that are exactly equal; it never overturns a real margin.
The randomness comes from the spreadsheet's file name, so the same file with the same name always gives the same result, and anyone can repeat the count. The results spreadsheet also runs the count 100 more times with other random draws and shows how often each choice got each place, so it is clear whether chance mattered.
A suggested rule for when chance matters. If the tie-breaking vote is not fully specified and the randomness made a difference in the outcome, change the file name one last time: every interested party may add 3 random digits to the end of the file name, and then the spreadsheet is counted exactly one final time. This way no one knows the outcome in advance, and no one can try file names until they get the result they want. Since the order of the ballots also affects the random draws, the ballots must not be changed or reordered once the digits are chosen.
8. Other vote counting methods
For comparison, the site also shows what other methods would pick from the same ballots. Version numbers are from Professor Bray's book Democracy versus Game Theory (in preparation): 1.x methods need only a single-vote ballot, 3.x and up use the whole preferential ballot, and higher numbers have more of the properties discussed on Why Ranked Pairs.
- 1.1 Plurality Voting
- The choice ranked first by the most voters wins.
- 1.2–1.5 Top Two, Final Four, Elite Eight and Sweet Sixteen Instant Runoff
- A choice ranked first by more than half of the voters wins. Otherwise the top 2, 4, 8 or 16 choices by first choices play a seeded single elimination tournament (1st against last, and so on), each match decided head to head.
- 1.6 Tournament Instant Runoff
- The same, with every choice in the tournament.
- 3.1 Instant Runoff Voting
- The choice with the fewest first choices is eliminated, and its ballots go to their next remaining choice, until one choice is left.
- 3.2 Borda Count
- Each choice's total margin of victory: the sum of its row of the margin of victory matrix. The largest wins. (When every ballot ranks every choice, this picks the same winner as giving points for 1st, 2nd, 3rd place and so on.)
- 4.1 Instant Runoff Borda
- The choice with the smallest Borda count is eliminated, and the counts are recomputed, until one choice is left.
- 5.1 Worst Defeat
- Each choice's worst head-to-head result (0 if it lost to no one). The choice whose worst defeat is smallest wins.
- 6.1 Schulze Method
- A chain of victories is as strong as its weakest link. The winner has a stronger chain to every other choice than that choice has back to it.
- 7.1 Ranked Pairs
- The method this site uses, explained in section 6 above.
A ballot that ranks several choices equal splits its first-choice vote between them. Ties are settled with the same tie-breaking vote as Ranked Pairs (section 7), used the same way wherever a method works from the margins: each margin gets the same tiny tie-breaking margin that Ranked Pairs adds. Where a method counts first choices instead (Plurality, Instant Runoff Voting, and the seeding of the tournaments), the tie-breaking vote is counted as one more ballot with a tiny weight, shared out as ½, ¼, ⅛, … of that weight to its 1st, 2nd, 3rd, … choice among the choices still in the running. These shares add up to less than the whole weight (½ + ¼ + ⅛ + … < 1), and the weight is smaller than any real difference between two choices’ counts, so the tie-breaking vote decides only exact ties: the tied choice higher in it wins, and in an elimination the lower one is eliminated. Approval Voting (2.1) is not shown, because ranked ballots do not say where each voter would draw the line between approving and not approving.
9. The results spreadsheet
The complete results list the winner and the full ranking, the margin of victory matrix, the tie-breaking vote, every head-to-head result in order with the ones set aside marked, and every ballot, with running subtotals of the margin of victory matrix beside the ballots so that each margin can be checked by hand.