Skip to content
Varlig Guide
Varlig home

Natural-language phrases

Varlig understands a set of everyday English phrases as well as symbols. Reach for them when a line reads better in words: splitting a bill, pricing a few items in a basket, or taking three quarters of a recipe.

This page explains the rules behind those phrases: how Varlig reads a line, how numbers and fractions are spelt out, and how phrases combine. It isn’t free text, though. The full list is in the phrase reference. Percentage questions are covered in Percentages, and word forms of functions such as square root of 16 in Word-based mathematics.

How Varlig reads a phrase

A note mixes writing and maths, so Varlig reads each calculation line in two steps:

  1. It tries the whole line as a calculation, using every phrase Varlig knows. If the line fits, you get the phrase’s answer.
  2. Only if that fails does it set aside the words it doesn’t know and work out what’s left.

That means everyday phrases work on a line of their own, with nothing to put in front of them, while a line with a few stray words still adds up:

calc
two and a half hours in minutes gives 150 min
$62 with 18% tip gives $73.16
a third of £90 gives £30.00
5 apples + 3 oranges gives 8

You can still start a line with what is or calculate if you like how it reads. Varlig treats what is a third of £90 and a third of £90 the same way.

A short description around a phrase is fine: Varlig sets aside a few plain words before or after it, so coat £45 with 20% VAT and £45 with 20% VAT please still add the VAT, and 65 kg in pounds for the team still converts. For longer notes, or to be certain, put the description in a label or a comment:

calc
coat £45 with 20% VAT gives £54.00
£45 with 20% VAT please gives £54.00
65 kg in pounds for the team gives 143.3004704202 lb
Coat: £45 with 20% VAT gives £54.00
£45 with 20% VAT # new winter coat for Sam gives £54.00

Phrases that already name what they count, such as split £90 among 3 friends, need to end there: add a comment rather than more words after the noun.

Writing a calculation line covers comments and labels.

Numbers in words

Whole numbers can be written out, with or without and and hyphens:

calc
twelve hundred gives 1,200
one hundred and twenty gives 120
twenty-five plus five gives 30

For decimals, say point and then each digit on its own. one point two five is 1.25; one point twenty five isn’t accepted.

calc
three point one four gives 3.14
one point two five times four gives 5

Fractions

Spoken fractions work with of, and as mixed numbers in front of a unit:

calc
three quarters of 200 gives 150
two thirds of 450 g gives 300 g
a quarter of 200 gives 50
third of 90 gives 30
two and three quarters hours gives 2.75 hours

The denominators are half, third, quarter (or fourth), fifth, sixth, seventh, eighth, ninth and tenth, plus their plurals such as thirds and halves. The a is optional, so quarter of 100 is 25, while third of March is still a date. Fractions stay exact, so one third times three is exactly 1, not 0.9999999999.

Parts of an hour read the way you’d say them, and come out in hours and minutes:

calc
half an hour + 20 min gives 50 min
quarter of an hour gives 15 min
an hour and a half gives 1 hour 30 min

Arithmetic in words

Use plus, minus, times, multiplied by and divided by, mixed freely with digits and symbols. The usual order of operations applies: multiplication and division come before addition and subtraction. Use parentheses to group things differently.

calc
fifty times twenty plus ten gives 1,010
twenty divided by five plus two multiplied by three gives 10
(two plus three) times four gives 20
seven times £8.50 gives £59.50

Shopping: items, discounts, tax and tips

N items at P each multiplies a count by a price. Use whatever word suits the purchase in place of items, such as tickets, coffees or bottles, and leave out each or write @ when that reads better. after P% discount and with P% off take a percentage off the amount before them, and with P% tax, with P% VAT, with P% GST or with P% tip add one on. Capitals don’t matter, so with 20% vat works too.

calc
3 tickets at £12.50 each gives £37.50
3 coffees @ £2.80 gives £8.40
2 adults at £15 + 3 children at £8 gives £54.00
£15 each for 4 people gives £60.00
£80 after 25% discount gives £60.00
£80 with 25% off gives £60.00
£45 with 20% VAT gives £54.00
$62 with 18% tip gives $73.16
5 items at $20 each after 15% discount with 8% tax gives $91.80

The count can be a whole number or a fraction, so the same form prices things sold by weight or volume. What each one holds can be a price, a plain number or a measurement, and items is an ordinary plural noun, so it needs no each of its own.

calc
2.5 tickets at £4 each gives £10.00
12 gallons at $3.59 gives $43.08
2.5 kg at £4 gives £10.00
6 items at £9.90 gives £59.40
14 boxes at 12 kg each gives 168 kg
half a bottle at £2.35 gives £1.18

Packs, boxes and bottles read the way they’re written on the shelf. N things of M is that many of the amount inside, and a price after it belongs to the pack, or to each thing in it when you write each:

calc
3 packs of 500 g gives 1,500 g
2 packs of 12 at £3.99 gives £7.98
3 boxes of 48 at £27.60 each gives £3,974.40
a dozen eggs at £0.30 each gives £3.60
2 pints of milk at 65p gives £1.30
12 payments of £50 gives £600.00

A size written before the count describes what you’re buying, so the number next to at or @ is still the quantity. An x beside the item counts it, and a count per period keeps its period:

calc
500g pasta 3 packs at £1.10 each gives £3.30
330ml cans 24 @ 45p gives £10.80
oat milk x3 £1.90 each gives £5.70
3x oat milk £1.90 each gives £5.70
2 coffees a day at £3.20 gives £6.40/day
2 coffees a day at £3.20 * 5 days gives £32.00

Two counts in a row multiply, so a quote can say who and for how long, and a count of things in containers of a size gives you the number of containers:

calc
3 men 7 hrs @ £42/hr gives £882.00
2 x 128 GB cards at £119 gives £238.00
60 bottles in cases of 12 gives 5 cases

Adjustments apply from left to right, each to the result so far. Two 10% discounts take 19% off in total, not 20%, and a tip added after tax is a share of the taxed amount:

calc
£50 after 10% discount after 10% discount gives £40.50
$84 with 8% tax with 15% tip gives $104.33

Splitting a bill

These forms divide a total between a number of people:

calc
split £90 among 3 gives £30.00
share £90 between 3 gives £30.00
£90 split among 3 gives £30.00
£90 between 3 gives £30.00
£90 split 3 ways gives £30.00

You can say who’s sharing after the count, which helps a note read naturally:

calc
split £100 among 3 people gives £33.33
share £60 between 4 friends gives £15.00
£97 between 6 of us gives £16.17
6 people split £97 gives £16.17

Paying in instalments is the same division, said the way a checkout says it:

calc
£3,603.91 in 9 instalments gives £400.43
split £3,603.91 into 9 payments gives £400.43
divide £3,603.91 into 9 gives £400.43
11 instalments of £74.80 gives £822.80
balance = £900
balance in 3 instalments gives £300.00

The total can be a name, as on the last two lines, so a note can work out what’s left to pay and then spread it.

The count must be a whole number. Splitting among 0 shows Error: divide by zero. Outside these phrases split is an ordinary word, so a name can contain it: with my split = £45, my split + £5 is £50.00. When the total is itself a calculation, wrap it in parentheses so it’s clear what’s being split. Named values work too:

calc
split (£60 + £24) among 3 gives £28.00
bill = £84
people = 3
split bill among people gives £28.00

Phrases also work inside a condition. Only the branch that applies is worked out:

calc
bill = £112
people = 4
if bill > £100 then split bill among people else bill gives £28.00

Less than and more than

A less than B subtracts A from B, and A more than B adds A to B:

calc
£15 less than £80 gives £65.00
5 less than 20 gives 15
£15 more than £80 gives £95.00
5 more than 20 gives 25

the difference between tells you how far apart two amounts are, whichever you write first, so the answer is never negative:

calc
the difference between £85 and £120 gives £35.00

Converting the result

A conversion at the end of a line applies to the whole phrase’s result. You can write in, to, as, -> or →, as described in Units and conversions:

calc
two and three quarters hours in minutes gives 165 min
three quarters of 2 kg in g gives 1,500 g

Currency conversions use the European Central Bank’s daily rates, so the answer changes from day to day:

calcAnswers depend on today’s date or live data
split €120 among 4 in USD gives $35.10

Your names come first

If a variable in your note has the same name as a word in a phrase, your variable wins. Here share is a percentage, so the second line takes 25% of £2,000 rather than trying to share anything:

calc
share = 25%
share of £2,000 gives £500.00

The same goes for number words: after one = 7, one times two is 14. Choose other names, or use a different form of the phrase, when that isn’t what you want.

On a line that reads as a phrase, though, the phrase comes first, so a name you happen to have given the same words doesn’t change what the line means:

calc
each = £43.41
3 tickets at £12.50 each gives £37.50
per night = £90
£118 per night * 3 nights gives £354.00
monthly repayment = £300
monthly repayment on £15000 over 4 years at 6% gives £352.28

Hold the pointer over the words to see “Part of the phrase here, not the variable each = £43.41.” per, a and an inside a rate are always the rate, never your value.

A conversion behaves the same way: after in, to or as, a unit beats a name that holds a plain number, so a count you’ve named doesn’t block a conversion to its unit:

calc
miles = 12
20 km in miles gives 12.4274238447 mi

Everyday names don’t get in the way of counting, either. A number written straight before a plural name counts that thing, so a note can have its own people and still split a bill for a different group:

calc
people = 4
split £1480 among 5 people gives £296.00
split £1480 among people gives £370.00

Hold the pointer over people on the first split to see “Counts people here, not the variable people = 4.”

This also means you can name things the way you think of them. A name can borrow a function’s name, such as floor, or contain phrase words such as to, in or needed, and Varlig reads it as your value:

calc
floor = 12 m²
floor * 2 gives 24 m²
paint needed = 12.44 L
paint needed to 1 dp gives 12.4 L

Names has more on choosing names.

Phrases in other languages

The phrases on this page are English, and they work in every note. A note whose number format is German, French, Spanish, Swedish, Portuguese, Ukrainian or Turkish also reads that language’s own words for a share, the four operations, a conversion and a line that adds up the lines above. The number format is the one in Settings › Calculations, the one in the note’s own Calculation Settings for This Note…, or System Region on a Mac set to that language.

Language A share A conversion Adding up
German 20 % von 150 5 km nach m Summe
French 20 % de 150 5 km en m somme
Spanish 20 % de 150 5 km en m suma
Swedish 20 % av 150 5 km i m summa
Portuguese 20% de 150 5 km em m soma
Ukrainian 20% від 150 5 км у м сума
Turkish 150'nin %20'si 5 km kaç m toplam

Each line answers exactly as its English form would. The words are read only in a note of that language, so de, en and a keep their meaning in an English note. Chinese words, such as 150的20%, work in every note. Format › Calculation Examples… starts with examples in the note’s language.

Turkish writes the percent sign first: %20 and yüzde 20 are 20%, and answers written in Turkish show %20. A sign after an amount, as in 10 % 3, is still the remainder.

Money follows the language too: Brazilian Portuguese writes R$ 12,50, Ukrainian 12,50 ₴ and Turkish ₺12,50. грн is the hryvnia in every note, and TL is the Turkish lira only in a Turkish note.

What isn’t understood

Some notation looks like maths but isn’t supported. Rather than work out part of the line and give a misleading answer, Varlig shows an error:

calc
2d6 gives Unsupported: Dice notation is not supported at "d"
10 ± 0.5 gives Unsupported: Uncertainty notation is not supported at "±"
5 < 4 < 10 gives Unsupported: Comparison chains are not supported at "<"; combine separate comparisons with &&

Each message quotes the symbol where Varlig stopped, so you can see straight away what to change.

10 +/- 0.5 gives the same uncertainty error. For a range check, write two comparisons joined with &&, such as 4 < 5 && 5 < 10. See Operators, comparisons and conditionals.

Putting it together

Here is a restaurant bill for four, with the discounted wine, service and each person’s share worked out in words:

calc
# Dinner out
mains = 4 items at £17.50 each gives £70.00
wine = 2 bottles at £28 each after 25% discount gives £42.00
bill = mains + wine gives £112.00
people = 4
total = bill with 12.5% tip gives £126.00
split total among people gives £31.50

Each line reads the way you’d say it out loud. Change people or a price, and the share updates.