Functional Weave
Code in TypeScript

property.rental-yield@1.0.0

README.md

1,012 bytes · view raw

# property.rental-yield

The two headline numbers for a let property:

- **Gross yield**: annual rent as a share of the property's value.
- **Net yield**: annual rent less the landlord's running costs, as a share of
  the value.

Both are integer basis points (600 = 6.00%), rounded half-up (a half basis
point away from zero), once, from the exact ratio. The net income behind the
net yield is returned too, so a caller never recomputes it.

## Edge cases

- Costs above the rent give a negative net yield and a negative net income;
  that is an answer, not an error.
- A zero rent gives a zero gross yield.
- All three amounts must be in one currency, and the value must be greater
  than zero.

## What it does not do

Mortgage interest, tax, voids and capital growth are the caller's to fold into
the costs (or not). "Net yield" has no statutory definition; this is the plain
(rent − costs) / value that letting agents quote. Rent and value up to
£900 million keep the arithmetic exact in every language.