Splitting a Group Expense With the Fewest Transfers
After reading this you will know how to turn a messy pile of "who paid for what" into each person's fair share, and how to settle the group with the smallest sensible number of payments.
What the splitter does
Three friends share a weekend trip. Anna pays 120 for the hotel, Bela pays 45 for dinner, and Csaba pays 0 because he forgot his wallet. Total spend is 165. Split evenly, each person owes 55. Anna paid 65 too much, Bela paid 10 too little, and Csaba owes his full 55.
The obvious fix is for everyone to hand cash to everyone. That gets noisy fast. The splitter does two things instead. First it computes each person's net balance: what they paid minus their share. Then it finds a short list of transfers that brings every balance back to zero. For the trip above, the whole thing settles with two payments: Csaba pays Anna 55, Bela pays Anna 10. Nobody pays twice, and no money moves that does not need to.
When to use it, and when not
Use it whenever several people spend on a shared pot and you want to square up at the end: a trip, a shared dinner, a house of flatmates splitting groceries, a group gift. It assumes an equal split: everyone owes the same share of the total.
It is the wrong tool when shares are meant to be unequal. If Anna eats a starter and a main while Csaba has only water, an even split overcharges Csaba. In that case, split each bill line by hand first, then feed in the corrected per-person amounts. For a single restaurant bill where you want to add gratuity before dividing, the Tip Calculator handles the tip and the per-head figure in one step.
The splitter never invents money. The sum of what everyone paid always equals the total shared cost, so the positive balances (creditors) and the negative balances (debtors) cancel out exactly. If they do not cancel in your own arithmetic, you have a data-entry error, not a rounding effect.
The math behind a fair share
Let there be n people. Person i paid a total of p_i. The group total is the sum of everyone's payments:
Here T is the grand total and p_i is what person i put in across all their payments. With an equal split, each person's fair share is the same:
s is the fair share per person. The quantity that drives the whole settlement is the net balance of each person, written b_i:
A positive b_i means person i is owed money (a creditor). A negative b_i means they owe money (a debtor). Because the shares add up to the total, the balances always sum to zero:
Why the transfers can be few
With n people you could always settle by having every debtor pay every creditor, but that is wasteful. The number of transfers you actually need is small. If you split the group into d debtors and c creditors, you never need more than d + c - 1 transfers, and often fewer.
The tool uses a greedy rule: take the person who owes the most and the person who is owed the most, and move as much as possible between them in one payment. That payment zeroes out at least one of the two. Repeat until every balance is zero. This keeps the transfer count near the minimum without any heavy computation.
Finding the guaranteed smallest set of transfers is a hard combinatorial problem in general. The greedy method is not always perfectly optimal, but for real groups (five, ten, twenty people) it lands on the minimum or one transfer above it almost every time. The difference rarely matters when you are settling a dinner.
Worked example: the demo trip
Use the default data: Anna 120, Bela 45, Csaba 0.
- Total spend: T = 120 + 45 + 0 = 165.
- People: n = 3, so the fair share is s = 165 / 3 = 55.
- Balances: Anna 120 - 55 = +65, Bela 45 - 55 = -10, Csaba 0 - 55 = -55.
- Check they sum to zero: 65 - 10 - 55 = 0. Good.
- Greedy step one: largest debtor is Csaba at
-55, largest creditor is Anna at+65. Move55: Csaba pays Anna55. Csaba is now settled, Anna's balance drops to+10. - Greedy step two: remaining debtor is Bela at
-10, creditor is Anna at+10. Move10: Bela pays Anna10. Both hit zero.
Result: two transfers, Csaba → Anna 55 and Bela → Anna 10. With three people the naive everyone-pays-everyone approach would have needed up to six transfers.
Reading the results
The output has two parts. The per-person figures tell you the story: what each person paid, the shared fair share, and the balance. The transfer list tells you the actions: who hands money to whom, and how much.
Read the balances first. They are the truth of the situation and do not depend on the greedy algorithm at all. If Anna is owed 65, that is a fact of the arithmetic. The transfer list is just one convenient way to move that 65 back to her. If your group prefers a different set of payments (say Csaba pays Bela and Bela pays Anna), that is fine as long as every final balance reaches zero.
Watch the widget change the split
Common mistakes
The errors that trip people up are almost always about the input, not the settlement.
- Forgetting the zero payers
- If Csaba paid nothing but is still part of the group, he must appear with
0. Leave him out and the share is computed over two people instead of three, so s jumps from55to82.5and everyone's balance is wrong. - Splitting evenly when shares differ
- An even split charges the water drinker the same as the three-course diner. If that is unfair for your group, adjust the input amounts before you split, not after.
- Mixing currencies
- All amounts must be in one currency. Convert first with the Currency Converter, then enter the converted figures.
- Chasing rounding to the cent
- When the total does not divide evenly, someone ends up a cent or two off. Pick a person to absorb the remainder rather than adding a third micro-transfer for two cents.
Double-counting is the sneakiest error. If Anna pays the 120 hotel bill and later Bela reimburses her 40 in cash outside the tool, do not also enter that 40 as a payment. The splitter only works on the shared spend, not on side payments you have already made.
Related tools
These pages handle the neighbouring jobs around a shared bill.
- VAT / Sales Tax Calculator: pull the tax out of a gross total or add it to a net price before you split.
- Discount Calculator: work out the sale price and stacked savings when the group buys something on offer.
- Subscription Cost Calculator: for a service you share monthly, find the true yearly cost before dividing it.
- Inflation Calculator: compare what a shared cost was worth in an earlier year.
Frequently asked questions
How do I add several payments from one person?
Repeat the name on separate lines. Two lines of Anna 60 add to a single total of 120 for Anna, and she is still counted as one person for the fair share.
Can I split unequally, for example by nights stayed?
Not directly. The tool assumes an equal share per person. To weight it, do the weighting yourself: work out each person's target share, subtract it from what they paid, and treat those differences as the balances to settle.
Why does the tool sometimes route everything through one person?
Because that is often the shortest path. When one person is owed far more than anyone else, the greedy rule sends each debtor straight to them, which needs the fewest payments. It is a feature of minimizing transfers, not a bug.
What if the total does not divide evenly?
You get a fractional share, for example 55.33 when 166 splits three ways. The balances still sum to zero. Round the transfers to your currency's smallest unit and let one person carry the odd cent.
Is this financial advice?
No. It is arithmetic for settling shared costs, an educational estimate only. For decisions about money that matter, speak to a qualified adviser.