Checking a largest-remainder allocation without losing units
Splitting an indivisible total in a fixed ratio rarely produces whole numbers. This worksheet applies the largest-remainder rule to ten items in a ratio of 2 to 3 to 3 and checks that the shares add back to ten.
The rounding problem
Ten items split among three groups in the ratio 2 to 3 to 3 give each group a fractional share. The ratio parts add to 8, so the shares are 10 times 2 over 8, 10 times 3 over 8, and 10 times 3 over 8, which are 2.5, 3.75 and 3.75. Items cannot be cut, so each group needs a whole number, and the whole numbers must still add to 10. Rounding each share independently fails: round-half-up turns 2.5 into 3, 3.75 into 4 and 3.75 into 4, for a total of 11. One item has appeared from nowhere. Rounding down everywhere gives 2, 3 and 3, which total 8, and two items have gone missing. An allocation rule has to fix the total, and the largest-remainder rule is one common way to do it. The size of the error depends on the number of groups. With three groups, independent rounding can be off by at most one, but with many groups the total can drift by several items.
Step one: take the floors
The method begins by giving each group the whole part of its share. The floors of 2.5, 3.75 and 3.75 are 2, 3 and 3. Those assignments are safe, since every group is entitled to at least that many items. The floors add to 8, and the basic calculator confirms the pair of larger floors: 3 plus 3 gives 6, and adding the 2 gives 8. The first step leaves part of the total unallocated, and the second step decides who receives what is left. Starting with floors guarantees that no group is ever given more than its fair share rounded up, and that the number of leftover items is smaller than the number of groups. Floors are also easy to audit. Anyone can recompute a floor from a share without knowing the rest of the method, which makes the first step transparent.
Step two: count the leftover items
Subtract the sum of the floors from the total. Ten minus 8 leaves 2 items to distribute. The count of leftovers always lies between zero and one less than the number of groups, because each group gives up less than one whole item when its share is floored. In this case, with three groups, the leftover can be 0, 1 or 2, and here it is 2. The calculator check uses the basic calculator to subtract 8 from 10 and confirms the answer of 2. Knowing the leftover count tells you how many groups will receive a bonus item, and so how deep into the list of remainders the rule needs to reach. If the leftover count is zero, the shares were already whole numbers and the remainders are all zero. The method then ends at this step and no ranking is needed.
Step three: rank the fractional remainders
Each group has a remainder, the part of its share that was dropped by the floor. For the first group it is 0.5, and for the other two it is 0.75 each. The method gives one extra item to each of the groups with the largest remainders, until the leftovers run out. With two items to place and the two largest remainders both equal to 0.75, the second and third groups each receive one. The final allocation is 2, 4 and 4. The sum is 2 plus 8, which is 10, matching the total, as the last check on the page confirms. The group with the smallest remainder, 0.5, keeps its floor. Sorting the remainders from largest to smallest and handing out one item at a time down the list is the usual way to run the step, and stopping when the leftovers run out ends it.
Why ties need their own rule
In this example the tie between the two 0.75 remainders is harmless, because there are exactly enough leftover items for both. The method breaks down when a tie straddles the last available item. Suppose 10 items are split evenly among three groups. Each share is 3.333, the floors add to 9, and one item remains, but all three remainders are equal. Something must choose among the groups, and the largest-remainder rule itself does not say what. Common tie-breakers include the larger group, a fixed order, or a random draw, and each has consequences for fairness. Whatever tie rule applies must be stated before the allocation is run, not decided after the result is seen. Statutes and election rules that use this method normally include a tie clause, often a lot or a rule based on the order of the groups, because a tie that reaches the last seat is not rare when totals are small.
Another worked allocation
Take 7 items divided in the ratio 5 to 3 to 1. The ratio parts add to 9, so the shares are 3.889, 2.333 and 0.778. The floors are 3, 2 and 0, which sum to 5, leaving 2 items. The remainders are 0.889, 0.333 and 0.778. The two largest belong to the first and third groups, so those receive the extra items, and the allocation is 4, 2 and 1, which adds to 7. The middle group gets no bonus, even though its share was larger than the third group. The third group received an item because its remainder was larger, not because its share was. This feature of the method is sometimes surprising and is a direct result of ranking by remainder. The example also shows that the result does not depend on the order of the groups, only on the remainders, as long as ties are handled by a fixed rule.
Names and history
The largest-remainder method is also called Hamilton's method, after Alexander Hamilton, who proposed it for apportioning seats in the United States House of Representatives in the 1790s. It was used for the House for part of the nineteenth century. A flaw appeared in 1880, when it was observed that enlarging the House by one seat could cost a state a seat, which became known as the Alabama paradox. Largest-remainder rules with different quotas, such as the Hare or Droop quota, are also used to allocate seats in proportional elections in several countries. These are applications of a general convention, and each jurisdiction defines its own details. The Alabama paradox is a reminder that a rule can behave oddly when the total changes. A method can pass the tests on one total and still surprise people on the next.
Other allocation conventions
Several other rules solve the same problem and give different answers on some inputs. Divisor methods, such as Jefferson's and Webster's, scale a common divisor until the rounded shares add to the total. They avoid the paradox mentioned above. Jefferson's method tends to favor larger groups, while Webster's is closer to even-handed. The choice among rules is a policy decision. This worksheet explains one of them and does not claim it is the best. If a contract, statute or internal policy specifies a method, follow that one. If none is specified, record the method you used and the tie rule beside the result so that others can reproduce it.
A business example
Suppose a team has 25 tickets to hand out among three departments in proportion to headcounts of 12, 9 and 4. The total headcount is 25, so the shares are exactly 12, 9 and 4, and no rounding is needed. If the tickets number 20 instead, the shares are 9.6, 7.2 and 3.2. Floors give 9, 7 and 3, which add to 19, leaving one ticket. The largest remainder is 0.6, so the first department receives it, and the allocation is 10, 7 and 3. The numbers are illustrative and do not reflect any real organization. In practice you would also decide whether a department may receive zero, which this rule allows. If a minimum allocation is required, such as at least one ticket per department, assign those first and then run the method on the remainder.
Checking an allocation
Three simple checks catch most errors. First, the allocations must add to the total. Second, each group should receive either the floor or the ceiling of its fractional share, never more or less than one item away from it. Third, a group with a larger share should not receive fewer items than a group with a smaller share, unless their shares are very close and the rule explains it. The calculator on this page does arithmetic only, so each step above is done with the basic calculator and checked by hand. Writing the shares, floors, remainders and final counts in a small table makes review easy. Spot checks with a different total, one more or one fewer item, also show whether the allocation changes in a sensible way.
What the convention does not decide
The rule assumes that the shares are proportional to the stated ratio and that fractional entitlements are meaningful. It does not say whether a ratio is fair, whether groups may be left with nothing, or whether a minimum allocation applies. It is also not a legal or ethical standard. It is a deterministic procedure for turning fractions into whole counts while keeping the total. The result is reproducible, and the choice of procedure remains a decision for the people who define the allocation.
A three-way tie
Consider 5 items shared equally among three groups. Each share is 1.667, the floors are 1, 1 and 1, which add to 3, and 2 items remain. All three remainders are 0.667, so there is a three-way tie for two places. The largest-remainder rule cannot decide, and the allocation 2, 2, 1 can be reached in three different ways depending on which group is left out. A stated tie rule settles it, such as favoring the group listed first, the group with the larger original total or the group that received fewer items in the previous round. Without such a rule, two people running the same procedure can produce different allocations from identical inputs.
Try your own values with the Whole-unit proportional allocation calculator.
Reproduce the checks
Floor-share total
Open the Basic calculator and enter:
- First number
2- Operation
add- Second number
6
Expected output:
Result
8The two other floor shares sum to six.
Unallocated remainder
Open the Basic calculator and enter:
- First number
10- Operation
subtract- Second number
8
Expected output:
Result
2Two whole items remain to be assigned.
Completed allocation total
Open the Basic calculator and enter:
- First number
2- Operation
add- Second number
8
Expected output:
Result
10The final shares two, four and four preserve all ten items.
References and implementation scope
The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.