How to calculate who owes who

There are only three steps: what each person paid, what each person owed, and the difference. The clever part is turning those differences into as few payments as possible.

Short answer

Work out what each person paid, what each person's fair share was, subtract one from the other to get a net balance per person, then repeatedly pay the largest debtor to the largest creditor until every balance is zero.

How it works

  1. 1Add up what each person actually paid out.
  2. 2Add up each person's fair share of every expense they took part in.
  3. 3Net balance = paid minus share. Positive is owed money, negative owes money.
  4. 4Match the largest negative against the largest positive and transfer the smaller of the two.
  5. 5Repeat until every balance is zero โ€” that is the minimum-ish payment list.

"Who owes who" only feels complicated because people try to reverse-engineer it from a pile of individual IOUs โ€” Ana owes Ben, Ben owes Cleo, Cleo owes Ana. Untangling that by hand is genuinely hard. Netting it first makes it trivial.

The trick is to stop thinking about pairs of people and start thinking about each person's single net balance against the group as a whole. Once you have that one number per person, settling is a matching problem, not an algebra problem.

This is exactly what a group expense calculator automates, but the method is simple enough to do on paper for small groups, and understanding it makes it obvious why the app's settlement list is the minimum number of payments rather than an arbitrary one.

Worked examples with real numbers

Five people, one weekend of costs

Priya, Quinn, Ravi, Sara and Tom shared costs totalling 400. Priya paid 220, Sara paid 140, Quinn paid 40, and Ravi and Tom paid nothing.

TotalsAmount
Total spent400.00
Fair share per person (400 รท 5)80.00
PersonPaidFair shareBalance
Priya220.0080.00+140.00
Quinn40.0080.00โˆ’40.00
Ravi0.0080.00โˆ’80.00
Sara140.0080.00+60.00
Tom0.0080.00โˆ’80.00
  • RaviPriya80.00
  • TomPriya60.00
  • TomSara20.00
  • QuinnSara40.00

Balances are +140 (Priya), +60 (Sara), โˆ’40 (Quinn), โˆ’80 (Ravi), โˆ’80 (Tom). Matching the largest debtor to the largest creditor each round produces four transfers โ€” one fewer than the five people involved.

Three people, a small shared cost

Iris, Jae and Kim spend 54 on snacks for a film night. Iris paid the whole thing.

TotalsAmount
Total spent54.00
Fair share per person (54 รท 3)18.00
PersonPaidFair shareBalance
Iris54.0018.00+36.00
Jae0.0018.00โˆ’18.00
Kim0.0018.00โˆ’18.00
  • JaeIris18.00
  • KimIris18.00

When one person paid for everyone, the answer is always the same shape: everyone else pays that person their share directly. Two transfers for three people โ€” never more than nโˆ’1.

The balance-and-greedy-match algorithm

  1. 1. 1. Total paid per person

    sum every expense by who paid it

  2. 2. 2. Total share per person

    sum each person's fair portion of every expense they were part of

  3. 3. 3. Net balance

    balance = paid โˆ’ share (positive = owed, negative = owes)

  4. 4. 4. Check it nets to zero

    sum of all balances = 0, always

  5. 5. 5. Greedy match

    pay the largest debtor's balance to the largest creditor, capped at min(|debt|, credit)

  6. 6. 6. Repeat

    update both balances and repeat until every balance is 0

This greedy approach never needs more than nโˆ’1 transfers for n people, however tangled the original spending was.

Payments needed: naive vs minimised

PeopleNaive (settle every pair)Minimised (greedy match)
332
463
5104
6155
8287
10459

Naive is nร—(nโˆ’1)รท2 possible pairwise debts; minimised is at most nโˆ’1 transfers.

Mistakes that cause arguments

  • Settling debts as they're mentioned

    Paying back each individual IOU as someone remembers it produces far more transfers than necessary and often the wrong amounts once later expenses shift the balance.

  • Forgetting to include the payer in their own share

    The person who paid for dinner still ate dinner โ€” their share still counts against them, it's just offset by what they paid.

  • Assuming balances must be round numbers

    Real shares often produce numbers with cents. That's fine โ€” the balances still net to zero, they just aren't tidy.

  • Matching arbitrarily instead of largest-to-largest

    Any valid matching that clears all balances works, but largest-to-largest reliably produces the fewest transfers.

Practical tips

  • Always calculate share, not just spend, per person.
  • Balance = paid minus share, not paid minus average paid.
  • Sanity-check that every group's balances sum to zero before settling.
  • Sort debtors and creditors by size before matching them.
  • Let a calculator do the matching once the group is bigger than four or five people โ€” it's mechanical but easy to slip up on by hand.

Questions

Why not just have everyone pay everyone?
Because that multiplies transfers. Netting balances first typically cuts the number of payments in half or better.
What if the numbers do not reach exactly zero?
Rounding to two decimals can leave a cent or two. Round the final payment; nobody chases a cent.
Does the order of payments matter?
No. Any set of transfers that zeroes every balance is valid โ€” the shortest one is just the most convenient.

Related calculators

Okayโ€ฆ so who owes who?

Free, no signup, no download. Just the answer.

Open Who Owes Who