Help:Convert units#Combinations
{{Wikipedia how-to|H:CONU}}
Template {{tl|convert}} converts 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.
→ {{convert|4|ft}}{{convert|4|ft}}
→ {{convert|4|ft|adj=mid|-long}}{{convert|4|ft|adj=mid|-long}}
→ {{convert|4|ft||adj=mid|-long}}{{convert|4|ft||adj=mid|-long}}
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.
→ {{convert|4|ft|0|adj=mid|-long}}{{convert|4|ft|0|adj=mid|-long}}
The last example works because "|0
" 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.
class="wikitable floatright"
|+Metric prefixes |
Text
! Symbol ! Factor ! or |
---|
yotta
| style="text-align:center;" |Y |1024 | style="text-align:right;" |{{gaps|1|000|000|000|000|000|000|000|000}} |
zetta
| style="text-align:center;" |Z |1021 | style="text-align:right;" |{{gaps|1|000|000|000|000|000|000|000}} |
exa
| style="text-align:center;" |E |1018 | style="text-align:right;" | {{gaps|1|000|000|000|000|000|000}} |
peta
| style="text-align:center;" |P |1015 | style="text-align:right;" | {{gaps|1|000|000|000|000|000}} |
tera
| style="text-align:center;" |T | 1012 | style="text-align:right;" | {{gaps|1|000|000|000|000}} |
giga
| style="text-align:center;" |G | 109 | style="text-align:right;" |{{gaps|1|000|000|000}} |
mega
| style="text-align:center;" |M | 106 | style="text-align:right;" |{{gaps|1|000|000}} |
kilo
| style="text-align:center;" |k |103 | style="text-align:right;" |{{gaps|1|000}} |
hecto
| style="text-align:center;" |h |102 | style="text-align:right;" |100 |
deca
| style="text-align:center;" |da |101 | style="text-align:right;" |10 |
(none)
| style="text-align:center;" |(none) |style="padding-left:0.6em; text-align:left;" | 1 | |
deci
| style="text-align:center;" |d |10−1 | style="text-align:left;" |0.1 |
centi
| style="text-align:center;" |c |10−2 | style="text-align:left;" |0.01 |
milli
| style="text-align:center;" |m |10−3 | style="text-align:left;" |0.001 |
micro
| style="text-align:center;" |μ |10−6 | style="text-align:left;" |{{gaps|0.000|001}} |
nano
| style="text-align:center;" |n |10−9 | style="text-align:left;" |{{gaps|0.000|000|001}} |
pico
| style="text-align:center;" |p |10−12 | style="text-align:left;" |{{gaps|0.000|000|000|001}} |
femto
| style="text-align:center;" |f |10−15 | style="text-align:left;" | {{gaps|0.000|000|000|000|001}} |
atto
| style="text-align:center;" |a |10−18 | style="text-align:left;" | {{gaps|0.000|000|000|000|000|001}} |
zepto
| style="text-align:center;" |z |10−21 | style="text-align:left;" | {{gaps|0.000|000|000|000|000|000|001}} |
yocto
| style="text-align:center;" |y |10−24 | style="text-align:left;" | {{gaps|0.000|000|000|000|000|000|000|001}} |
class="wikitable" style=""
! Unit type !! Unit code !! Unit name | ||
rowspan="2" | Area | a | are |
m2 | square metre | |
Charge | coulomb | coulomb |
Energy | J | joule |
Force | N | newton |
Length | m | metre |
Magnetic field strength | T | tesla |
Mass | g | gram |
Power | W | watt |
Pressure | Pa | pascal |
rowspan="2" | Radioactivity | Bq | becquerel |
Ci | curie | |
Time | s | second |
rowspan="3" | Volume | L | litre |
l | litre | |
m3 | cubic metre |
Some SI prefixes are demonstrated in the following. As a convenience, "micro" can be entered as "u
" instead of "μ
".
→ {{convert|1.23|Gm|angstrom}}{{convert|1.23|Gm|angstrom}}
→ {{convert|1.23|Mm|angstrom}}{{convert|1.23|Mm|angstrom}}
→ {{convert|1.23|Ts|hour}}{{convert|1.23|Ts|hour}}
→ {{convert|1.23|nJ|Wh}}{{convert|1.23|nJ|Wh}}
→ {{convert|1.23|μm|in}}{{convert|1.23|μm|in}}
→ {{convert|1.23|um|in}}{{convert|1.23|um|in}}
→ {{convert|1.23|um|uin|abbr=on}}{{convert|1.23|um|uin|abbr=on}}
→ {{convert|18|mm|in}}{{convert|18|mm|in}}
→ {{convert|18|km|mi}}{{convert|18|km|mi}}
The above demonstrates that "uin
" 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.
→ {{convert|1.2|km2|acre sqyd ha}}{{convert|1.2|km2|acre sqyd ha}}
→ {{convert|1.2|km2|acre+sqyd+ha}}{{convert|1.2|km2|acre+sqyd+ha}}
In the following, because "board feet" contains a space, using a space to make a combination fails.
→ {{convert|123|cuyd|m3 board feet}}{{convert|123|cuyd|m3 board feet}}
→ {{convert|123|cuyd|m3+board feet}}{{convert|123|cuyd|m3+board feet}}
The following converts a pressure to four output units. The precision is 1 (1 decimal place), and units are abbreviated and linked.
→ {{convert|895|hPa|psi inHg atm mbar|1|abbr=on|lk=on}}{{convert|895|hPa|psi inHg atm mbar|1|abbr=on|lk=on}}
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.
→ {{convert|1.2|AU|e6km+e6mi|abbr=on}}{{convert|1.2|AU|e6km+e6mi|abbr=on}}
→ {{convert|1.2|AU|e6km+e6mi|abbr=unit}}{{convert|1.2|AU|e6km+e6mi|abbr=unit}}
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, e6km
represents a million kilometres. The following prefixes may be used; per WP:NUMERAL, values follow the short scale. If lk
is on, the numbers are linked as shown below.
e3
(thousand)e6
(million)e9
(billion)e12
(trillion)e15
(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.
→ {{convert|123.4|e3m2}}{{convert|123.4|e3m2}}
→ {{convert|123.4|e3m2|e6sqft|abbr=off}}{{convert|123.4|e3m2|e6sqft|abbr=off}}
→ {{convert|1.23|e6L}}{{convert|1.23|e6L}}
→ {{convert|1.23|e6L|e3usgal|abbr=off|lk=on|sp=us}}{{convert|1.23|e6L|e3usgal|abbr=off|lk=on|sp=us}}
→ {{convert|1.23|e9impgal}}{{convert|1.23|e9impgal}}
→ {{convert|1.23|e9impgal|e3usgal|abbr=off|lk=on}}{{convert|1.23|e9impgal|e3usgal|abbr=off|lk=on}}
→ {{convert|1.23|e12cuft}}{{convert|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#Conversions.
{{#invoke:convert/show|units}}
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 {{nowrap|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.
- :
→ {{convert|27|in|hand}}{{convert|27|in|hand}} - :
→ {{convert|27|in|hand|lk=off}}{{convert|27|in|hand|lk=off}} - :
→ {{convert|27|in|hand|abbr=h}}{{convert|27|in|hand|abbr=h}} - :
→ {{convert|27|in|hand|abbr=hh}}{{convert|27|in|hand|abbr=hh}} - :
→ {{convert|27|in|hand|abbr=hh|lk=out}}{{convert|27|in|hand|abbr=hh|lk=out}}
= Output value =
- The hands value has at most one digit after the decimal mark, and has an optional fraction.
- A precision of 2 assumes
|frac=2
(round to nearest {{frac|1|2}} inch). - A precision of 3 or more assumes
|frac=4
(round to nearest {{frac|1|4}} inch). - If ever needed,
|frac=8
can be used to round to the nearest {{frac|1|8}} inch. - :
→ {{convert|27.63|in|hand}}{{convert|27.63|in|hand}} - :
→ {{convert|27.63|in|hand|0}}{{convert|27.63|in|hand|0}} - :
→ {{convert|27.63|in|hand|1}}{{convert|27.63|in|hand|1}} - :
→ {{convert|27.63|in|hand|2}}{{convert|27.63|in|hand|2}} - :
→ {{convert|27.63|in|hand|3}}{{convert|27.63|in|hand|3}} - :
→ {{convert|27.63|in|hand|frac=8}}{{convert|27.63|in|hand|frac=8}} - :
→ {{convert|28.5|in|hand|2}}{{convert|28.5|in|hand|2}} - :
→ {{convert|28.5|in|hand|3}}{{convert|28.5|in|hand|3}}
= 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.
- :
→ {{convert|156|cm|hand in}}{{convert|156|cm|hand in}} - :
→ {{convert|156|cm|hand in|2}}{{convert|156|cm|hand in|2}} - :
→ {{convert|156|cm|in hand}}{{convert|156|cm|in hand}} - :
→ {{convert|156|cm|in hand|2}}{{convert|156|cm|in hand|2}} - :
→ {{convert|156|cm|hand in|abbr=out}}{{convert|156|cm|hand in|abbr=out}} - :
→ {{convert|156|cm|hand in|abbr=h}}{{convert|156|cm|hand in|abbr=h}} - :
→ {{convert|156|cm|hand in|abbr=hh}}{{convert|156|cm|hand in|abbr=hh}}
= Ranges =
- A range of values can be indicated with "
-
" (hyphen) or "to
". When a dash is displayed by convert, it is always an en dash. - Alternatively, "
and
" and "or
" can be used. - :
→ {{convert|137|-|156|cm|hand in}}{{convert|137|-|156|cm|hand in}} - :
→ {{convert|137|-|156|cm|hand in|2}}{{convert|137|-|156|cm|hand in|2}} - :
→ {{convert|137|-|156|cm|hand in|abbr=in}}{{convert|137|-|156|cm|hand in|abbr=in}} - :
→ {{convert|137|-|156|cm|hand in|abbr=h}}{{convert|137|-|156|cm|hand in|abbr=h}} - :
→ {{convert|137|-|156|cm|hand in|abbr=on}}{{convert|137|-|156|cm|hand in|abbr=on}} - :
→ {{convert|15000|-|20000|usgal|impgal L|abbr=on}}{{convert|15000|-|20000|usgal|impgal L|abbr=on}} - :
→ {{convert|137|and|156|cm|hand in|abbr=on}}{{convert|137|and|156|cm|hand in|abbr=on}} - :
→ {{convert|137|or|156|cm|hand in|abbr=on}}{{convert|137|or|156|cm|hand in|abbr=on}}
= Examples =
- The following examples illustrate various combinations of options.
- :
→ {{convert|57|in|hand}}{{convert|57|in|hand}} - :
→ {{convert|2|m|hand}}{{convert|2|m|hand}} - :
→ {{convert|137|cm|hand|2}}{{convert|137|cm|hand|2}} - :
→ {{convert|137|cm|hand|2|sp=us}}{{convert|137|cm|hand|2|sp=us}} - :
→ {{convert|14.1|hand|in}}{{convert|14.1|hand|in}} - :
→ {{convert|14.1|hand|cm}}{{convert|14.1|hand|cm}} - :
→ {{convert|14.1|hand|in cm}}{{convert|14.1|hand|in cm}} - :
→ {{convert|14.1|hand|cm in}}{{convert|14.1|hand|cm in}} - :
→ {{convert|14.1|-|14.3|hand|cm}}{{convert|14.1|-|14.3|hand|cm}} - :
→ {{convert|14.1|-|14.3|hand|in cm}}{{convert|14.1|-|14.3|hand|in cm}} - :
→ {{convert|50|-|57|in|hand}}{{convert|50|-|57|in|hand}} - :
→ {{convert|2|-|3|m|hand}}{{convert|2|-|3|m|hand}} - :
→ {{convert|57|or|59|in|hand|abbr=on}}{{convert|57|or|59|in|hand|abbr=on}} - :
→ {{convert|137|-|139|cm|hand|lk=on}}{{convert|137|-|139|cm|hand|lk=on}} - :
→ {{convert|137|and|162|cm|hand|0|abbr=in|lk=in}}{{convert|137|and|162|cm|hand|0|abbr=in|lk=in}} - :
→ {{convert|137|and|162|cm|hand in}}{{convert|137|and|162|cm|hand in}} - :
→ {{convert|9.2|hand}}{{convert|9.2|hand}} - :
→ {{convert|9.2|hand|lk=off}}{{convert|9.2|hand|lk=off}} - :
→ {{convert|9.2|hand|abbr=h}}{{convert|9.2|hand|abbr=h}} - :
→ {{convert|9.2|hand|abbr=h|lk=in}}{{convert|9.2|hand|abbr=h|lk=in}} - :
→ {{convert|9.2|hand|abbr=hh|lk=in}}{{convert|9.2|hand|abbr=hh|lk=in}} - :
→ {{convert|9.2+1/2|hand}}{{convert|9.2+1/2|hand}} - :
→ {{convert|9.2+3/4|hand}}{{convert|9.2+3/4|hand}} - :
→ {{convert|9.2+3/4|hand|abbr=h}}{{convert|9.2+3/4|hand|abbr=h}} - :
→ {{convert|9.2+3/4|hand|cm in}}{{convert|9.2+3/4|hand|cm in}} - :
→ {{convert|9.2+3/4|hand|cm in|abbr=out}}{{convert|9.2+3/4|hand|cm in|abbr=out}} - :
→ {{convert|9.2+3/4|hand|cm in|abbr=on}}{{convert|9.2+3/4|hand|cm in|abbr=on}} - :
→ {{convert|9.2+3/4|hand|in}}{{convert|9.2+3/4|hand|in}} - :
→ {{convert|9.2+3/4|hand|in|abbr=out}}{{convert|9.2+3/4|hand|in|abbr=out}} - :
→ {{convert|9.2+3/4|hand|in|abbr=on}}{{convert|9.2+3/4|hand|in|abbr=on}} - :
→ {{convert|15.1|-|16.3|hand}}{{convert|15.1|-|16.3|hand}} - :
→ {{convert|14.2|to|16.1|hand}}{{convert|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, |altitude_ft=10,000
) or in metres (for example, |altitude_m=3,749
). The altitude cannot be determined accurately and only a whole number is accepted.
Examples:
→ {{convert|1.6|Mach|altitude_ft=20,000|mph}}{{convert|1.6|Mach|altitude_ft=20,000|mph}}
→ {{convert|1.6|Mach|altitude_m=6,096|mph}}{{convert|1.6|Mach|altitude_m=6,096|mph}}
→ {{cvt|1130|mph|Mach|altitude_m=6,096|lk=out}}{{cvt|1130|mph|Mach|altitude_m=6,096|lk=out}}
→ {{convert|5|-|7|Mach|altitude_ft=34,500}}{{convert|5|-|7|Mach|altitude_ft=34,500}}
{{Convert/documentation navbox}}