D'Hondt method
The d'Hondt method or the Jefferson method (both are equivalent, but described differently) is a highest averages method for allocating seats. This system favors large parties slightly more than the other popular divisor method, SainteLaguë, does. The method described is named in the United States after Thomas Jefferson, who introduced the method for proportional allocation of seats in the United States House of Representatives in 1792, and in Europe after Belgian mathematician Victor d'Hondt, who described the methodology in 1878.
It is used in Argentina, Austria, Bulgaria, Chile, Denmark (for local elections), Finland, Israel, the Netherlands, Poland, Portugal and Spain, as well as elections to the European Parliament in some countries. Jefferson's method was used to apportion the U.S. House of Representatives between 1792 and 1840.
Allocation
After all the votes have been tallied, successive quotients are calculated for each list. The formula for the quotient (which is related to a HagenbachBischoff quota) is
 Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \text{quot} = \frac{V}{s+1}}
where:
 V is the total number of votes that party received, and
 s is the number of seats that party has been allocated so far, initially 0 for all parties.
Whichever list has the highest quotient gets the next seat allocated, and their quotient is recalculated given their new seat total. The process is repeated until all seats have been allocated.
The order in which seats allocated to a list are then allocated to individuals on the list is irrelevant to the allocation procedure. It may be internal to the party (a closed list system) or the voters may have influence over it through various methods (an open list system).
The rationale behind this procedure (and the SainteLaguë procedure) is to allocate seats in proportion to the number of votes a list received, by maintaining the ratio of votes received to seats allocated as close as possible. This makes it possible for parties having relatively few votes to be represented.
One way to think of the formula is that it first shows who can win the most votes for the first seat, and then if the party that won the first seat can plug more votes per seat for two seats than any other party can for even one seat, it gives that same party two seats; otherwise it gives another party one seat. This logic repeats until all seats have been allocated.
Example
As a simple example, if there are 2 seats to be filled, with Party A having 300 votes and Party B having 290 votes, then Party A wins the first seat, with their new vote total becoming 150 votes (calculated as 300/((1)+1) = 300/2). This means Party A now has 150 votes and Party B has 290 votes, so Party B wins the second seat, and the procedure is over.
A larger example (red indicates that party won a seat in that round because it had the most votes of any party in that round; this table can be thought of as going in "rounds", with the first round showing how many votes each party had, and each successive round showing how many votes each party had after applying the d'Hondt procedure):
Party A 
Party B 
Party C 
Party D 
Party E 

Votes 
340,000 
280,000 
160,000 
60,000 
15,000 
Seat 1 
340,000 
280,000 
160,000 
60,000 
15,000 
Seat 2 
170,000 (1) 
280,000 
160,000 
60,000 
15,000 
Seat 3 
170,000 (1) 
140,000 (1) 
160,000 
60,000 
15,000 
Seat 4 
113,333 (2) 
140,000 (1) 
160,000 
60,000 
15,000 
Seat 5 
113,333 (2) 
140,000 (1) 
80,000 (1) 
60,000 
15,000 
Seat 6 
113,333 (2) 
93,333 (2) 
80,000 (1) 
60,000 
15,000 
Seat 7 
85,000 (3) 
93,333 (2) 
80,000 (1) 
60,000 
15,000 
Total Seats 
3 
3 
1 
0 
0 
Variations
The HagenbachBischoff system is equivalent to, and is a faster way of doing d'Hondt: It works by first assigning each party as many seats as they have HagenbachBischoff quotas, and then running d'Hondt with the recognition of the seats already won by each party.
In some cases, a threshold or barrage is set, and any list which does not receive that threshold will not have any seats allocated to it, even if it received enough votes to otherwise have been rewarded with a seat. Examples of countries using this threshold are Israel (1.5%) and Belgium (5%, on regional basis).
Some systems allow parties to associate their lists together into a single cartel in order to overcome the threshold, while some systems set a separate threshold for cartels. Smaller parties often form preelection coalitions to make sure they get past the election threshold.
Jefferson's method
Jefferson's method is equivalent to d'Hondt, but is described differently:
Choose a divisor D. A state with population N (or a political party with N seats) is entitled to floor(N/D) seats. If the number of seats allocated equals the size of the legislative body, then use the apportionment just calculated. Otherwise, choose a new value for D and try again.
Example: In 1790, the U.S. had 15 states. For the purpose of allocating seats in the House of Representatives, the state populations were as follows:
State  Population 

Virginia  630 560 
Massachusetts  475 327 
Pennsylvania  432 879 
North Carolina  353 523 
New York  331 589 
Maryland  278 514 
Connecticut  236 841 
South Carolina  206 236 
New Jersey  179 570 
New Hampshire  141 822 
Vermont  85 533 
Georgia  70 835 
Kentucky  68 705 
Rhode Island  68 446 
Delaware  55 540 
Total  3 615 920 
Suppose that there were to be 60 seats in the House.
If a divisor of 55 000 is used, the resulting apportionment is
State  Quotas  Seats  District size  Rel. rep. 

Virginia  11.46  11  57 324  1.0513 
Massachusetts  8.64  8  59 416  1.0143 
Pennsylvania  7.87  7  61 840  0.9745 
North Carolina  6.43  6  58 920  1.0228 
New York  6.03  6  55 265  1.0905 
Maryland  5.06  5  55 703  1.0819 
Connecticut  4.31  4  59 210  1.0178 
South Carolina  3.75  3  68 745  0.8766 
New Jersey  3.26  3  59 857  1.0068 
New Hampshire  2.58  2  70 911  0.8499 
Vermont  1.56  1  85 533  0.7046 
Georgia  1.29  1  70 835  0.8508 
Kentucky  1.25  1  68 705  0.8772 
Rhode Island  1.24  1  68 446  0.8805 
Delaware  1.01  1  55 540  1.0851 
Total  65.74  60 
Computational complexity
Let Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle s} be the number of seats and Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle r} be the number of parties. The standard sequential allocation procedure determines the outcome in Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle O(s \log r)} time. More sophisticated algorithms can determine the outcome in time.^{[1]}^{[2]}
Extensions of theory
One of the only ranked PR methods that reduces to d'Hondt in its party list case is Schulze STV. Several cardinal PR methods reduce to d'Hondt if certain divisors are used. Some of these are:
 Phragmén's method
 Reweighted Range voting
 Sequential proportional approval voting
 Single distributed vote
Notes
Parties can generally guarantee themselves at least as many seats as they would get in d'Hondt in any PR method by doing vote management. In fact, an alternative way to visualize d'Hondt is to see how many seats each party could guaranteeably win if doing vote management. One thing that can help in this visualization is that all Highest averages methods pass House monotonicity, therefore they can all be visualized as simply filling one seat at a time with no change to the result. Example:
A 10 B 7 C 4 D 3
A gets the first seat. Now, we can see the vote totals as:
A 5 A 5 B 7 C 4 D 3
In other words, now that A got the first seat, they are "looking to play" for two seats; they are seeing if they can secure two seats no matter what the other parties do with their votes. Notice that the idea of the division is that if the other parties try to take the one seat that A has, then A can refuse its votes to ensure they have more votes than the other parties. B gets the second seat and the votes become:
A 5 A 5 B 3.5 B 3.5 C 4 D 3
So here it is seen that A gets the third seat. This is because by splitting their votes evenly between two seats, they can put more votes per seat than any of the other parties can put for two or even one seat (i.e. Party C and Party D can't even put 5 votes in for one seat). The votes would then become
A 3.333 A 3.333 A 3.333 B 3.5 B 3.5 C 4 D 3
etc.
The reason d'Hondt guarantees every party at least as many seats as they have more voters than that number of HB quotas, thus satisfying the Droop proportionality criterion, is because there is always 1 HB quota more than the number of seats, so when a party has more voters than k HB quotas, it can divide its votes to do more than a quota per seat for k seats, whereas all other parties combined can at most do just under (((total number of seats + 1)k)/(number of seats  (k  1))) i.e. the most votes the other parties can have divided by the number of seats they're trying to take. For example, if there are 10 seats to be filled, and one party has over 3 HB quotas, then they can take at least 3 seats because they can do over 1 quota per seat for 3,and for all other parties to take at least (10(31))=8 seats (the minimum required for them to deny the other party 3 seats, since you can't get 3 seats if 8 out of 10 seats are already allotted), the other parties can do at most just under ((10+1)3)/8)=1 quota per seat for 8 seats.
The divisor in d'Hondt will always be equal to or smaller than a Hare quota, because that is the largest divisor possible such that there are only as many winners as seats to be filled.
One easy way to do d'Hondt in certain simple examples is to compare all parties except the party with the fewest votes (the lastplace party) with the lastplace party; if all other parties can split more votes per seat than the lastplace party has for even one seat such that all other parties would be able to win a combined number of seats equal to or greater than the number of seats to be filled, then the lastplace party can be eliminated, and this procedure repeated, to find a minimum number of seats each party must win in d'Hondt. Example: Suppose there are 8 seats to be filled, and 4 parties, A through D, with the votes being (in descending order) A: 10, B: 8, C: 3, and D: 2. Start by dividing every party's votes by just over the lastplace party's (D's) vote total (just over 2). Each party can put more than 2 votes per seat for this number of seats: A: 4 (10/2 = 5, which moved down to the nextclosest integer is 4), B: 3 (8/2 = 4, shifted down = 3), and C: 1 (3/2 = 1.5 shifted down = 1). In total, these parties have 4 + 3 + 1 seats; this is the number of seats desired, therefore, this is the final result.
References
 ↑ Gall, Françoise Le (2003). "Determination of the modes of a Multinomial distribution". Statistics & Probability Letters. Elsevier BV. 62 (4): 332–333. doi:10.1016/s01677152(02)004303. ISSN 01677152.
 ↑ White, W.T.J.; Hendy, M.D. (2010). "A fast and simple algorithm for finding the modes of a multinomial distribution". Statistics & Probability Letters. Elsevier BV. 80 (1): 63–68. doi:10.1016/j.spl.2009.09.013. ISSN 01677152.