Variables & Line References

Because words make more sense than un-named numbers.

Declaring a variable

Soulver lets you create variables like in a programming language. You "declare" a variable with the equals symbol '='.

discount = 10% | 10%
cost = $550 | $550
cost - discount | $495.00

Variable can be a single word or an entire phrase.

You can't use a variable before it has been declared. This behaviour matches most programming languages.

Changing variables' values

A variable can be redefined by simply giving it a new value. The most recently defined value will be used on subsequent lines.

monthly rent = $1,900 // 2018 | $1,900
monthly rent = $2,150 // 2019 | $2,150
monthly rent / 4 people | $537.50

You can 'peek' at a variable's current value by holding down the shift key, and hovering over the variable.


Instead of typing out a long variable name, you can hit the escape key and return to auto-complete the variable.

Press escape to autocomplete long variable names

Global variables

You can make variables that work across all your sheets. Go to Preferences > Calculator > Global variables and add a new variable by clicking the plus button.

Line References

Soulver lets you reference previous lines' answers in your calculations, like a spreadsheet. You can go back and edit a previous line, and any lines that refer to will recalculate automatically.

To reference a previous line:

1. Drag in the answer from the line you want to reference:

Dragging in a previous line to make a line reference

You can also just double click the answer to insert a reference to it

2. Type an operator (like +) immediately after typing return to start a new line:

Typing an operator after return to make a line reference.

You can also insert a reference to the previous line using the keystroke ⌘\.

Note: you can only reference a line above your current line.

If you want to disable a reference, but keep an expression in its current state, you can right-click on a reference and choose 'Unlink'.