DEV Community

Shreyash Giri
Shreyash Giri

Posted on Originally published at ttmmsplit.in

How to settle group expenses with the fewest payments

Six friends, forty expenses, and everyone owes everyone. It looks like it needs thirty payments. It never needs more than five. Here’s why, and how to do it by hand.

The key idea: only your net balance matters

It doesn’t matter who you owe for each expense; what matters is your total. For each person, add up everything they paid and subtract their share of everything. The result is their net balance:

  • Positive: the group owes them (they paid more than their share).
  • Negative: they owe the group.
  • Zero: they’re square.

The net balances always add up to zero, because every rupee someone paid is a rupee of somebody’s share.

Step 1: Work out each person’s net balance

A four-person Goa trip:

Person Paid Share Net
Aman ₹12,000 (villa) ₹9,000 +₹3,000
Riya ₹10,000 (scooters, food) ₹9,000 +₹1,000
Kabir ₹6,500 (petrol, drinks) ₹9,000 −₹2,500
Neha ₹7,500 (cabs, dinner) ₹9,000 −₹1,500
Total ₹0

Step 2: Match the biggest debtor with the biggest creditor

  1. Kabir owes the most (₹2,500). Aman is owed the most (₹3,000). Kabir pays Aman ₹2,500. Kabir is now square; Aman is still owed ₹500.
  2. Neha owes ₹1,500. Aman is owed ₹500: Neha pays Aman ₹500. Aman is square.
  3. Neha still owes ₹1,000, and Riya is owed ₹1,000: Neha pays Riya ₹1,000. Everyone is square.

Three payments instead of the dozen you’d get by settling each expense separately.

Why it’s never more than n − 1 payments

Each payment in step 2 brings at least one person to zero. With n people, after n − 1 payments only one person can be left, and their balance must be zero because the total is zero. So a 10-person trip never needs more than 9 payments, and usually fewer.

Does simplifying change what anyone pays?

No. Everyone ends with exactly the same net amount. The only thing that changes is who pays whom. In the example, Kabir never directly owed Aman for anything specific, but paying Aman settles his debt to the group just as well.

When people prefer not to simplify

Sometimes people would rather pay the person they actually owe, for example if two people in the group don’t know each other well. That’s fine: settle pair by pair. It just takes more payments.

Practical tips for settling a trip

  • Settle within a week. Memories fade fast and people move on to the next trip.
  • Round to the nearest ₹10. Nobody wants to send ₹1,243.50.
  • Use payment requests. A UPI QR or link with the exact amount means nobody types a wrong number. See UPI tips.
  • Post the plan in the group chat so everyone can see who pays whom.

Let ttmm do it

ttmm keeps everyone’s net balance live as expenses are added and shows the simplified plan on the group screen. Tap Settle up and it opens your UPI app with the person and amount filled in. See settling up in ttmm.

Questions

What is debt simplification?

Replacing many small IOUs with the fewest payments that leave everyone with the same final balance.

Does simplifying change what anyone pays in total?

No. Everyone’s net amount stays the same; only the number of payments goes down.

How many payments does a group need to settle?

At most one fewer than the number of people with a non-zero balance.


Originally published on ttmmsplit.in. ttmm is a free bill-splitting app for flatmates, trips and friends — settle up on UPI in one tap. Try it free.

Top comments (0)