Free RUBS calculator for splitting utility bills
Split a building's utility bill across its units by occupants, square footage, bedrooms or a mix. Every charge comes with the formula behind it, and nothing you enter leaves your browser.
How RUBS works
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.
This calculator works in three steps:
- It takes any common area deduction off the top. The owner pays it.
- It splits what's left by each method's share. With square footage at 50%, half of what's left is split by each unit's floor area.
- It rounds every charge to the cent with the largest remainder method, so the charges and the owner's part add up to the bill exactly and nobody is more than a cent off.
A unit occupied for part of the period pays for the days it was occupied. By default, the owner pays for the days a unit was empty. Occupants are the exception: an empty unit has no occupants, so it has no occupant share to pay.
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. This calculator does the math, and it isn't legal advice.
Use it in your own code
The calculator is an MIT licensed TypeScript library with no dependencies.
npm install @quickcasa/rubs-calculator
import { allocateBill } from '@quickcasa/rubs-calculator'
const allocation = allocateBill({
totalCents: 41_218,
periodDays: 30,
methods: [{ factor: 'occupants', percent: 100 }],
units: [
{ id: '101', occupants: 2 },
{ id: '102', occupants: 3 },
],
})
The README covers every option.