Template:Convert/doc

Usage
This template can be used to show measurement quantities as primary and converted secondary units, with optional abbreviation or slash, such as distance "32 m" or temperature "18 °C" or "18 °C" with optional U.S. spellings or hyphenation.

Single value:  original_value original_unit 

Range of values (see below for list of range options):  orig_val1 range 


 * Numbers must be entered in unformatted form (without commas). For negative numbers (i.e. temperatures or precision) use a hyphen as the minus sign for the input number.  Values output by the template will be displayed formatted and with a true minus sign where appropriate.
 * Optional parameters, in examples below, allow abbreviated units (abbr=on), or US spellings (sp=us for meter), or slash separation (disp=s), or hyphenation (adj=on), etc.
 * For this template many levels of substitution are possible, hence doing this fully, step by step, is cumbersome, use Special:ExpandTemplates instead.
 * The template has no in-built capacity for dimensional analysis. It is therefore up to the user to ensure that the input and output units are compatible.  Do not, for example, attempt to convert barrels to tonnes (but see bbl to t).  Also beware of units with similar names; the code , for example, is for the avoirdupois ounce (a unit of mass), do not use this if you want fluid ounces.
 * The range functionality is not fully implemented for all units, so experimentation may be required.
 * This documentation page tends to lag behind in terms of what the template can do. For details see the talk page and its archives.

Range of values

 * Note: not yet operational for all units

The following range conversions are currently not available:
 * Temperature-based units (°C to °F, etc.) due to complexity of the conversion
 * Imperial and US gallon-based units
 * Fuel consumption units (mpg, L/100km)
 * Large scale units (e3, e6, e9)
 * Combination-based units (ft&in, st&lb, lb&oz) due to complexity of the conversion

Rounding
Convert supports four types of rounding:
 * Rounding to a given precision
 * Specify the desired precision with the fourth unnamed parameter or third unnamed parameter in the case where the convert to parameter is skipped (see above). The conversion is rounded off to the nearest power of 1/10 this number.  For instance, if the result is 8621 and the round number is '-2', the result will be 8600.  If the result is '234.0283043' and the round number is '0', the result will be 234.


 * Rounding to a given number of significant figures
 * Specify the desired number of significant figures using  as noted above.


 * Combine both of the above
 * If both the desired precision and the desired number of significant figures are specified, the conversion will be rounded to the least precise of these.


 * Default rounding
 * If neither the desired precision nor the desired number of significant figures are specified, the conversion will be rounded either to a comparable precision as the input value (the number of decimals remains the same if the conversion is a multiplication by a number between 0.2 and 2, is decreased by 1 if the factor is between 2 and 20, etc.) or to two significant figures whichever is the most precise. An exception to this is temperature wherein the conversion will be rounded either to precision comparable to that of the input value or to that which would give three significant figures when expressed in kelvin, whichever is the most precise.

Units supported
The table below lists units supported by this template. It is divided up according to the quantity being measured. Not all supported units are listed here; there are links to complete lists for each quantity.

The codes listed in the code column (column 3) are accepted as input by the template. These can be used as the second or third unnamed parameter. For some units there exist alternative codes. These are listed in brackets and have been incorporated to make the code more flexible for editors, e.g. °F or F may be entered.

The codes listed in the combinations column (column 7) can be used to produce multiple conversions. They can only be used as the third unnamed parameter, e.g.  produces "55 nmi".

Examples

 * Monitor quality or look at examples at Convert/check.