Type a total, type a ratio, and this page splits the total across the ratio and shows you the sum. All of it happens in your browser: the total, the ratio terms, the percentages and the Σ line are computed in the tab you already have open. Nothing is uploaded, there is no account, and your figures never leave your device. There is no server to log them, because there is no server in the path.
Splitting a number is the easy half. Closing the sum is the half that catches people out. Take 100.00 across 1 : 1 : 1. The honest answer is three shares of 33.3333…, a decimal that repeats forever and cannot be written down. Round each share to two places and you get 33.33, 33.33, 33.33 — which add to 99.99. You are a cent short of the total you started with, and nothing on the screen tells you so unless the tool says so. Every figure below is derived in that same tab — there is no upload step and no request to make.
Key Takeaways
100.00across1 : 1 : 1rounds to33.33 / 33.33 / 33.33= 99.99. The sum fails because rounding three things independently guarantees nothing about the total.999.99across1 : 2 : 3 : 4fails the other way: every part rounds up, and the sum lands on 1000.00 — one cent that was never in the total.- The fix is floor every share, count the leftover units as a whole number, then hand them out. No epsilon, no tolerance, no policy hidden in a magic constant.
- Largest remainder is one defensible tie-break, not the only one. Hamilton, D'Hondt and Sainte-Laguë give three different answers to 27 seats and 19 votes.
- The percentages come from
weight ÷ weightSum, so they describe the ratio. Change the total and they do not move.- No ratio calculator is a currency allocator. This one has no currency picker, on purpose.
Where the arithmetic happens
Numbers are parsed off the keyboard into rational arithmetic over JavaScript's bigint, then rounded once, at display, at the precision you pick. 12.5 arrives as 25/2, 2 1/4 as 9/4, 1:2 as 1/2. MDN's BigInt reference notes that Number loses integer exactness well below 2^53, and that BigInt division truncates toward zero, which is why each value is carried as a fraction rather than a raw integer.
Three tabs sit under the ledger. Simplify reduces 12800 : 57600 to 2 : 9. Solve works A : B = C : ? at six places so a repeating value like 2.400000 stays readable. Scale multiplies or divides every share by a factor, exactly, since dividing is multiplying by the reciprocal.
The allocation view is the one that differs: alongside each share, the amount, the percentage, a stacked bar you can cross-highlight against the rows, and a footer carrying the Σ.
The cent that vanishes: 100.00 across 1 : 1 : 1
100.00 split three ways is the smallest case that breaks, and it breaks in the direction people do not expect: short, not over.
| Share | Weight | Exact share | Round each to 2 dp | Largest remainder |
|---|---|---|---|---|
| A | 1 | 33.3333… |
33.33 | 33.34 +0.01 |
| B | 1 | 33.3333… |
33.33 | 33.33 |
| C | 1 | 33.3333… |
33.33 | 33.33 |
| Σ | 99.99 | 100.00 ✓ |
The cause is not a bug in anyone's rounding. One third has no finite decimal expansion, so whatever you write down truncates something infinite, and rounding each of the three independently gives no reason for the errors to cancel. They happened not to here: three truncations of the same repeating tail all went the same direction.
Nothing about 1 : 1 : 1 is unusual. Any ratio whose weight sum does not divide the total evenly behaves the same way, which is to say most of them. Wikipedia's largest remainder article puts a name on the technique for handing out whatever is left over, and notes the Hare-quota variant "is sometimes called Hamilton's method, named after Alexander Hamilton, who devised the method in 1792."
The other direction: 999.99 across 1 : 2 : 3 : 4
The failure is not always a shortfall. Pick a total ending in .99 with a four-way ratio and every part rounds up:
| Share | Weight | Exact share | Round each to 2 dp | Largest remainder |
|---|---|---|---|---|
| A | 1 | 99.999 |
100.00 | 100.00 |
| B | 2 | 199.998 |
200.00 | 200.00 |
| C | 3 | 299.997 |
300.00 | 300.00 |
| D | 4 | 399.996 |
400.00 | 399.99 |
| Σ | 1000.00 | 999.99 ✓ |
Four independent roundings overshoot by exactly one unit of the smallest displayed denomination, so the shares now describe a slightly larger pile of money than the pile you had. On an invoice that is a reconciliation failure; in a settlement a transfer that fails to balance.
Same lesson, opposite ends, and shortfall is the common case. Overshoot needs a total whose digits cooperate, which is why 100.00 across 1 : 2 : 3 : 4 divides cleanly into 10 / 20 / 30 / 40 and gives you nothing to look at.
Floor, count, distribute
The repair takes three steps and no judgement call.
- Floor every share. Scale the exact share to the working precision and keep the integer part:
33.3333…at 2 dp floors to33.33,46.666…to46.66. Flooring moves in one direction, so the sum is now at or below the total. - Count the leftover units as a whole number. The total in the same units minus the sum of the floors is an integer. Here it is one.
- Hand those units to the shares with the largest remainders, largest first.
The leftover is a count of units, not a residual amount, so no epsilon appears in the algorithm. The tempting alternative (round everything, subtract the total from the last row, accept whatever falls out) needs a tolerance to decide whether a residual of 1e-15 counts as zero, and that tolerance is a policy choice wearing a constant's clothing.
That third step is visible in the tool rather than buried. A share that received a unit carries a + marker, so row A reads 33.34 +0.01 and the footer reads Σ 100.00 = 100.00 ✓.
One honest detail about that marker: it records where the leftover unit went, not a disagreement with another method. Take 7 : 5 : 3 across 100.00. Exact shares are 46.666…, 33.333… and 20, and plain round-half-up produces the same 46.67 / 33.33 / 20.00. The tool still marks 46.67 +0.01, because it floored 46.666… to 46.66 and then handed it the leftover unit. Same digits, recorded provenance.
Which share absorbs the leftover, and why it is a choice
Largest remainder hands the units to the biggest fractional tails. That is a rule, not a proof, and other rules exist because tail ordering encodes a judgement about who is favoured when a total cannot divide evenly.
Twenty-seven seats, nineteen votes, three parties of one, ten and eight. Exact quotas: 1.42, 14.21 and 11.37. Three standard rules:
| Rule | Family | A (1 vote) | B (10 votes) | C (8 votes) |
|---|---|---|---|---|
| Hamilton (largest remainder) | quota | 2 | 14 | 11 |
| D'Hondt (Jefferson) | highest averages | 1 | 15 | 11 |
| Sainte-Laguë (Webster) | highest averages | 1 | 14 | 12 |
Same votes, same seats, three answers. Wikipedia's D'Hondt article is direct about the tilt: each seat goes to the highest quotient V ÷ (s + 1), and the method "favors larger political parties over small parties." The ten-vote party takes the extra seat.
Sainte-Laguë divides by 2s + 1, a smaller divisor that lets a small party win its first seat sooner. That article also settles a piece of vocabulary: the method "is also called the Webster method," and the two names are one rule, not two. A separate Webster–Santenstede method uses different divisors, the usual source of the confusion. On the same votes Sainte-Laguë hands the extra seat to the eight-vote party, the opposite tilt.
The literature does not treat this as settled, which is the honest reason to read your own rule first. The same largest remainder article records that "quota methods are generally disfavored by social choice theorists as a result of apportionment paradoxes," and that they "exhibit the no-show paradox, i.e. voting for a party can cause it to lose seats." Splitting a budget this way is a small, local version of an argument that has occupied constitutional law for two centuries.
The other trap: binary floating point
Rounding policy is only half the problem. The other half happens before any rounding, which is why this page parses text into fractions instead of calling Number().
In IEEE 754 binary64, 0.1 cannot be stored. Python's floating-point tutorial explains why: "no matter how many base 2 digits you're willing to use, the decimal value 0.1 cannot be represented exactly as a base 2 fraction," and what lands in memory is 3602879701896397 / 2**55, "close to but not exactly equal to the true value of 1/10." So 0.1 + 0.2 evaluates to 0.30000000000000004, not 0.3. The decimal module documentation makes the contrast plain: "Decimal numbers can be represented exactly," whereas end users "would not expect 1.1 + 2.2 to display as 3.3000000000000003."
Exact arithmetic does not rescue a value that has already been through a float. In Python, Fraction(0.1) + Fraction(0.2) is 10808639105689191/36028797018963968, which is not equal to Fraction(3, 10). The binary error is baked into the input, and an exact type faithfully carries the wrong number. The repair has to happen at parse time: Fraction("0.1") + Fraction("0.2") is exactly 3/10. Parse the decimal as text, never launder it through a double first.
A ratio calculator is not a currency allocator
A ratio calculator is not a currency allocator, and treating one as the other is how correct arithmetic still produces a broken payment.
What this page does: reads a total, reads a ratio, produces shares that sum to the total at the precision you chose, and shows you that sum. What it does not do: know what currency the total is in, apply a fee, route a remainder to a designated account, check a minimum charge, or produce something a payment rail will accept. It has no currency picker by design, and the leftover marker reads +0.01 rather than +1¢ because it cannot assume a currency for you. Some settlement systems need the residual on a specific account (a house account, a sweep account) and largest remainder will not put it there unless the largest tail happens to be that account. Know your rule before you need it.
A ratio calculator is also not a proportion solver. OmniCalculator's ratio calculator describes its job as computing "identical ratios given three of the four parts of the two ratios," and works its example by scaling 3/8 up to a denominator of 72. Calculator.net's input row is labelled A:B = C:D and asks for "any three values… to calculate the fourth." Both are proportion solvers: neither is wrong, neither does N-way allocation, so neither has a remainder to get wrong. Searched "ratio calculator" and landed on one? You found the other category.
It is not a way to discover a ratio. Give it two amounts and it will not infer 3 : 7 from them. Set the terms yourself.
It is not a validator. A sum that closes is arithmetic that closes. Whether the split was the right split is a question this page cannot see.
Check the sum yourself
You should not need to trust any tool. Three checks, about a minute.
Add the amounts with a calculator, not in your head, then compare against the Σ line. If it reads Σ 100.00 = 100.00 ✓, your addition and the footer agree. When it cannot close (split 0.03 five ways at 2 dp: three units cannot fill five rows, so two shares read 0.00) the footer states the difference and says why in words rather than quietly truncating.
Change the precision and watch the marker move. The same total and ratio are not the same answer at a different number of decimal places. 100.00 across 1 : 1 : 1 reads 33.334 / 33.333 / 33.333 at 3 dp, while independent rounding leaves a gap of 99.999 instead of 99.99.
Check the percentages against the ratio, not the total. Each share's percentage is weight ÷ weightSum, a property of the ratio. 1 : 2 : 3 : 4 reads 10 / 20 / 30 / 40 whether the total is 100.00 or 999.99. If the column moves when you edit the total, something is wrong. Percentages are rounded for the readout, so the column never totals 99.99%.
Related tools and further reading
- Aspect Ratio Calculator — the sibling most easily confused with this page: two terms, geometric,
1920 × 1080output. - Base Conversion: Binary, Octal, Hex — the same exact-integer reasoning in a different job.
- Text Diff Checker — for a second, line-by-line reading of a sum you already computed.
- Hash Collision Probability Calculator — the other maths tool on the site, where knowing what the formula assumes is the work.
