OtterCalcOtterCalc

Units & conversions

Length, area, volume, speed, data and temperature, 200+ units.

Numbers can carry units, and OtterCalc keeps them straight. Add compatible units and it converts for you; add incompatible ones, like kilometers plus kilograms, and you get a clear error instead of a wrong answer.

5 km + 300 m
2 hours + 45 min
5.3 km
2 hours 45 min

Converting

Convert with "to" or "in". Spanish speakers can also write "a": 5 kilometros a millas works.

5 km to miles
20 celsius to fahrenheit
5 kilometros a millas
3.1068559612 miles
68 °F
3.1068559612 miles

Area, speed and data

Everyday notations are understood: m2 or m² for square meters, mph and kph for speed, gb and mb for file sizes.

50 m2 in sqft
120 km / 2 hours to mph
1.5 gb to mb
538.1955208355 sqft
37.2822715342 mi / h
1,500 MB

Pressure, torque, data rates and electricity

Past the everyday units there is a long tail, all built in. Pressure reads psi, bar and pascal. Torque takes ftlb, or write N*m for the metric side. Data rates understand Mbps and Gbps. The electrical family covers watts, kilowatt-hours, volts, ohms and hertz. One quirk: amperes are amp or amps, because a bare A reads as the word "a".

30 psi in bar
100 ftlb in N*m
500 Mbps in MB/s
1500 W in hp
5 kWh in J
2.0684271878 bar
135.5817948331 N m
62.5 MB / s
2.0115331345 hp
18,000,000 J

Fuel economy and cooking

Two conversions that are not simple unit swaps still work. Fuel economy flips between mpg and L/100km (they are reciprocals; add imperial for the UK gallon). Cooking crosses weight and volume when you name the ingredient, so grams become cups using that ingredient's density.

35 mpg in L/100km
40 imperial mpg in L/100km
250 g butter in cups
2 cups flour in grams
6.7204166657 L/100km
7.062023407 L/100km
1.1599211959 cups
250.78353069 grams

Keep calculating after a conversion

A conversion does not have to end the line. Whatever follows applies to the converted result, so you can convert and then divide, multiply or add in one go.

5 km to miles / 2h
1.5 gb to mb * 2
2 hours to minutes / 4
1.5534279806 miles / h
3,000 MB
30 minutes

Invent your own units

Declare a unit the same way you declare an exchange rate, then use it anywhere in the document. Plurals just work, and units can build on each other, so a crate can be worth four boxes and a box a dozen eggs. A unit defined in money even converts through your exchange rates.

1 box = 12 eggs
3 boxes to eggs
1 crate = 4 boxes
2 crates + 2 boxes
1 token = 2.50 USD
10 tokens in USD
10 tokens in EUR
12 eggs
36 eggs
4 boxes
2.5 crates
$2.50
$25.00
? Units do not match

One sharp corner

The words min and sec mean minutes and seconds after a number or after to (90 sec to min), and min is the minimum function before parentheses. Both lines below do what you expect.

90 min to hours
min(3, 7)
1.5 hours
3