FairSplit helps roommates, housemates, or small households split their electricity bill fairly and transparently.
FairSplit is a small web app that calculates each person's share of an electricity bill based on configurable usage and cost-sharing rules. It is designed to be simple, privacy-friendly (runs locally in the browser), and lightweight — no backend required.
- Simple, client-side UI: open
index.htmland run locally. - Multiple people: add household members and their usage figures.
- Custom billing: set total bill amount, fixed fees, and per-user adjustments.
- Export/print results: copy the breakdown or share to WhatsApp or print the page for records.
Splitting utility bills by headcount can be unfair when usage differs between people. FairSplit provides a configurable, transparent way to allocate costs so each person pays their fair share.
index.html— main UIscript.js— front-end logic and calculationsstyle.css— stylingassets/— images or icons (if any)
Option 1 — Open locally (simplest):
- Double-click
index.htmlto open it in your browser.
Option 2 — Run a local static server (recommended for modern browser behaviors):
python -m http.server 8000
Then open http://localhost:8000 in your browser.
Or use an editor extension like Live Server in VS Code.
- Open the app in your browser.
- Enter either unit or total electricity bill.
- Add members and enter each person's usage (how many day a person sayed).
- Review the calculated shares — you can copy or share to WhatsApp.
The app accepts per-person usage numbers (in days) and allocates the bill proportionally. Unit will be calculate to bill or vice versa and bill will be split among the people. The calculation is done entirely in the browser using script.js.
To modify the app:
- Edit
index.htmlfor structure and markup. - Edit
style.cssto change appearance. - Edit
script.jsto adjust calculation logic.
Suggested workflow:
- Open the project in your editor (e.g., VS Code).
- Serve with
python -m http.serveror Live Server. - Make changes and refresh the browser.
Contributions are welcome. Please open an issue for feature requests or bugs. For code contributions, fork the repo and submit a pull request with a clear description of the change.
This project includes a LICENSE file in the repository. Refer to it for license details.
If you have questions or suggestions, open an issue or contact the maintainer.