Help:Convert units

Template convert is used to convert a value from one unit of measurement to another. This page documents some features of units, and lists units that are commonly used in conversions.


 * Help:Convert • Overview
 * Module:Convert/documentation/conversion data • Full list of units
 * Help:Convert messages • Error and warning messages

Default output
If no output unit is specified, the default output for the input unit will be used. Using defaults provides greater uniformity across articles.

Some options provide text that the template may mistakenly use for the output unit, if none is specified. That can be avoided by providing an empty output unit, as shown in the following examples.
 * → 4 ft
 * → 4 ft
 * → 4 ft

The second of the above examples produces an error because "-long" is interpreted as the name of the output unit. The third example avoids that by specifying an empty output unit which means "use the default".

The following also works, although it sets the output precision to 0.
 * → 4 ft

The last example works because " " sets the output precision to zero, and convert does not look for an output unit once the precision has been specified because a precision is always given after the output unit, if any.

SI prefixes
The standard SI prefixes can applied to the following units.

Some SI prefixes are demonstrated in the following. As a convenience, "micro" can be entered as " " instead of " ".
 * → 1.23 Gm
 * → 1.23 Mm
 * → 1.23 Ts
 * → 1.23 nJ
 * → 1.23 μm
 * → 1.23 um
 * → 1.23 um
 * → 18 mm
 * → 18 km

The above demonstrates that " " is the unit code for microinch.

Combinations
An input unit can be converted to any number of output units—the outputs are specified as a "combination" by separating unit codes with a space (" ") or a plus (" "). Using a space as a separator does not work if any of the unit codes contains a space.

For example, each of the following converts 1.2 km2 to acres, square yards, and hectares.
 * → 1.2 km2
 * → 1.2 km2

In the following, because "board feet" contains a space, using a space to make a combination fails.
 * → 123 cuyd
 * → 123 cuyd

The following converts a pressure to four output units. The precision is 1 (1 decimal place), and units are abbreviated and linked.
 * → 895 hPa

It is preferable to use "+" to separate output units when the first unit uses engineering notation; that avoids looking up the unit in Module:Convert/extra.
 * → 1.2 AU
 * → 1.2 AU

Some "standard" combinations have been defined—see the full list of units.

Engineering notation
Most units can be combined with a scale factor, for example,  represents a million kilometres. The following prefixes may be used; per WP:NUMERAL, values follow the short scale. If  is on, the numbers are linked as shown below.
 * (thousand)
 * (million)
 * (billion)
 * (trillion)
 * (quadrillion)

Engineering notation can only be applied to simple units—temperatures, combinations, and some other special units will not work.

Some examples using engineering notation follow.
 * → 123.4 e3m2
 * → 123.4 e3m2
 * → 1.23 e6L
 * → 1.23 e6L
 * → 1.23 e9impgal
 * → 1.23 e9impgal
 * → 1.23 e12cuft

Units
Here are the most commonly used units. See below for hands or Mach. For rarer or historic units, see Module:Convert/documentation/conversion data.

Hands (unit of length)
A hand is a unit of length used to measure the height of horses. One hand is four inches, and a value of 12.3 hands represents 12 hands + 3 inches (51 inches).

Output name

 * By default, the unit is shown as a linked name (hands).
 * The hands unit can be abbreviated to "h" or to "hh"; by default, abbreviations are not linked.
 * → 27 in
 * → 27 in
 * → 27 in
 * → 27 in
 * → 27 in

Output value

 * The hands value has at most one digit after the decimal mark, and has an optional fraction.
 * A precision of 2 assumes  (round to nearest $1/2$ inch).
 * A precision of 3 or more assumes  (round to nearest $1/4$ inch).
 * If ever needed,  can be used to round to the nearest $1/8$ inch.
 * → 27.63 in
 * → 27.63 in
 * → 27.63 in
 * → 27.63 in
 * → 27.63 in
 * → 27.63 in
 * → 28.5 in
 * → 28.5 in

Output in hands and inches

 * When using "hand in" to convert to hands and inches, the rounded hands and inches values are equivalent, and use the same fraction, if any.
 * Special rounding of the inches value only occurs when "hand in" is the output. For example, if the output is "in hand", the inches value is rounded independently from the hands value.
 * → 156 cm
 * → 156 cm
 * → 156 cm
 * → 156 cm
 * → 156 cm
 * → 156 cm
 * → 156 cm

Ranges

 * A range of values can be indicated with " " (hyphen) or " ". When a dash is displayed by convert, it is always an en dash.
 * Alternatively, " " and " " can be used.
 * → 137 - 156 cm
 * → 137 - 156 cm
 * → 137 - 156 cm
 * → 137 - 156 cm
 * → 137 - 156 cm
 * → 137 and 156 cm
 * → 137 or

Examples

 * The following examples illustrate various combinations of options.
 * → 57 in
 * → 2 m
 * → 137 cm
 * → 137 cm
 * → 14.1 hand
 * → 14.1 hand
 * → 14.1 hand
 * → 14.1 hand
 * → 14.1 - 14.3 hand
 * → 14.1 - 14.3 hand
 * → 50 - 57 in
 * → 2 - 3 m
 * → 57 or
 * → 137 - 139 cm
 * → 137 and 162 cm
 * → 137 and 162 cm
 * → 9.2 hand
 * → 9.2 hand
 * → 9.2 hand
 * → 9.2 hand
 * → 9.2 hand
 * → 9.2+1/2 hand
 * → 9.2+3/4 hand
 * → 9.2+3/4 hand
 * → 9.2+3/4 hand
 * → 9.2+3/4 hand
 * → 9.2+3/4 hand
 * → 9.2+3/4 hand
 * → 9.2+3/4 hand
 * → 9.2+3/4 hand
 * → 15.1 - 16.3 hand
 * → 14.2 to 16.1 hand

Mach (unit of speed)
Conversion of the Mach unit of speed depends on the altitude at which the speed is measured. That altitude should be specified either in feet (for example, ) or in metres (for example,  ). The altitude cannot be determined accurately and only a whole number is accepted.

Examples:
 * → 1.6 Mach
 * → 1.6 Mach
 * → 1130 mph
 * → 5 - 7 Mach