STV: Multiple-Seat Ranked-Choice Voting

STV (single transferrable vote), refers to a class of methods for filling multiple seats in one election. STV is sometimes called choice voting, ranked-choice voting, or preference voting. Voters rank their preferences, as with IRV (or AV), a form of STV for single-seat elections.

The primary advantage STV is that it empowers voting minorities of sufficient size to achieve representation. The required size depends on the number of seats to be filled and the threshold chosen.

One disadvantage of STV is that, unlike IRV, it's relatively difficult (though possible, depending on the specific method chosen) to count by hand; hence this program.

STV: the Program

NOTE: This program is no longer under development. If you're looking for open-source STV counting software, consider using droop. is a relatively simple Perl module for counting votes in elections using one of several STV method. This counting program can be employed in a more complete voting system as well, where votes could be captured directly from a graphical interface rather than being entered by hand. is a simple command-line interface to is an AppleScript for macOS. Drop a ballot file on to count it automatically and display the result in TextEdit; expects to be in the same folder as the two Perl files.

When used with a Droop threshold, implements a British Columbia-style STV count, except that ties are always broken by lot, and a fractional threshold (quota) is used. A description of the counting method (but with an integer threshold) can be found here (FairVote), and in Electoral System Design: The New International IDEA Handbook, published by the International Institute for Democracy and Electoral Assistance (p71 in the 2005 edition, available as a free PDF). also supports the Meek and Warren methods of STV counting.

A description of's input file format is avaiable here. See the comment header of for a version history.

Download Description MD5 Checksum v2.15 main counting module 32a66b0ef0f2bbb2f084960bcc69d4d0 command-line interface f3348e241a674523e8652ffedc67de0a drag & drop Mac interface dd680eb9c6789d57bce4dba6a40117b0

(The MD5 checksums can be used to verify that the files have not been tampered with.)

CAUTION: this software has been tested, but not formally verified. Please consider using one of the counters listed above instead. Use of the program is subject to the license contained in the program file.

The program is written to be (relatively) easy to read, and is well-commented for the benefit of non-Perl-readers.

Those new to STV might be interested in reading the program as a precise algorithmic definition of the counting process. Familiarity with Perl is helpful, but the program should be readable by most programmers.

More Information on STV

For more information on STV and other election-related issues, Wikipedia is a good starting point. For more technical information, with a focus on STV, visit Voting matters.

Two of my own papers, Random tie-breaking in STV and Notes on the Droop quota (with David Hill) are online at Voting matters.

Count an Election

To count an election, prepare an election file and upload it.

Specify an election file:


Comments and other feedback to Jonathan Lundell: