boarding house rent tracker

Room Tally: A Free Boarding House Rent and Sub-Meter Ledger That Splits the Electric Bill Fairly

Efraim Ray Efraim Ray 0 Comments
Web App Showcase

Most boarding houses near schools have one electric meter from the co-op and a small sub-meter in every room. Each month the owner copies readings into a notebook, divides the bill by hand, splits the water and hallway lights, then chases partial payments while boarders question the math. I built Room Tally, a free web app that does that arithmetic the same way every month and shows each tenant exactly how their bill was made.

It handles per-room and per-bed rent, sub-metered electricity, the common-area share, water, extras, partial payments, carried balances and a late fee, all in pesos and all inside the browser. Nothing is uploaded, there is no server, and it works on a phone so a caretaker can collect door to door.

Type Web App
Stack Vanilla JS + localStorage
Frontend HTML / CSS / JS
Version v1.0.0
License Free · MIT
Room Tally boarding house rent and sub-meter ledger shown on a laptop and a phone

Try It: Split This Month's Electric Bill

This is a slice of the real billing engine with three rooms from the sample boarding house. Change the main bill or any room's current sub-meter reading and every share updates. Type a reading lower than last month to see the warning, then open the reminder for Grace in Room 5.

efraimray.github.io/room-tally/
Room TallyHillcrest Boarding House · sample data
October 2026 usage · due Nov 5

-

Room 14 beds · ₱1,800/bed · prev 4512
Electricity-
Each person-
Room 3twin · ₱4,500 · prev 2367
Electricity-
Each person-
Room 5solo · ₱3,800 · prev 1531
Electricity-
Each person-
Billed for these rooms: - · -

Three of six sample rooms, invented tenants. The full app adds payments, carried balances, late fees, backups and the other screens.

Room Tally in Pictures

Real screenshots of the working app with the sample boarding house loaded.

Sample 1: The Overview screen: totals for October, who still owes, and every room with its sub-meter reading.

Sample 2: Meter readings in dark mode: type a current reading and the room's electricity cost updates at once.

Sample 3: A bill reminder with rent, kWh, water, the carried balance and the due date, ready for SMS or Messenger.

Sample 4: The same ledger on a phone, so a caretaker can collect rent door to door.

Build Footprint & Quality Checks

Landlords open this on budget phones, so I kept it small and framework-free. These are the measured numbers from the v1.0.0 build:

19.3
Total JavaScript
KB gzipped
4.9
Stylesheet
KB gzipped
19
Automated Tests
node: all passing
0
External Scripts
no framework, no CDN JS

Technology Stack & Languages Used

Logic · 76% of code

Vanilla JavaScript

A pure billing engine that runs in the browser and in Node, plus the screens, forms and delegated events. No framework.

Design · 19% of code

CSS Custom Properties

Design tokens for light and dark themes, CSS grid layouts that fold to a phone tab bar, and odometer-style meter dials.

Structure · 5% of code

Semantic HTML5

One page with landmarks, a skip link, labelled tabs and form fields. GitHub Pages serves it as-is.

Data & Tests

localStorage + Node assert

Data stays on the device with JSON backup and CSV export. 19 Node tests cover splits, carry-over, late fees and reading checks.

Key Architectural Decisions

Pillar 01

Money in Centavos

Every peso amount becomes a whole number of centavos, and splits use the largest-remainder method, so ₱100 for three people is 33.34 + 33.33 + 33.33 and never ₱99.99.

Pillar 02

Bills Are Calculated, Not Stored

Only the inputs are saved: rooms, tenants, readings and payments. Bills are rebuilt from them each time, so fixing one reading corrects every share and every carried balance.

Pillar 03

Pure Engine, Thin UI

billing.js has no DOM code, so the same functions run in the browser and in the Node test suite. The screens only render its results.

Pillar 04

Private and Offline

No account and no server: data lives in the browser with try/catch around storage, user text is escaped before rendering, and backups are checked before import.

Exact Splits, Carried Balances & New Months

Three real excerpts from the source: the centavo helpers and rate, the carry-forward loop, and how a new month opens.

// assets/js/billing.js — exact pesos
/** Pesos (number or string) -> integer centavos. */
function toCents(value) {
  var n = typeof value === 'string' ? parseFloat(value.replace(/[^0-9.\-]/g, '')) : Number(value);
  if (!isFinite(n)) return 0;
  return Math.round(n * 100);
}

/**
 * Split an amount (centavos) into n parts that add up exactly.
 * The leftover centavos go to the first parts (largest-remainder method).
 */
function splitEven(cents, n) {
  if (!n || n < 1) return [];
  var base = Math.floor(cents / n);
  var rest = cents - base * n;
  var out = [];
  for (var i = 0; i < n; i++) out.push(base + (i < rest ? 1 : 0));
  return out;
}

/**
 * Electricity rate for a month in centavos per kWh (kept as a float for precision).
 * mode "auto": main bill amount / main bill kWh. mode "fixed": settings.fixedRate.
 */
function ratePerKwh(settings, month) {
  if (settings.rateMode === 'fixed') return toCents(settings.fixedRate || 0);
  var kwh = Number(month && month.mainKwh) || 0;
  var amt = toCents(month && month.mainAmount);
  return kwh > 0 ? amt / kwh : 0;
}
// assets/js/billing.js — balances move to next month
/**
 * Compute a month including balances carried from every earlier month in the data.
 * Unpaid balances move forward; overpayments become a credit (negative carry).
 */
function computeWithCarry(data, key, today) {
  var keys = Object.keys(data.months || {}).filter(function (k) { return k < key; }).sort();
  var carry = {};
  keys.forEach(function (k) {
    var r = computeMonth(data, k, today, carry);
    var next = {};
    r.bills.forEach(function (b) { if (b.balance !== 0) next[b.tenant.id] = b.balance; });
    carry = next;
  });
  return computeMonth(data, key, today, carry);
}
// assets/js/store.js — opening a new month
/** Start a new month: previous readings = last month's current readings. */
function startMonth(d, key, fromKey) {
  if (d.months[key]) return d.months[key];
  var from = d.months[fromKey] || {};
  var readings = {};
  d.rooms.forEach(function (r) {
    var last = (from.readings || {})[r.id];
    readings[r.id] = { prev: last ? Number(last.curr) || 0 : 0, curr: '' };
  });
  d.months[key] = { mainKwh: '', mainAmount: '', waterBill: from.waterBill || '', readings: readings, extras: [], payments: [] };
  return d.months[key];
}

# Run the tests (Node.js, no npm install)
$ node tests/billing.test.js
Room Tally billing tests
  ok  splitEven keeps every centavo (₱100.00 / 3)
  ...
19 tests passed

Development Roadmap & Milestones

Version 1.0.0 is released. The next milestones come from the project roadmap:

1

v1.0.0: Core Ledger (Released)

Sub-metered electricity, common-area and water splits, per-room and per-bed rent, payments, carried balances, late fee, reminders, JSON backup and CSV export.

2

Next: Printable Statements & Deposits

A print-friendly monthly statement per tenant and a deposits and advance-payment ledger.

3

Planned: Optional Sheets Sync

Opt-in sync to Google Sheets through Apps Script, so an owner and a caretaker can share one ledger.

4

Planned: Tenant View

A read-only share link where each boarder sees their own bill breakdown and payment history.

User Interface & Feature Showcase

Billed this month₱41,973.05
Collected₱14,787.53
Still to collect₱27,185.52
Electric rate₱12.30/kWh
Overview

The Month at a Glance

Billed, collected and still to collect, with the rate taken from the main bill.

RoomPrevCurrkWhCost
Room 145124731219₱2,693.70
Room 240014188187₱2,300.10
Room 453545598244₱3,001.20
Room 515311659128₱1,574.40
Meter readings

Type the Reading, Get the Cost

Each room's sub-meter kWh times the rate, with warnings for impossible readings.

Hi Jun! This is Hillcrest Boarding House.
October 2026 bill for Room 2:
- Rent: ₱1,800.00
- Electricity (62.33 kWh): ₱766.70
- Common area share: ₱69.70
- Water: ₱110.00
- Previous balance: ₱1,327.05
Balance: ₱4,073.45 (due 2026-11-05)
Bills

Reminders Boarders Can Check

One click copies a polite message with the full breakdown and carried balance.

Project Links, Code & Documentation

Open the Live App

Runs in your browser with the sample boarding house loaded. Start your own ledger from Settings when you are ready.

Launch Room Tally

GitHub Repository

Browse the source, download the v1.0.0 release, or open an issue. Free and open source under the MIT license.

View on GitHub

How It Was Built

The build log lists the languages used, every step, the test results and the problems fixed along the way.

Read the Build Log
Engineering Takeaway

Fair Bills Make Fewer Arguments

Splitting one electric bill across a dozen boarders sounds like simple division until you add sub-meters, hallway lights, water, partial payments and last month's balance. Room Tally keeps every centavo accounted for and shows the work. Want it set up for your boarding house or dorm, or a custom version with cloud sync?

Frequently Asked Questions

Is Room Tally free to use?

Yes. Room Tally is open source under the MIT license, so you can use it for your own boarding house, change it, or set it up for clients without paying anything.

Do I need WordPress, Blogger or special hosting to run it?

No. Room Tally is a standalone web app, not a WordPress plugin. Open index.html in a browser, or upload the folder to GitHub Pages, Netlify or any shared hosting.

What do I need to use it?

A modern browser such as Chrome, Edge, Firefox or Safari on a computer or phone. There is nothing to install and no coding needed; Node.js is only required if you want to run the automated tests.

Is my tenants' data uploaded anywhere?

No. Rooms, tenants, readings and payments are saved only in your browser on that device. Use the JSON backup in Settings to keep a copy or move it to another device.

How does it split the electric bill when every room has a sub-meter?

It divides the main bill amount by the main meter kWh to get the rate, charges each room its own kWh times that rate, and splits it among the people in the room. The leftover kWh for hallways, kitchen and pump is shared equally by all tenants, and all math is done in centavos so the parts always add up.

Can you set this up for my business website?

Yes. I can set up Room Tally for your boarding house, dorm or apartment, rebrand it with your name and colours, load your rooms and tenants, and host it on your own domain. Contact me here.

The boarding house, tenants, readings and amounts in the demo are invented sample data. Room Tally is a record-keeping aid and does not issue official receipts.

Efraim Ray
Written by

Efraim Ray

Software Developer and AI Specialist. BS Information Technology graduate. I pride myself on being conscientious, attentive to detail, and always open to learning — because the best solutions come from listening, taking notes, and exploring what's next.

Comments