Formulas
Writing the figure, when a fixed number will not do.
A Formula block works its amount out each month instead of paying a number you typed. The figure keeps up with the model on its own, so you do not have to come back and change it.
A transfer written as #Current account.spare saves whatever the month had left. One written as #DC pension.balance * 4% / 12 draws four per cent of the pot as it currently stands. Neither needs revisiting.
Where you write one
A formula goes in one place: a Formula block, dropped on a link between two balances the same way any other block is. See Links and blocks.
Every other block pays a stated amount. If you outgrow one, its editor offers Convert to formula. The block becomes a Formula block and hands you the expression it was running, ready to edit. A block whose amount is a drawn curve or a share of pay has nothing to hand over, so the button is greyed out. A pension contribution cannot be converted at all, because a plain formula carries no tax relief.
The whole language is listed beside the box: every symbol, function and value, what it does in plain words, and a worked example or two. Click any of them to insert it. Everything you can write is on the screen.
A formula is checked as you type. If something is wrong, a red warning appears at the right of the box. Hover it to see what is wrong, such as an unclosed bracket or a reference with no value chosen. The formula will not save until it is right. Cmd or Ctrl + Enter saves without reaching for the button.
Typing a figure
Most formulas are a number, and a number is enough.
- 2000
- Two thousand pounds. No commas, no pound sign.
- 50k, 1.2m
- Fifty thousand, and one point two million. Shorthand for long figures.
- 5%
- Five per cent. 0.05 means the same thing.
- + − × ÷ ( )
- Ordinary arithmetic, with the usual precedence. 60000 / 12 is a yearly figure paid monthly.
Where the figure sits decides what it means. The formula does not. On a block it is the amount paid that month, every month the block runs for.
Functions and operators
Beyond arithmetic there are a handful of functions. The reference beside the box lists each one by what it does, so you can pick one by meaning. Type its name if you already know it.
- the smallest of the values
- MIN(500, #Rainy day.balance) pays £500, or the balance, whichever is less. Use it for “as much as I can, up to a cap”.
- the largest of the values
- MAX(200, #Loan.balance * 2%) sets a floor of £200 under a payment.
- keeps a value between a floor and a cap
- CLAMP(x, 200, 800) is never less than 200 and never more than 800.
- the values added together
- SUM(#ISA.balance, #Savings.balance) counts two pots as one.
- the size of a value, ignoring its sign
- ABS(x) is the size of a figure, whichever way it goes.
- rounds to a number of decimal places
- ROUND(x) to the pound, ROUND(x, 2) to the penny.
- one value when a condition holds
- IF, IFS, AND, OR and NOT. See Conditions below.
- how many months until a month
- MONTHSTO(TAXYEAREND) is 12 in April and 1 in March. Use it to spread a sum evenly over what is left of the tax year.
- how far prices have risen so far
- PRICELEVEL is 1 in the first month of the run and higher every month after. Multiply a figure by it to keep its buying power. This is what choosing “grows with inflation” does for a stated amount.
- this year’s inflation rate
- CPI is the rate from your own inflation curve for the month being worked out.Covered in Inflation modelling.
Names are spelled the way a spreadsheet spells them. Type them in any case: min( becomes MIN( in the box. Precedence is a spreadsheet’s too, which differs from ordinary maths in one place. A leading minus binds tighter than a power, so -2 ^ 2 is 4.
The # menu: reading another node
Type # and start typing a node’s name to refer to it. Pick it, and you are asked which of its figures you mean. A node that holds several figures waits until you choose one. Only a node with a single readable figure fills itself in.
- 1The node, once placed. It shows as a pill.
- 2Which figure of it to read. Type a full stop after a pill to reopen this.
- its balance
- What the account holds this month as things stand, including money that has already arrived this month.Accounts, pots, properties and debts.
- money in
- What has come into it so far this month.
- money out
- What has left it so far this month.
- its amount
- What an income node pays this month, gross, before tax. Only income nodes have one.
- pension paid in
- What you have put into a pension out of a salary this month. Only a salary has it.
- what’s spare
- What this month brought into the account, less what has gone out and what its spending has already claimed. It is never the standing balance, and never more than the account actually holds.Any account, pot or property.
- allowance left
- The room left in a wrapper this tax year, with its own sub-caps and age limits already taken off. Only an ISA has one.
- the tax bill settled this month
- What the year’s income tax bill took out of the account this month. It is zero in the eleven months the bill does not fall due.Only the account that settles it.
- what’s due
- What the law requires you to repay this year, whether or not anything is paid. Only a student loan has one.
- its rate
- The annual rate it charges or grows at, as the node states it that month — a rate drawn to change over the run reads as whatever it has reached.Anything with a rate or a growth rate on it.
- what was borrowed
- What the debt started out owing: the amount drawn down against a purchase, or the balance it opened with. It stays put as the debt is paid down.Mortgages, loans and credit cards.
- its term, in years
- How long the debt runs for, as the node states it. Only a mortgage has one.
- its monthly repayment
- What the lender asks for: the payment that clears it by the end of its term, settled when the mortgage is taken out. It holds still until the rate moves, and is then worked out afresh on what is still owed over the years that are left — so paying extra brings the end forward rather than lowering next month’s bill.Only a mortgage has one.
- interest just paid in
- The interest the account was paid going into this month, after any tax taken where it is held. An easy-access account is paid every month; a fixed-term deposit only in the month it renews.Savings and cash ISAs.
- spent this tax year
- What has gone into it since 6 April, up to the end of last month. It starts again at nothing each April, so a gift can be capped at a figure a year.Only discretionary spending.
- spent to date
- What has gone into it since the start of the run, up to the end of last month.Only discretionary spending.
- its floor
- The Floor set on the account this month, and zero where it has none.Cash, Savings, Premium Bonds, a Cash ISA and a Stocks & Shares ISA.
Only when a condition holds
A figure can apply only in the months a condition holds. Write IF, then the test, then the value:
IF(#Rainy day.balance < 15000, 1000)
Save £1,000 a month, but only while the savings account is under £15,000. Once it is over, nothing moves.
IF(#Current account.balance > 20000, 800, 300)
Save £800 in a month that starts flush, and £300 otherwise. Leave the last value off and nothing moves in the months the test fails.
The comparisons are >, >=, <, <=, = and <> for “is not”. The reference lists them beside the maths symbols.
For more than two cases use IFS. It takes a test and a value, over and over, and answers with the first test that holds. End it with TRUE and a value to give it a fallback:
IFS(#Pot.balance < 10000, 1000, #Pot.balance < 50000, 500, TRUE, 250)
£1,000 a month while the pot is small, £500 as it fills, £250 once it is comfortable.
AND, OR and NOT combine tests. IF(AND(#Pot.balance < 10000, #Cash.balance > 2000), 500) pays only when the pot is short and there is cash to spare. If no test holds and there is no fallback, the answer is zero and nothing moves that month.
Worked examples
Everything above, put to work. Node names are the ones you gave your own nodes.
2500
A flat £2,500 a month.Any transfer.
50k / 12
An annual figure paid monthly. Easier to check against a payslip than typing 4166.67.A monthly transfer.
MIN(500, #Current account.balance)
Move £500 into savings, or whatever is in the account if it is short. A lean month does not empty it.A monthly transfer.
#Current account.spare
Sweep whatever the month had left once the spending was done. This is the ready-made Sweep block, written out.A transfer from the current account into savings.
MIN(MAX(0, #Savings.balance), #Stocks ISA.allowance)
Whatever the account holds goes into the ISA until the year’s allowance is used up, and nothing past it. This is the ready-made Fill the ISA block, written out.A transfer from savings into an ISA.
#Stocks ISA.allowance / MONTHSTO(TAXYEAREND)
An even share of whatever allowance is left, spread over the months to April, so no lump lands in March.A transfer into an ISA.
#Mortgage.balance
Clear the whole mortgage. Repayments stop at the balance, so nothing is overpaid. The money has to be in the account.A one-off transfer, in the month you would redeem it. This is the ready-made Clear a debt in one month block, written out.
#Mortgage.balance * (1 - (1 + #Mortgage.rate) ^ (-1 / 12))
A month of interest and nothing more, so what is owed stays exactly where it is. This is the ready-made Interest only mortgage block, written out.A transfer into a mortgage.
IF(#DC pension.balance > 250000, 1500)
Draw £1,500 a month, but only once the pot has reached £250,000.A transfer out of a pension into a cash account.
#DC pension.balance * 4% / 12
The four per cent rule, month by month: a twelfth of 4% of the pot as it currently stands.A transfer out of a pension.
What a formula does not do
A formula is arithmetic over figures the model already knows. Four things are deliberately left out of it.
- Dates
- A month can be written as 2030-01, four digits then two, but only as something to count towards, as in MONTHSTO. To set when something starts and stops, use the block’s own timing line. To change a figure part-way through the run, draw it as a curve.
- Periods
- No units, and no “per month”. A block pays every month of the span it runs for. The figure is what moves each time.
- Growth
- How a figure moves over the run is a setting beside it: flat, rising with inflation, or a curve you draw. A formula does not have to reproduce it. Inside a Formula block, PRICELEVEL is the price level for the month, so 2000 * PRICELEVEL is 2,000 in today’s money.See Inflation modelling.
- Tax
- Never write tax into a formula. The kind of block you choose states what sort of payment it is, and the app applies the rules.
Two things worth knowing about the arithmetic itself:
- Dividing by zero gives zero. One empty account cannot break every figure downstream of it.
- A negative result on a transfer sends the money the other way along the link. The pension blocks never do that. They stop at zero.