Skip to content

N0ahTM/HouseSplit

Repository files navigation

GitHub Pages GitHub release (latest by date) License JavaScript

HouseSplit repository preview

Star this project

HouseSplit is a small mobile-first rent calculator for housemates. It splits a monthly rent by nights stayed and by the number of people present each night, so solo nights, shared nights, and vacancy nights are handled explicitly.

Open the live app: n0ahtm.github.io/HouseSplit

Built with plain JavaScript, HTML, and CSS. No backend, no accounts, no build step.

Quick Start

  1. Open HouseSplit on your phone.
  2. Enter the monthly rent, month, currency, and housemates.
  3. Add arrival and checkout dates for each person's stays.
  4. Choose how empty nights should be handled.
  5. Copy the summary and send it to your group chat.

On iPhone or Android, add the site to your home screen to use it like a small app. See Usage.

Features

  • Mobile-first interface for iOS and Android browsers.
  • Installable PWA when opened from the GitHub Pages HTTPS URL.
  • Install prompt sheet for browser users on supported desktop and mobile browsers.
  • Native-app style top bar, safe-area spacing, bottom tabs, and mobile sheets.
  • German and English UI with localized status messages and share text.
  • Light, dark, system, high contrast, Liquid Glass, and solid-surface display modes.
  • Compact result, setup, person, and night-plan sections.
  • Local saved-person suggestions for recurring housemates.
  • Online ECB reference-rate conversion through the Frankfurter API.
  • Per-person payment currencies with live ECB-rate display.
  • Per-person stay ranges with multiple ranges per person.
  • Nightly rent splitting by actual occupancy.
  • Vacancy handling: show separately or distribute across all people.
  • Exact cent-based rounding so totals remain consistent.
  • Copyable and system-shareable text summary for messages.
  • Local browser storage only.
  • Offline support after the first hosted load.
  • Single-file offline copy can be generated locally for file sharing.

Calculation Model

HouseSplit first splits the monthly rent across every night in the selected month. Arrival dates count; checkout dates do not count. For each night:

  • if one person is present, that person pays the full nightly amount;
  • if multiple people are present, the nightly amount is split equally;
  • if nobody is present, the amount is either shown as vacancy or split across all people, depending on the selected setting.

The app calculates in cents and distributes rounding leftovers deterministically.

Preview

HouseSplit mobile preview

Development

Run locally with any static server:

python -m http.server 4173

Then open:

http://localhost:4173

Run checks:

npm test
npm run check

Documentation

Privacy

HouseSplit stores data locally in your browser. It does not send rent data, names, dates, or calculations to a server. See Privacy.

License

MIT License. See LICENSE.