Expense Splitter

Split a group expense evenly or by custom shares (percentages or fixed amounts). Output per-person totals + transfer instructions ('A owes B €X').

Greedy algorithm: largest debtor pays largest creditor until everyone clears. This is usually optimal but not always provably minimum for adversarial cases.

What this does and when it's useful

This is the "we went on a weekend trip and now we need to figure out who owes who" calculator. You list the people in the group, log who paid what, mark who that expense was for, and the tool computes (a) each person's net position and (b) the minimum number of bank transfers that settles everyone up. Everything runs in your browser — no server, no signup, no accounts to share.

How to use it

  1. Add members. Type each person's name and press Enter or "Add member".
  2. Add expenses. For each one: who paid (the person who fronted the money), how much, and who it should be split among. You can split:
    • Equally — uncheck anyone who shouldn't be included (e.g. a vegetarian skipping the steak dinner).
    • By percentages — for cases like "Alice 50%, Bob 30%, Charlie 20%". The tool warns if your percentages don't add to 100 but will still split proportionally.
    • By fixed amounts — for cases like "Alice owes €15 for her wine, Bob owes €5 for his coffee". The fixed amounts should sum to the expense; the tool warns if they don't.
  3. Read the balances. Each person ends up with a single net figure — positive means they're owed that much, negative means they owe.
  4. Settle. The tool computes the actual transfers needed. With 4 people who all owe each other small amounts, the worst case is 3 transfers (n−1), not 12 (n·(n−1)).
  5. Share. Click "Save state in URL" — the whole group state goes into the URL fragment. Send the link to the group; they see the same state.

About "minimum transfers"

The true minimum-transactions debt-simplification problem is NP-hard, so this tool uses a greedy algorithm: repeatedly take the largest debtor and the largest creditor, and have the debtor pay the creditor either the full debt or the full credit, whichever is smaller. This produces an optimal answer for almost every real-world group settlement (it's only suboptimal in adversarial cases where pairings let one person settle two debts in one transfer). For 99% of weekend-trip and dinner-tab scenarios you'll see, the greedy result is the minimum.

A property worth knowing: with n people who all owe each other, the minimum is at most n−1 transfers — because each transfer can fully settle at least one person, leaving n−1 people, n−2 people, etc.

Currency handling

One group = one currency. If you mixed currencies on a trip (paid hotel in EUR, restaurants in CZK, etc.), the honest answer is to convert each expense to a common currency before entering it, using the actual rates from each transaction (bank statements). Doing FX conversion live inside the splitter would mean fetching live rates and would introduce rounding ambiguity over who paid what. Better to lock the rate per transaction.

Sharing safely

The "Save state in URL" button base64-encodes the entire group state — names, amounts, payer info — into the URL fragment. Browser fragments are not sent over HTTP, so the data never reaches a server. But the URL itself contains the data, so anyone with the link can read everything. Share it through your trip's group chat, not in public.

Common gotchas