Why fewer payments is a real problem
After a weekend of games, every pair of players might owe each other something: you owe Sam 20, Sam owes Jo 15, Jo owes you 5. Paying every debt as it stands takes a lot of transfers. But you only need to pay your net balance, and often the net balances split into smaller groups that settle among themselves.
The calculator turns your results into one balance per person, then finds the way to split the group into the most separate circles that each add up to zero. A circle of k people needs only k - 1 payments. With balances of +30, +20, -30 and -20, the obvious way is three payments, but the group splits into two pairs that need one payment each: two payments in total.
How it works
People with a zero balance are left out. Every subset of the remaining people whose balances add up to zero is a candidate circle, and the program picks the partition with the most circles, which is the true minimum, for groups up to 16 people with a balance. For larger groups it uses a simple matching of the biggest debtor to the biggest creditor, which never needs more than one fewer payment than the number of people.
Entering results instead of balances
You can mix formats. A line like "Mike pays Sam 30", "Mike owes Sam 30", "Sam beat Mike 30" or "Sam won 30 from Mike" is converted into the two balances for you. Names are matched exactly, so keep the spelling the same.
If the numbers do not add up
Every dollar won is a dollar lost, so the balances must total zero. If they do not, the calculator tells you by how much, which usually means a missing person or a typo.
The calculator only does arithmetic. It never holds, moves or takes a share of money. People pay each other directly.