Free calculator

Who pays whom: the fewest payments

Enter each person's balance, or the results between pairs. The calculator works out the smallest number of payments that settles everybody.

One per line. Either a balance (Sam, +30 for a person who is owed, Mike, -30 for one who owes) or a result (Mike pays Sam 30, or Sam beat Mike 30). Balances must add up to zero.

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.

Frequently asked questions

What is the minimum number of payments to settle a group?

It is the number of people with a balance minus the number of separate groups that net to zero among themselves. The calculator finds that for you.

Can I enter who beat whom?

Yes. Lines such as "Sam beat Mike 30" are turned into balances automatically.

Why do my balances not add up?

A missing player or a typo. Money won must equal money lost across the whole group.

Does this send or hold any money?

No. It only tells you who should pay whom. Players settle directly with each other.

Is Hole19Tally a betting app?

Hole19Tally is a scorekeeper. It records scores, works out strokes and shows who owes whom, but it never holds, moves or takes a share of money, and it is not a gambling service. Players settle up directly with each other.

Score it in Hole19Tally

Hole19Tally is a scorekeeper. It records scores, works out strokes and shows who owes whom, but it never holds, moves or takes a share of money, and it is not a gambling service. Players settle up directly with each other.

Related games

Related calculators

Related guides

Organize an outingTry the app