Module:Convert/documentation/conversion data/introduction
&lt;noinclude&gt;{{notice|1=This documentation is transcluded at the start of the [[Module:Convert/documentation/conversion data|conversion data page]].}}
 &lt;/noinclude&gt;{{ombox |small=yes |style=width:170px; |text=This documentation&lt;br /&gt;is transcluded&lt;br /&gt;&lt;noinclude&gt;[[Module:Convert/documentation/conversion data|there]]&lt;/noinclude&gt;&lt;includeonly&gt;from [[Module:Convert/documentation/conversion data/introduction|here]]&lt;/includeonly&gt;.}}
 Following is the master list of conversion data used by [[Module:Convert]], although more units may temporarily be at [[Module:Convert/extra]]. Units should be discussed at [[Template talk:Convert]].
 
 This page is read by a script ([[Module:Convert/makeunits|makeunits]]). The script extracts information from the wikitext, and outputs the [[Lua (programming language)|Lua]] source that defines the table of units; that source can be manually copied into [[Module:Convert/data]].
 
 ==Conversion factors and physical constants==
 
 The values for most of the conversion factors used by [[Template:Convert]] come from international and national standards documents:
 * {{cite book |author=Organisation Intergouvernementale de la Convention du Mètre |title=The International System of Units (SI) |url=https://www.bipm.org/utils/common/pdf/si_brochure_8_en.pdf |publisher=[[Bureau International des Poids et Mesures]] |orig-year=2006 |year=2014 |accessdate=26 June 2018}} This documents links to the NIST document in section 4.2 &quot;Other non-SI units not recommended for use&quot;.
 * {{cite book |last1=Thompson |first1=Ambler |last2=Taylor |first2=Barry N. |title=Guide for the Use of the International System of Units (SI) - Publication 811, 2008 Edition, 2nd printing |date=November 2008 |url=https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication811e2008.pdf |publisher=[[National Institute of Standards and Technology]], U.S. Department of Commerce |accessdate=26 June 2018}}
 
 The NIST document gives conversion factors correct to 7 places. Factors in bold are exact. If exact factors have more than 7 places, they are rounded and no longer exact. This convert module replaces these rounded figures with the exact figures. For example, the NIST document has 1 square mile = 2.589 988 E+06 square meters. The convert template has 1 square mile = 2,589,988.110336 square meters.
 
 Values for the fundamental physical constants come from the ''NIST Reference on Constants, Units, and Uncertainty'', either the 2010 or the 2014 version. The 2018 version is in preparation. While the articles on the units should be updated as the new versions come out every four years, the few more [[significant figures]] provided are probably not necessary for the way this template is used. 
 * {{cite web |title=CODATA 2010 Table at NIST |url=https://physics.nist.gov/cuu/pdf/all_2010.pdf}} From {{cite journal |last1=Mohr |first1=Peter J. |last2=Taylor |first2=Barry N. |last3=Newell |first3=David B. |title=CODATA recommended values of the fundamental physical constants: 2010 |journal=Reviews of Modern Physics|volume=84 |issue=4 |year=2012 |pages=1527–1605 |doi=10.1103/RevModPhys.84.1527}}
 * {{cite web |title=CODATA 2014 Table at NIST |url=https://physics.nist.gov/cgi-bin/cuu/Category?view=pdf&amp;All+values.x=57&amp;All+values.y=9}} From {{cite journal |last1=Mohr |first1=Peter J. |last2=Newell |first2=David B. |last3=Taylor |first3=Barry N. |title=CODATA recommended values of the fundamental physical constants: 2014 |journal=Reviews of Modern Physics |volume=88 |issue=3 |year=2016 |doi=10.1103/RevModPhys.88.035009}}
 
 Definitions for additional historical measures are found in sources such as
 * {{cite book |last=Fenna |first=Donald |title=A Dictionary of Weights, Measures, and Units |year=2002 |publisher=Oxford University Press |isbn=978-0-19-107898-9}}
 
 == Table format ==
 === Format ===
 The script that reads this page ignores everything except for the wikitext in the following sections:
 :: &lt;code&gt;{{nowrap|1=== Conversions ==}}&lt;/code&gt;
 :: &lt;code&gt;{{nowrap|1=== Input multiples ==}}&lt;/code&gt;
 :: &lt;code&gt;{{nowrap|1=== Output multiples ==}}&lt;/code&gt;
 :: &lt;code&gt;{{nowrap|1=== Combinations ==}}&lt;/code&gt;
 :: &lt;code&gt;{{nowrap|1=== Defaults ==}}&lt;/code&gt;
 :: &lt;code&gt;{{nowrap|1=== Links ==}}&lt;/code&gt;
 :: &lt;code&gt;{{nowrap|1=== Automatic per units ==}}&lt;/code&gt;
 :: &lt;code&gt;{{nowrap|1=== Overrides ==}}&lt;/code&gt;
 :: &lt;code&gt;{{nowrap|1=== Variable names ==}}&lt;/code&gt; {{green|(used at [[:sl:Module:Convert/documentation/conversion data/dok#Variable names|slwiki]])}}
 
 In those sections, a level-3 heading (like &lt;code&gt;{{nowrap|1==== Length ===}}&lt;/code&gt;) starts a table that defines units of a certain type. In the subsection, lines that start with &lt;code&gt;|&lt;/code&gt; are processed (all other lines, and lines that start with &lt;code&gt;|-&lt;/code&gt; or &lt;code&gt;|}&lt;/code&gt;, are ignored). A processed line is split into fields (delimited with &lt;code&gt;||&lt;/code&gt;), and leading/trailing whitespace is removed from each field. Empty fields in the Conversions section are given a default value (for example, the plural of ''yard'' is formed by adding ''s'', and the US names are also ''yard'' and ''yards'').
 
 The second field in each row of the Conversions section normally specifies a unit's symbol, but it can be used for other purposes described in the following. In some cases the text in the second field can be long, and it is convenient to insert &lt;code&gt;colspan=&quot;11&quot;&amp;nbsp;|&lt;/code&gt; before the text to avoid it wrapping in a narrow column. Any such &lt;code&gt;colspan&lt;/code&gt; at the start of the second field is ignored.
 
 === Alias ===
 Some unit codes are an alias for another spelling of the unit code. For example, the code &lt;code&gt;ft2&lt;/code&gt; is an alias for &lt;code&gt;sqft&lt;/code&gt;, and that is indicated by entering &lt;code&gt;=sqft&lt;/code&gt; in the Symbol column for the &lt;code&gt;ft2&lt;/code&gt; entry. An alias can only be entered after the primary unit has been defined (the &lt;code&gt;sqft&lt;/code&gt; entry must precede the &lt;code&gt;ft2&lt;/code&gt; entry).
 
 Normally there are no other entries on an alias line, however, the following may be used:
 *&lt;code&gt;default = ''unit code''&lt;/code&gt; to specify that the alias has a default output that is different from the primary unit
 *&lt;code&gt;link = ''link text''&lt;/code&gt; to specify that the alias has a link that is different from the primary unit
 *&lt;code&gt;multiplier = ''number''&lt;/code&gt; used as &quot;multiplier = 100&quot; with unit code &lt;code&gt;100km&lt;/code&gt; to define a unit that is 100 times the size of a kilometre
 *&lt;code&gt;sp=us&lt;/code&gt; (or &lt;code&gt;sp = us&lt;/code&gt;) to specify that using the alias forces US spelling for that unit
 *&lt;code&gt;symbol = ''symbol text''&lt;/code&gt; to specify that the alias has a symbol that is different from the primary unit
 *&lt;code&gt;symlink = ''link text''&lt;/code&gt; to specify that the alias has a different link when abbreviated (&quot;symbol link&quot;)
 
 === Per units ===
 A unit can be defined as a ratio of two other units. For example, &lt;code&gt;L/km&lt;/code&gt; can be defined as &quot;liters per kilometer&quot; by entering &lt;code&gt;==L/km&lt;/code&gt; as the symbol for the unit. A single &quot;&lt;code&gt;=&lt;/code&gt;&quot; is used with an alias to specify that a unit code is an alternative name for another unit. By contrast, if &quot;&lt;code&gt;==&lt;/code&gt;&quot; is used, the unit code is defined as the first unit &quot;per&quot; the second.
 
 As well as a ratio of two units, a per unit can be of the form &quot;currency per unit&quot;. The module recognizes &quot;$&quot; and &quot;£&quot; as currency symbols and shows them appropriately. For example, the input &lt;code&gt;|120|$/acre&lt;/code&gt; would be displayed as &quot;$120 per acre&quot;, or &quot;$120/acre&quot; if abbreviated.
 
 The definition for a per unit can be followed by the same modifiers available for an alias.
 
 === Should be ===
 Some unit codes should not be used—if such a code is used, the template displays an error message telling the editor what unit code should be entered. For example, the code &lt;code&gt;feet&lt;/code&gt; should not be used, and that is indicated by entering &lt;code&gt;!''Message''&lt;/code&gt; in the Symbol column for the &lt;code&gt;feet&lt;/code&gt; entry. There should be no other entries on an error line. The ''Message'' text is displayed as an error if &lt;code&gt;feet&lt;/code&gt; is used in a conversion. The text should use the special format codes &lt;code&gt;%{&lt;/code&gt; and &lt;code&gt;%}&lt;/code&gt; on each side of a unit code. The format codes are replaced with wikitext defined in [[Module:Convert]], and which applies a consistent style to each displayed unit code.
 
 === Use name ===
 Some units generally use their name, rather than a symbol. That is indicated by inserting &lt;code&gt;~&lt;/code&gt; before the symbol. For example, the code &lt;code&gt;acre&lt;/code&gt; has symbol &lt;code&gt;~acre&lt;/code&gt; which means results will use the singular name &quot;acre&quot;, or the plural name &quot;acres&quot;, depending on the value.
 
 === Use unit code for default ===
 Some units have a symbol prefixed with &lt;code&gt;*&lt;/code&gt;, for example, the symbol given for &lt;code&gt;pitch&lt;/code&gt; is &lt;code&gt;*µm&lt;/code&gt;. Normally, when units are looked up in the [[#Defaults|Defaults]] or [[#Links|Links]] exception tables, the symbol of the unit is used. However, pitch has a symbol that conflicts with micrometre. The &lt;code&gt;*&lt;/code&gt; prefix means that the unit code for &lt;code&gt;pitch&lt;/code&gt; is used to look up exceptions, not the symbol.
 
 === SI prefixes ===
 The prefix column should be empty if SI prefixes are not used, &lt;code&gt;SI&lt;/code&gt; for a unit that accepts SI prefixes, &lt;code&gt;SI2&lt;/code&gt; for a unit code that indicates a base unit squared, and &lt;code&gt;SI3&lt;/code&gt; for cubed. For example when defining unit code &lt;code&gt;m2&lt;/code&gt; put &lt;code&gt;SI2&lt;/code&gt; here, and for &lt;code&gt;m3&lt;/code&gt; say &lt;code&gt;SI3&lt;/code&gt;.  This will scale, for example, &lt;code&gt;km2&lt;/code&gt; to 1000&amp;nbsp;×&amp;nbsp;1000 of the base unit, &lt;code&gt;m&lt;/code&gt;, or scale &lt;code&gt;mm3&lt;/code&gt; to 0.001&amp;nbsp;×&amp;nbsp;0.001&amp;nbsp;×&amp;nbsp;0.001 of the base unit &lt;code&gt;m&lt;/code&gt;.
 
 === Name ===
 The name of the unit is required. The plural name is optional. If no plural name is given, it is created by appending &quot;s&quot; to the singular name. For example, the &lt;code&gt;ft&lt;/code&gt; unit has name &quot;foot&quot; and plural name &quot;feet&quot;—the plural name is necessary to avoid the plural of &quot;foot&quot; being &quot;foots&quot;.
 
 The US name is optional. If no US name is given, it is the same as the normal name. The US plural name is optional—if it is missing it is created by appending &quot;s&quot; to the US name. When using {{tl|convert}}, the option {{para|sp|us}} causes the US name to be displayed if a name is required for the convert.
 
 Any &lt;code&gt;%s&lt;/code&gt; in the name columns is replaced with the appropriate SI prefix, or is removed if SI prefixes are not appropriate (not suitable for the unit, or not used in the conversion). It is only necessary to use &lt;code&gt;%s&lt;/code&gt; if the unit accepts prefixes, and if the prefix is not at the start of the unit's name, for example with &lt;code&gt;m2&lt;/code&gt; and &lt;code&gt;m3&lt;/code&gt;.
 
 === Exceptions ===
 Spelling exceptions can be handled by entering a row with the exception. For example, see &lt;code&gt;ha&lt;/code&gt; which sets the unit name to &quot;hectare&quot;; without that row, the &lt;code&gt;a&lt;/code&gt; row would cause &lt;code&gt;ha&lt;/code&gt; to have the name &quot;hectoare&quot;. There must be an [[#Override|override]] to document that an exception is intended.
 
 === Scale ===
 The scale is a value or expression that is used as a factor to convert a value to its corresponding base unit. Commas may be used as a thousand separator (e.g. &lt;code&gt;1,000,000&lt;/code&gt;) or [[Scientific_notation#E_notation|e notation]] may be used (e.g. &lt;code&gt;1e6&lt;/code&gt;). Fractions should be used when required for exactness (e.g. &lt;code&gt;1/12&lt;/code&gt;).
 
 === Extra ===
 The &lt;code&gt;Extra&lt;/code&gt; column is usually empty, but can contain a value or code when more than a simple &lt;code&gt;Scale&lt;/code&gt; is required for a conversion. There are two codes used with fuel efficiency units: &lt;code&gt;volume/length&lt;/code&gt; and &lt;code&gt;length/volume&lt;/code&gt;. In addition, certain codes are required to indicate that the conversion procedure for the unit is built-in to the module. Any other text is used as an offset in the conversion calculation that occurs with temperature units.
 
 === Built-in units ===
 The conversion procedure for some units (for example, the &lt;code&gt;Mach&lt;/code&gt; unit of speed) are built into [[Module:Convert]] as they are too complex to be specified in a table. That is indicated by entering a code (which must be the same as used in the module) in the Extra column.
 
 The script that reads this page contains a small amount of built-in data that does not conveniently fit into the tables below (see &lt;code&gt;set_builtins&lt;/code&gt; in [[Module:Convert/makeunits|makeunits]]).
 
 === Default ===
 A default is a code for a unit or combination that identifies the output unit or units that will be used if none is specified in the convert template. The [[#Defaults|Defaults]] section defines exceptions for unit codes with an SI prefix, where the default output is different from that of the base unit. Also, units using [[#Engineering notation|engineering notation]] may appear in the defaults section to define a default output for the unit.
 
 A default may specify a unit code or an expression that tests the input value, and which produces one of two different outputs depending on that value. In the expression, &lt;code&gt;v&lt;/code&gt; represents the input value specified in the convert template, and exclamation marks (&lt;code&gt;!&lt;/code&gt;) are used to separate the expression into either three or four fields. For example, the following expression might be used as the default for unit &lt;code&gt;in&lt;/code&gt; (inch):
 : &lt;code&gt;v &lt; 36 ! mm ! cm&lt;/code&gt;
 The first field is a condition which evaluates to ''true'' or ''false''. In this example, if the input value is less than 36, the default output unit is &lt;code&gt;mm&lt;/code&gt;; otherwise, it is &lt;code&gt;cm&lt;/code&gt;.
 
 If present, the fourth field is appended to the result. For example, the following expression might be used for unit &lt;code&gt;Ml&lt;/code&gt; (megalitre):
 : &lt;code&gt;v &lt; 28.316846592 ! e3 ! e6 ! cuft&lt;/code&gt;
 If the condition is true, the result is &lt;code&gt;e3cuft&lt;/code&gt;; otherwise, it is &lt;code&gt;e6cuft&lt;/code&gt;.
 
 === Composite ===
 A composite input unit consists of two standard units, where the second is a subdivision of the first. For example, &lt;code&gt;|2|ft|6|in&lt;/code&gt; may be used to specify 2&amp;nbsp;feet 6&amp;nbsp;inches as the input unit in a conversion. See the [[#Input multiples|Input multiples]] section.
 
 Composites are defined in pairs, but any number of pairs can be used to specify an input. For example, given that &lt;code&gt;ch&lt;/code&gt; is defined as a subdivision of &lt;code&gt;mi&lt;/code&gt;, and that &lt;code&gt;ft&lt;/code&gt; is a subdivision of &lt;code&gt;ch&lt;/code&gt;, an input length could be specified as &lt;code&gt;1|mi|2|ch|3|ft&lt;/code&gt;. Also, with suitable pairs defined, an input length could be specified as &lt;code&gt;4|mi|3|yd|2|ft|1|in&lt;/code&gt;. There is no limit to the number of permitted subunits.
 
 === Multiple ===
 A multiple is a unit code that can be used as an output. For example, &lt;code&gt;ftin&lt;/code&gt; is a multiple that results in a length being expressed in feet and inches. A multiple may have any number of components defined in the [[#Output multiples|Output multiples]] section, where each component is a subdivision of the preceding unit.
 
 === Link ===
 The link column is the title of the article related to that unit. If the link is preceded with &lt;code&gt;+&lt;/code&gt; or &lt;code&gt;*&lt;/code&gt;, extra text will be inserted before the link, and the text shown by the link will be adjusted to omit a prefix of &quot;US&quot; or &quot;U.S.&quot;, if present. For example, if a unit has the symbol &quot;US gal&quot; (or &quot;U.S. gal&quot;), and if the link is &lt;code&gt;&lt;nowiki&gt;+[[Gallon]]&lt;/nowiki&gt;&lt;/code&gt;, then if the symbol is linked, it would appear as &quot;[[United States customary units|US]] [[Gallon|gal]]&quot; (&quot;US&quot; and &quot;gal&quot; link to two different articles). If the link is &lt;code&gt;&lt;nowiki&gt;*[[Gallon]]&lt;/nowiki&gt;&lt;/code&gt;, it would appear as &quot;[[United States customary units|U.S.]] [[Gallon|gal]]&quot;.
 
 Similarly, if the link is preceded with &lt;code&gt;@&lt;/code&gt;, extra text will be inserted before the link, and the text shown by the link will be adjusted to omit a prefix of &quot;imp&quot; or &quot;imperial&quot;, if present. For example, if a unit has the symbol &quot;imp gal&quot;, and if the link is &lt;code&gt;&lt;nowiki&gt;@[[Gallon]]&lt;/nowiki&gt;&lt;/code&gt;, then if the symbol is linked, it would appear as &quot;[[Imperial unit|imp]] [[Gallon|gal]]&quot; (&quot;imp&quot; and &quot;gal&quot; link  two different articles).
 
 The [[#Links|Links]] section defines exceptions for unit codes with an SI prefix, where the linked article is different from that of the base unit.
 
 Pipe characters (&lt;code&gt;|&lt;/code&gt;) in a table need to be [[Character encodings in HTML|encoded]]. For example, &quot;&lt;code&gt;&lt;nowiki&gt;[[Gallon|gal]]&lt;/nowiki&gt;&lt;/code&gt;&quot; should be entered as &quot;&lt;code&gt;&lt;nowiki&gt;[[Gallon&amp;amp;#124;gal]]&lt;/nowiki&gt;&lt;/code&gt;&quot;. The script that reads this page replaces each &lt;code&gt;&amp;amp;#124;&lt;/code&gt; with &lt;code&gt;|&lt;/code&gt;.
 
 === Override ===
 Some unit codes match a unit with an SI prefix, and duplicate unit codes are not permitted. For example, &lt;code&gt;Pa&lt;/code&gt; can be interpreted as &quot;peta-are&quot; which would prevent the &lt;code&gt;pascal&lt;/code&gt; unit of pressure being defined after the &lt;code&gt;are&lt;/code&gt; unit of area. However, listing &lt;code&gt;Pa&lt;/code&gt; in the [[#Overrides|Overrides]] section means that the pascal unit can be defined, in which case peta-are will not be available.
 
 === Conventions ===
 Some unit codes are not intended to be used in a template, but are needed to define exceptions. For example, the code &lt;code&gt;ft&lt;/code&gt; has link [[Foot (unit)]], but unit &lt;code&gt;psi/ft&lt;/code&gt; needs &lt;code&gt;ft&lt;/code&gt; to be linked to [[Fracture gradient]]. To handle such cases, a unit code starting with &quot;&lt;code&gt;-&lt;/code&gt;&quot; is used (&lt;code&gt;-ft-frac&lt;/code&gt; for feet with a link to fracture gradient).
 
 If needed, more dashes can be used to define additional exceptions (for example, see &lt;code&gt;-Scwt&lt;/code&gt; and &lt;code&gt;--Scwt&lt;/code&gt;, which are similar to &lt;code&gt;Scwt&lt;/code&gt; but have different names).
 
 == Engineering notation ==
 In addition to the units defined in the data below, large scale units such as &lt;code&gt;e6km&lt;/code&gt; (million kilometres) may be used. The following prefixes may be used, and the linked names are shown if {{para|lk|on}}:
 * &lt;code&gt;e3&lt;/code&gt; (thousand)
 * &lt;code&gt;e6&lt;/code&gt; (million)
 * &lt;code&gt;e9&lt;/code&gt; ([[1000000000 (number)|billion]])
 * &lt;code&gt;e12&lt;/code&gt; ([[1000000000000 (number)|trillion]])
 * &lt;code&gt;e15&lt;/code&gt; ([[1000000000000000 (number)|quadrillion]])
 
 Any standard unit (not a combination, multiple, or built-in) may be used after an engineering notation prefix, including &quot;temperature change&quot; units, but not &quot;temperature&quot; units.
 
 == Notes on units ==
 === Energy and torque ===
 By convention, units written as force-distance (such as lbft or kgf.m) are torque, and those written as distance-force (such as ftlbf) are energy. See [[WP:MOSNUM#Unit names]] and the [[WT:Manual of Style/Dates and numbers/Archive 135#Foot-pounds and pound-feet|discussion]], and see [[Pound-foot (torque)]] and [[Foot-pound (energy)]].
 
 However, some topics use traditional units that conflict with the above convention. To handle these, [[Module:Convert/makeunits]] includes a &lt;code&gt;specials&lt;/code&gt; table that adds an &quot;alttype&quot; (alternate type) field to certain whitelisted units. The alttype field allows conversion between units of different type, provided each unit is whitelisted to allow the conversion.
 
 As at December 2013, the following energy units have alttype = &quot;torque&quot; (the first line consists of different units, while the second line consists of aliases for units in the first line):
 *ftlb, ftlb-f, ftlbf, inlb, inlb-f, inlbf, inoz-f, inozf
 *ft.lbf, ft·lb-f, ft·lbf, in.lb-f, in.lbf, in.oz-f, in.ozf, in·lb-f, in·lbf, in·oz-f, in·ozf
 
 The following torque units have alttype = &quot;energy&quot;:
 *Nm
 *N.m, N·m
 
 For example, the following conversion works despite the fact that Nm is torque and ftlbf is energy: