All projectsSchedule 3 to Form OSS-1
RUBS calculator
Split a building's utility bill across its units, with the formula behind every charge.
Web app and library
MIT
$0.00
No
npm install @quickcasa/rubs-calculator
What RUBS is
RUBS, or ratio utility billing, splits one master-metered utility bill across the units in a building that don't have their own meters. Each unit pays in proportion to something you can count, such as the people living there or the size of the unit.
What it handles
- Splitting by occupants, square footage, bedrooms or a flat amount per unit, or any mix of them by percentage.
- A common area deduction, as a percentage or a fixed amount, which the owner pays.
- Units occupied for part of the billing period. By default the owner pays for the days a unit was empty, or you can split them across the occupied units.
- Weights by count, so a second occupant can count for less than the first, or a studio can count the same as a one bedroom.
- Rounding to the cent that always adds up. The charges, the common area and the owner's share for empty units total the bill exactly, and no amount is more than a cent from its exact value.
- A plain-language formula for every charge, to check by hand or show a tenant.
How the split works
- The common area deduction comes off the top.
- Each method splits its percentage of what's left. A unit's part is the method's amount times the unit's weight, times the share of the period it was occupied, divided by the total weight of every unit.
- Every amount is rounded down to the cent, and the cents left over go one at a time to the amounts that lost the most in rounding. On a tie, the owner pays the extra cent before any tenant does.
Use it in your own code
The calculator is a TypeScript library with no dependencies, for Node.js 22 or later and any current browser bundler. Amounts are whole numbers of cents, so no money is lost to floating point. The README on GitHub covers every option.
Before you bill tenants
Rules for billing tenants for utilities differ by province, state and city, and your leases have to allow it. Check what applies to your buildings before you send a bill. The calculator does the math, and it isn't legal advice.
Questions
Does the calculator send my numbers anywhere?
No. The calculator page runs entirely in your browser and sends nothing anywhere.
Can I import my units from a spreadsheet?
Yes. The calculator page imports units from a CSV file, and it can download the charges as a CSV too.
Who pays for a vacant unit?
By default the owner pays for the days a unit was empty. You can choose to split the whole bill across the units that were occupied instead.