Skip to content
Varlig Guide
Varlig home

Your first calculation

Calc blocks let you work out costs, quantities and times right next to the plan they belong to. This page takes you from an empty block to a small budget that updates itself whenever you change a number.

Add a calc block

Put the cursor on an empty line and choose Format › Calculation Block, or press ⌘Y. Varlig inserts an empty block, ready for your first line.

You can also type the block yourself. Start a line with three backticks and the word calc, write your calculations underneath, and close the block with three backticks:

```calc
£3.40 * 5
```

Type a line, see the answer

Each line is one calculation. As you type, its answer appears on the right.

calc
£3.40 * 5 gives £17.00
45 min + 1 hour 20 min gives 2 hours 5 min
2.5 km in m gives 2,500 m
20% off £80 gives £64.00
split £90 among 3 people gives £30.00

Lines can read the way you’d say them, so split £90 among 3 people gives the same answer as £90 / 3.

Click an answer to copy its exact value, ready to paste into an email or another app.

Start a line with # and a space to give a block a heading or leave yourself a note. Varlig skips that line and shows no answer.

Give values names

Write a name, an equals sign and a value. The line shows the value, and every line below can use the name.

calc
# Dinner party
guests = 6 gives 6
price = £18 gives £18.00
food = guests * price gives £108.00
drinks = £45 gives £45.00
food + drinks gives £153.00

Names can be more than one word, so ticket price = £18 works too. Named values make a block read like a sentence, and they are what make the next step possible.

Change a number and watch everything update

Two more friends are coming. Change guests = 6 to guests = 8, and every line that uses guests recalculates as you type:

calc
# Dinner party
guests = 8 gives 8
price = £18 gives £18.00
food = guests * price gives £144.00
drinks = £45 gives £45.00
food + drinks gives £189.00

This is the everyday habit worth building: write the plan once, then try out “what if” by editing a single value.

Names carry into later blocks

A name you define stays available in every calc block further down the same note, so you can write freely between calculations:

## Lisbon
```calc
hotel = €145 * 2
flights = €89 * 2
```

Sam and I are splitting everything.

```calc
(hotel + flights) / 2
```

The last block shows €234.00. Names belong to their note, so a hotel in one note never changes the answers in another.

The summary under each block

Each calc block shows a small summary beneath it, the Total of its answers to begin with. Click the summary to switch to Average, Median or Count, or to copy the value. Every block remembers its own choice, and you can hide a block’s summary from the same menu.

Options for a single line

Right-click a calculation line or its answer, then open Calculation Line:

Option What it does
Answer Format Sets decimal places, thousands separators, large number notation and currency rounding for this line only. Reset Answer Format goes back to your defaults.
Subtotal Shows the sum of the answers above, back to the previous subtotal. Use it to total each section of a longer budget. A line that says only sum or total does the same.
Time Point Marks a fixed time, such as when you set off. The duration lines around it show the clock times they cover, which helps when planning a day or a journey.
Expression Turns a subtotal or time point back into an ordinary line.
Plot Function… Opens a graph of the line’s expression. Choose the variable and range, then click Plot. Your note isn’t changed.

Settings for calculations

Settings › Calculations sets the defaults for every calc block. Choose Apply to save your changes.

Section What you can set
Numbers Number format (how decimals and thousands are written where you live), and converting foreign numbers when you paste them
Answer Formatting Decimal places, thousands separators and notation for large numbers
Currency Rounding to currency precision, currency symbols and trailing zeros
Calculation summary Whether blocks show a summary, which statistic it starts with, and which lines it includes
Variables Updating later references when you rename a value
Everyday calculations Hours per workday, and the name and rate of your sales tax
Shared definitions A Definition sheet of values and custom units available in every note
Workday holidays Dates to skip when counting workdays, one per line
Exchange rates Hourly refresh of currency and crypto rates, and a Refresh Now button

Exchange rates need an internet connection. Everything else in a calc block, including units and amounts in a single currency, works offline.

calcAnswers depend on today’s date or live data
£24 in USD gives $32.40

Where to go next

You now know enough to use calc blocks every day. When you want more, these guides show what a single line can do: