Converting Units
Use to or in or as to convert into a particular unit.
See all the available units in the Unit Reference.
10 km in m | 10.000 m3 weeks in days | 21 days100 pounds in kg | 45,36 kgWrapping a Value in a Unit
Section titled “Wrapping a Value in a Unit”When the left-hand side is a plain number or an expression with no
source unit, in <unit> (or just the unit, with no in) attaches the
unit without conversion. This works for variables, parenthesised
expressions, and user-function parameters.
20 in EUR | €20(5 + 3) m | 8 m50 in km | 50 kmMixing Units & Plain Numbers
Section titled “Mixing Units & Plain Numbers”When mixing plain numbers with units, the nearest unit will be used automatically.
300 + 20 km | 320 km$20 + 30 | $50Adding & Subtracting Mixed Units
Section titled “Adding & Subtracting Mixed Units”When doing calculations with mixed unit types, the lowest common unit will be used.
1km + 1,000m | 2.000 mWhen units don’t share a common base unit, the last used unit wins:
$200 + €200 | €372Multiplying Units
Section titled “Multiplying Units”When multiplying units, the result will be a supported math compound unit:
10m x 10m | 100 m²An implicit rate will be made when a supported unit cannot be created through multiplication:
$30 × 4 days | $120