The problem
Splitting a trip or a flat's bills means a spreadsheet nobody trusts or an app everyone has to sign up for. Rounding errors creep in, and people send more payments than needed.
Intended users
Flatmates, friends on a trip, small project teams and clubs who share costs now and then.
Solution
evenly is a static web page. Add people and expenses (who paid, who it is split between). It shows each person's balance and the shortest list of payments that settles everything. The group is saved in the browser and can be shared as a link; there is no server.
What was built during the hackathon
Everything in the repository: the settlement core (docs/evenly.js), the page, the tests and the benchmark. First commit on 1 Dec 2026.
Technologies
JavaScript (no frameworks, no dependencies), HTML, CSS, Node.js test runner, GitHub Pages.
How it works
Money is kept in whole paise or cents. The fewest payments equal the people with a balance minus the largest number of groups that cancel out among themselves; a dynamic programme over subsets finds those groups exactly for up to 16 people.
Results (real, from npm test and npm run bench)
- Payment count matched an exhaustive search in all 400 random test groups.
- In 2,000 random 12-person groups with round balances, evenly needed fewer payments than the usual largest-first method in 370 (18.5%). With uneven everyday splits the methods almost always tie (7 of 2,000).
Setup steps
Open the live link, or: git clone https://github.com/PrafullJ0shi/evenly, cd evenly, npm start, open http://localhost:8000 (Node 18+, Windows/macOS/Linux).
Challenges
Proving the payment list is really the shortest, and keeping every split adding up to the exact paisa.
What I learned
The "fewest payments" problem reduces to finding zero-sum subgroups; for real groups with uneven splits, the simple greedy method is nearly always optimal already, and I report that.
How it was built / AI use
This project was built with AI-assisted coding. Every number comes from a script in the repository.
Team
Solo — Prafull Joshi