# Units

Figures knows about a wide array of units, and you can use them most places you would use numbers.

``````25km + 400m
80 - 20m
collect(2..5 meters)
25m / 5m``````
``````25.4 km
60 m
[2 m, 3 m, 4 m, 5 m]
5``````

NOTE

The collect function gathers all the elements of a range into a list

## Prefixes

All SI units like `meters` and `grams` can be used with metric prefixes. Figures combines unit names with prefix terms as in `kilometers` and `milligrams`. Unit symbols are combined with prefix symbols like in `km` and `mg`.

``````30 megameters + 2M meters
200 nanometers + 2 micrometers
2 kilograms/second × 60 sec``````
``````32 Mm
2.2 μm
120 kg``````
Metric prefixSymbolValueMetric prefixSymbolValue
hectoh10²centic10⁻²
kilok10³millim10⁻³
megaM10⁶microμ10⁻⁶
gigaG10⁹nanon10⁻⁹
teraT10¹²picop10⁻¹²
petaP10¹⁵femtof10⁻¹⁵
exaE10¹⁸attoa10⁻¹⁸
zettaZ10²¹zeptoz10⁻²¹
yottaY10²⁴yoctoy10⁻²⁴

Data units like `bits` and `bytes` are inherently binary values and therefore use a different scale.

``````32 mebibits in kibibytes
TiB to GiB``````
``````4,096 KiB
1,024 GiB``````
Binary prefixSymbolValue
kibiKi2¹⁰
mebiMi2²⁰
gibiGi2³⁰
tebiTi2⁴⁰
pebiPi2⁵⁰
exbiEi2⁶⁰
zebiZi2⁷⁰
yobiYi2⁸⁰

## Conversions

To convert between different units, use one of the conversion operators `as`, `to`, `in`, or `format`.

``````5 km in miles
500 grams as pounds
meters to feet
\$25 in euros``````
``````3.11 mi
1.1 lb
3.28 ft
€22.14``````

Figures has a deep understanding of units and can do calculations and conversions between different unit types.

``````25kg × 30m² / 5s² in joules
42m/s² × 2sec in mph
150m × 30m in acres``````
``````150 J
187.9 mph
1.11 ac``````

NOTE

Currency units are unique because their relative values change over time. By default, Figures updates currencies once per day. To configure currency updates, go to `Preferences > Units`

## Regional Units

Some units have different meanings in different regions. There are areas that use U.S. Customary system for units like `cups` and `tons`. Others use the Imperial system for those units.

NOTE

Figures attempts to set the correct system for your region. If you want to change this setting, go to `Preferences > Format > Region`

No matter which system is set, you can always specify which unit you want by prefacing regional units with `US` or `UK`. These examples assume regional preference is set to U.S. Customary.

``````2 cups in uk cups
2 us cups in uk cups
3 uk pints as us gallons
us tons to uk tons``````
``````1.67 UK cup
1.67 UK cup
0.45 gal
0.89 UK ton``````

## Customizing Units

In addition to the hundreds of units supported by Figures, you can also add your own custom units or tweak existing ones. Got to `Preferences > Units` to view all the units that are available, sorted by category. Use the filter bar to quickly find a unit.

### Editing Units

Double-click on a unit to edit it.

• Name: The primary name of the unit
• Symbol: An abbreviation of the unit
• Format: Guidance on how to format the unit in the results panel
• Kind: The category of the unit. Not editable for built-in units
• Added Names: Alternate names for the unit

Each of the name fields has a toggle that can make the name case sensitive. See Variables for more detail on case sensitivity.

When Figures displays a unit in the results panel, it prefers using the symbol if there is one. Otherwise it uses the primary name or an alternate name. There is an example after the `Format` field that shows how the unit will be displayed.

### Creating Units

Click the `+` button at the top of the unit list to create a new unit.

The fields are the same as those for existing units with a couple exceptions. First, the `Kind` field is editable. By selecting a kind, your custom unit will be convertible to other units of the same kind. Second, custom units have a value in terms of another unit. The units available in the `Value` field are determined by the selection of `Kind`.

Once created, your custom unit can be used exactly like built-in units.

Didn't find what you were looking for?