Skip to content

Units

A number can carry a unit. Write the unit after the number.

5 m
3 hours
72 kg

Every unit belongs to a dimension such as Length, Time, or Mass. Arithmetic carries dimensions through, and smoot checks them.

5 m + 30 cm
1 km + 500 m
3 m * 4 m
10 m / 2 s
100 km / 2 hour

Adding a length to a mass is an error, not a number. This is the rule that makes smoot trustworthy: a dimension mistake is always reported, never silently coerced.

5 m + 3 kg

The left operand’s unit wins the display: 1 km + 500 m shows kilometres. Powers and roots carry dimensions too.

(3 m) ^ 2
sqrt(9 m^2)

to converts a value into another unit.

12 inch to cm
1 mile to km
60 mph to kph
3.6 km/hour to m/s
5 m^2 to cm^2

in reads better in some sentences. It works like as: the answer is shown in the new unit and the value keeps its own. To convert a value you give a name, use to.

1 lb in g

A unit written straight after a value that already has a unit of the same dimension converts it too, so trip hour reads like trip to hour. A unit of another dimension multiplies, as it does after a number.

trip = 90 minute
trip hour
force = 5 N
force m

Converting across dimensions is the same dimension error as adding them.

5 kg to m

Prefixes are generated for every metric unit, so km, cm, mm, µm, ms, µs, mg, kJ, MW, and GB all exist. Type µ or u; both work.

1 km to m
500 ms to s
5 um to m
2 GB to MB

Long names work with long prefixes: kilometre, millisecond, megabyte.

One spelling is taken: a whole number from 1 to 12 before pm or am (5 pm) is a time of day. Other counts (74 pm, 12.5 pm) are still picometres, and long names avoid the clash: 74 picometre.

74 pm to m
74 picometre to m

Two quantities of the same dimension written side by side add up.

5 ft 6 inch
5 ft 6 inch to cm
3 hours 45 minutes to minutes

To display a value across several units, give to a comma list. The largest unit is peeled off first.

2.5 ft to ft, inch
90 minutes to hour, minute
2250 g to kg, g

A unit group is a named list that spans several dimensions. The prelude ships metric, imperial, and us; each picks the members that fit the value’s dimension.

5432 m to metric
80 kg to imperial to 0 dp
0 C to imperial

The trailing to 0 dp rounds the last component; see Formatting.

Celsius and Fahrenheit have offsets, and smoot keeps the arithmetic physical. Subtracting two temperatures gives a difference; adding a difference to a temperature gives a temperature. Type °C or just C; results show °C. Rankine (°R) has Fahrenheit-sized degrees and starts at absolute zero.

100 °C to °F
100 °C to °R
98.6 F to C
300 K to C
100 C - 50 C
20 C + 5 C
DimensionUnits
Lengthm and prefixes, inch, ft, yard, mile, nautical mile, au, light year, parsec, smoot
Times and prefixes, minute, hour, day, week, fortnight, month, year (the Julian year, 365.25 days)
Masskg, g and prefixes, tonne, lb, oz, stone, ton, carat
TemperatureK, °C, °F, °R
Angleradian, ° (or deg), ′ (arcmin), ″ (arcsec), turn, gradian
Aream^2 and its prefixed forms, hectare, acre
Volumel and prefixes, m^3, cup, tablespoon, teaspoon, pint, quart, gallon, imperial pint (imppint), imperial gallon (impgallon)
Speedmph, kph, any length/time
Energy, PowerJ, cal, kcal, Wh, kWh, W, hp
PressurePa, bar, atm, mmHg, psi
DataB, byte, bit, kB…TB, KiB…TiB, kbit…Tbit
ElectricalA, V, ohm and prefixes, coulomb
Amount, Frequency, Lightmol, Hz, candela, lumen, lux
Peopleperson (also people, head, capita), seat, pax, pppm (per person per month)

Most units have long names and plurals: metres, feet, hours, pounds. Answers show a unit’s primary spelling in the singular, whichever alias you typed: 12 months to years reads 1 year, 500 ml reads 500 mL. To choose the spelling a unit displays with, declare it: unit ml = mL makes every millilitre in the document read ml.

The kitchen units are US volumes: cup, pint, gallon. The imperial ones are prefixed: imperial pint, imperial gallon.