1---
2app_version: 0.7.0
3precision: 4
4---
5# Units, Percentages & Dates (Free)
6
7// Units combine and convert automatically
85km + 300m
93h + 45min
102kg * 9.81
11
12// Division carries the right unit — this is a speed
13100km / 2h
14
15// Convert right in the line with `in`
165 km in mi
1790 min in h
1836 km/h in m/s
19
20// A duration can be written in parts, and shows the same way
213 h 20 min + 50 min
22
23// Temperatures convert, too
2420 °C in °F
25
26// Percentages: 19% means 0.19
271200 * 19%
28// With + and - the percentage is taken OF the left value
29netto = 100
30netto + 19%
31100 - 15%
32// Reverse a gross price back to net (price / 1.19)
33238 / 119%
34
35// Mix units in one expression
36distance = 12km
37time = 40min
38distance / time
39
40// Dates
41start = date(2026, 1, 1)
42end = date(2026, 12, 31)
43days(end, start)
44dformat(start, "dd.MM.yyyy")
45
46// Proportion / rule of three: a : b = ? : c -> a*c/b
47// 3 items cost 12 — what do 7 items cost?
48proportion(12, 3, 7)
49