Settle up
The fewest payments that clear every debt.
3 payments needed9 fewer transfers than paying everyone back directly
- S$887.05
DinaAlice
Dina pays Alice 887.05 SGD
- S$151.82
DinaBob
Dina pays Bob 151.82 SGD
- S$665.25
Chen WeiBob
Chen Wei pays Bob 665.25 SGD
How this works
We net out what each person paid against their share, then greedily match the biggest debtor with the biggest creditor. That clears the ledger in the smallest number of transfers.