What This Calculator Does
When friends travel together, one person often books the hotel, another buys gas, a third covers dinner. By the end of the trip nobody knows who owes what. This Group Trip Cost Split Calculator adds up every payment, divides the total equally between everyone, and then works out the simplest set of transfers so everybody ends up having paid the same amount.
How to Use It
Set the number of people in your group, then enter how much each person actually paid toward shared costs. Leave anyone who paid nothing at zero. Hit calculate and you'll see the equal share per person, the total trip cost, and a list of payments — "Person A pays Person B $X" — that settles everyone up with the fewest transactions.
The Formula Explained
First we compute each person's fair share: \(\text{Share} = \text{Total Paid} \div N\). Then each person's balance is \(\text{Balance} = \text{what they paid} - \text{share}\). A positive balance means they overpaid and are owed money; a negative balance means they underpaid and owe money. A greedy matching algorithm repeatedly sends money from the largest debtor to the largest creditor until every balance is zero, which keeps the number of transfers small.
$$\text{Share} = \frac{\text{Total}}{\text{People}}, \qquad \text{Balance}_i = \text{Paid}_i - \text{Share}$$
Worked Example
Three friends go away. Person 1 paid $120, Person 2 paid $30, Person 3 paid $0. The total is $150, so each owes $50. Balances are +$70, −$20, −$50. Person 3 pays Person 1 $50 and Person 2 pays Person 1 $20 — now everyone has effectively paid $50.
$$\text{Share} = \frac{150}{3} = 50$$$$\text{Balance}_1 = 120 - 50 = +70, \quad \text{Balance}_2 = 30 - 50 = -20, \quad \text{Balance}_3 = 0 - 50 = -50$$
More Worked Examples: Larger Groups and Uneven Payments
Both examples use the same method: share = total ÷ people, then balance = paid − share. Positive balances are creditors, negative balances are debtors. Greedy matching pairs the largest debtor with the largest creditor until everyone is at zero.
Example 1: Four friends (paid $200, $80, $40, $0)
- Total: \(200 + 80 + 40 + 0 = 320\).
- Equal share: \(\frac{320}{4} = 80\).
- Balances: Person 1 \(200 - 80 = +120\); Person 2 \(80 - 80 = 0\); Person 3 \(40 - 80 = -40\); Person 4 \(0 - 80 = -80\).
- Check: \(120 + 0 - 40 - 80 = 0\).
- Only Person 1 is owed money. Person 4 (largest debtor) pays Person 1 $80, leaving Person 1 owed $40. Person 3 then pays Person 1 $40.
Result: 2 transfers ($80 + $40). Total sent = $120 = total received by Person 1 = $120, so the transfers net to zero. Person 2 is already even and pays nothing.
Example 2: Five people (paid $300, $150, $50, $0, $0)
- Total: \(300 + 150 + 50 + 0 + 0 = 500\).
- Equal share: \(\frac{500}{5} = 100\).
- Balances: A \(300 - 100 = +200\); B \(150 - 100 = +50\); C \(50 - 100 = -50\); D \(0 - 100 = -100\); E \(0 - 100 = -100\).
- Check: \(200 + 50 - 50 - 100 - 100 = 0\). Creditors are owed \(200 + 50 = 250\); debtors owe \(50 + 100 + 100 = 250\).
Greedy matching, step by step:
- Largest creditor A (+200) and largest debtor D (−100): D pays A $100. A is now owed $100; D is settled.
- A (+100) and next debtor E (−100): E pays A $100. Both are settled.
- Remaining creditor B (+50) and debtor C (−50): C pays B $50. Both are settled.
Result: 3 transfers, which is within the maximum of N − 1 = 4. Total sent: \(100 + 100 + 50 = 250\). Total received: A \(100 + 100 = 200\) plus B \(50\) = 250. Sent equals received, so the net is zero.
Key Terms Explained
- Shared cost
- Any expense the whole group agrees to split, such as lodging, rental car, fuel or group meals.
- Equal share
- The total of all shared costs divided by the number of people. It is what each person should ultimately bear.
- Balance
- What a person paid minus their equal share. A positive balance means they overpaid and are owed money; a negative balance means they underpaid and owe money.
- Creditor
- A person with a positive balance, who is owed money by the group.
- Debtor
- A person with a negative balance, who owes money to the group.
- Settlement transfer
- A single payment from a debtor to a creditor that reduces both of their outstanding balances.
- Greedy matching
- A simple method that repeatedly pairs the largest debtor with the largest creditor and settles as much as possible. It gives a short list of payments, with at most N − 1 transfers for N people.
- Rounding residual (cents)
- A difference of a cent or so that appears when the total cannot be divided evenly into cents, for example $100.00 among 3 people gives $33.33 each, which totals $99.99.
Interpreting Your Settlement Results
- Positive balance: the person paid more than their equal share, so they are owed money. Negative balance: the person paid less than their share, so they owe money.
- Balances sum to zero: because the share is the total divided by the number of people, \(\sum \text{Balance}_i = \text{Total} - N \times \text{Share} = 0\). What creditors are owed always equals what debtors owe.
- Sent equals received: the sum of all payments sent in the settlement equals the sum of all payments received. If you add up your transfer list and the two totals differ by more than a cent, recheck the inputs.
- Number of transfers: with N people, at most N − 1 payments are needed. Often fewer are needed, since people with a zero balance pay nothing and some debts match a creditor exactly.
- Rounding: when the total does not divide evenly, a difference of one cent can appear between shares or transfers. This is normal, and the group can let one person absorb the extra cent.
- Only entered costs are split: the calculator divides exactly what you enter. Leave out personal expenses, such as souvenirs or an individual's extra drinks, unless everyone agreed to share them. If someone did not take part in a cost, split that cost separately.
This is general information to help organize shared expenses, not financial advice.
FAQ
Does this split costs unequally? No — this version divides the total equally among everyone. Each person ends up contributing the same amount.
What currency does it use? It's currency-agnostic; just use the same currency for every entry.
Why is the number of transfers minimized? Fewer payments means less hassle. The greedy algorithm matches biggest creditor with biggest debtor to reduce how many times money changes hands.