Template:Convert

From Mercedes Wiki

Jump to: navigation, search
[edit] Template-info.svg Template documentation

Note


{{Convert}} no longer accepts kt as code for the knot. The code kt will be reassigned for the kilotonne. Please use kn instead. Sorry for any inconvenience.

The codes sqm and sqkm have also been removed. Use m2 and km2.

Purpose


To show measurement quantities as primary and converted secondary units, with optional abbreviation or slash, such as distance "32 metres (100 ft)" or temperature "18 °C (64 °F)" or "18 °C/64 °F" with optional US spellings or hyphenation.

Usage


Single value:

{{convert|original_value|original_unit|conversion_unit|round_to|...}}

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

{{convert|orig_val1|range|orig_val2|original_unit|conversion_unit|round_to|...}}
Notes
  • 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 oz, 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.

Examples

Single value:

InputDisplays as
{{convert|3.21|kg|lb}}3.21 kilograms (7.1 lb)
{{convert|3.21|kg|lb|0}}3.21 kilograms (7 lb)
{{convert|0|kg|lb}}0 kilograms (0 lb)
{{convert|6|ft|5|in|m}}6 feet 5 inches (2.0 m)
{{convert|18|°C|°F}}18 °C (64 °F)
{{convert|1250|sqft|m2|lk=in|sigfig=2}} 1,250 Square foot (120 m2)
See that 'lk=in' applies link to input unit only. This example is for illustration only, common units of measurement should not be linked. See: wp:overlink.
{{convert|20.5|km2|sqmi|lk=out|abbr=on}}20.5 km2 (7.9 Square mile)
See that 'lk=out' applies link to output unit only. This example is for illustration only, common units of measurement should not be linked. See: wp:overlink.
{{convert|641|acre|km2 sqmi|lk=on}}641 Acre (2.59 Square kilometre; 1.002 Square mile)
See that 'lk=on' applies links to input and output units. This example is for illustration only, common units of measurement should not be linked. See: wp:overlink.
{{convert|641|acre|km2 sqmi|2|lk=on}}641 Acre (2.59 Square kilometre; 1.00 Square mile)
Note that because 640 acres equals one square mile; 641 acres rounded to two decimal places equals 1.00 sq mi.

Range of values (not yet operational for all units):

InputDisplays as
{{convert|60|and|170|kg|lb}}60 and 170 kilograms (130 and 370 lb)
{{convert|60|to|170|kg|lb}}60 to 170 kilograms (130 to 370 lb)
{{convert|60|to(-)|170|kg|lb}}60 to 170 kilograms (130–370 lb)
{{convert|60|-|170|kg|lb}}60–170 kilograms (130–370 lb)
{{convert|60|by|120|m|ft}}60 by 120 metres (200 ft × 390 ft)
{{convert|60|x|120|m|ft}}60 by 120 metres (200 ft × 390 ft)
{{convert|60|+/-|10|m|ft}}60 ± 10 metres (200 ± 33 ft)

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

Parameters

Use United States spelling attach |sp=us
Make units wikilinked attach |lk=on to link all units
attach |lk=in to link only the input units
attach |lk=out to link only the output units
(The manual of style suggests that you should not link common units of measurement).
Use the adjective form attach |adj=on (e.g. "The 190-foot (58 m) bridge" as opposed to "The 190 feet..."). This produces the adjective form—the unit name in the singular with a hyphen (according to the WP:HYPHEN).
Abbreviate all units attach |abbr=on
Use a / instead of ( ) attach |disp=s (or |disp=/) (e.g. 190 foot/58 metre). Note that when using slashes all unit names either spelt out in full or abbreviated (where there exists an abbreviation).
Use in a table attach |disp=table Note: For use in tables the template must start on a new line after a pipe. Only the number will be displayed unless you set |abbr=on, |lk=on, |lk=in or |lk=out. Example: Phnom Penh
Round to a specified number of significant figures attach |sigfig={some non-negative integer}. In the case of temperatures Celsius or Fahrenheit this refers to the difference with the absolute-zero temperature. For example, at room temperature two significant digits means rounded to tens of degrees.
Let Convert decide the unit to convert to skip the convert to parameter (which would otherwise be third unnamed parameter) e.g. {{convert|100|mi|0}} gives 100 miles (161 km).
Display input value as a fraction {{convert|3/8|in|mm|3|abbr=on}} 3/8 in (9.525 mm) or {{convert|11+1/4|in|cm|2|abbr=on}}11+1/4 in (11.64 cm)

Parameters still under construction

Parameters still under construction. May not work in all situations
disp=orSimilar to disp=s except the word "or" will be placed between the values. Does not currently work with multiple conversions (e.g. Liters to U.S. and imperial gallons) ({{convert|20|mi|km|disp=or}})--->(20 miles or 32 kilometres)
disp=tablecenSimilar to disp=table except that the values with be centered within the column. See the tables at La Nouvelle branch for in use examples.

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 |sigfig={some non-negative integer} 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. {{convert|55|nmi|km mi}} produces "55 nautical miles (102 km; 63 mi)".

Without box: Template:Convert/list of units.

Abridged list of units supported by {{Convert}}
Explanation
system unit code
(alternative)
abbreviation notes conversion factor combinations
the system(s) to which the unit belongs units listed by name codes that can be entered when using the template abbreviations as displayed by the template notes which may pertain to the units in general or specifically to their use in this template conversion factors used by the template to convert to and from the SI base unit codes for multiple conversions


Length
(Full list)
system unit code
(alternative)
abbreviation notes conversion factor/m combinations
International System of Units Megametre Mm Mm US spelling: megameter
1,000,000
Kilometre km km US spelling: kilometer
1,000
  • km mi
Metre m m US spelling: meter
1
  • m ft
  • m ftin
Centimetre cm cm US spelling: centimeter
0.01
  • cm in
Millimetre mm mm US spelling: millimeter
0.001
  • mm in
Micrometre μm (um) µm US spelling: micrometer
0.000001
Nanometre nm nm US spelling: nanometer
0.000000001
non-SI Metric system Ångström Å
(angstrom)
Å 0.0000000001
Imperial unit
&
United States customary units
Mile mi mi 1,609.344
  • mi km
Furlong furlong 201.168
Chain (unit) chain 20.1168
Rod (unit) rd rd For other names of this unit see the full list. 5.0292
Fathom fathom assumes 1 fathom ≡ 6 ft 1.8288
Yard yd yd assumes the international definition 0.9144
Foot (length) ft (foot) ft The foot code will produce foot as the plural form. 0.3048
  • ft m (foot m)
Hand (length) hand h 0.1016
Inch in in 0.0254
  • in cm
  • in mm
Other Nautical mile nmi nmi the International standard nautical mile
For other nautical miles see the full list.
1,852
Parsec pc pc 3.0856775813100×10^16
Light-year ly ly 9.4607304725800×10^15
Astronomical unit AU AU 149,597,870,691


Area
(Full list)
system unit code
(alternative)
abbreviation notes conversion factor/m² combinations
SI Square kilometre km2 km2 US spelling: square kilometer
1,000,000
  • km2 sqmi
Square metre m2 m2 US spelling: square meter
1
  • m2 sqft
Square centimetre cm2 cm² US spelling: square centimeter
0.0001
  • cm2 sqin
Square millimetre mm2 mm² US spelling: square millimeter
0.000001
  • mm2 sqin
non-SI metric Hectare ha ha 10,000
Imperial
&
US customary
Square mile sqmi sq mi 2,589,988.110336
  • sqmi km2
Acre acre 4,046.856422
Square yard sqyd sq yd 0.83612736
Square foot sqft
(sqfoot)
sq ft The sqfoot code will produce square foot as the plural form. 0.09290304
  • sqft m2 (sqfoot m2)
Square inch sqin sq in 0.00064516
  • sqin cm2
Other Nautical mile sqnmi sq nmi 3,429,904
Dunam dunam For alternative spellings and definitions see the full list 1,000
Japanese units of measurement tsubo (400/121)


Volume
(Full list)
system unit code
(alternative)
abbreviation notes conversion factor/m³ combinations
SI Cubic metre m3 m3 US spelling: cubic meter
one kilolitre
1
Cubic centimetre cm3 cm³ US spelling: cubic centimeter
one millilitre
0.000001
cc cc
Cubic millimetre mm3 mm³ US spelling: cubic millimeter
0.000000001
non-SI metric Kilolitre kl kl US spelling: kiloliter
one cubic metre
1
kL kL
Litre l l US spelling: liter
one cubic decimetre
Triple combinations are also possible. See the full list.
0.001
  • l impgal
  • l USgal
  • l U.S.gal
  • l USdrygal
  • l U.S.drygal
L L
  • L impgal
  • L USgal
  • L U.S.gal
  • L USdrygal
  • L U.S.drygal
Centilitre cl cl US spelling: centiliter
0.00001
cL cL
Millilitre ml ml US spelling: milliliter
one cubic centimetre
0.000001
  • ml impoz
  • ml USoz
  • ml U.S.oz
mL mL
  • mL impoz
  • mL USoz
  • mL U.S.oz
Imperial
&
US customary
Cubic yard cuyd cu yd 0.764554857984
Cubic foot cuft (cufoot) cu ft The cufoot code will produce cubic foot as the plural form. 0.028316846592
Cubic inch cuin cu in 0.000016387064
Imperial Barrel (unit) impbbl imp bbl 36 imp gal 0.16365924
Bushel impbsh imp bsh 8 imp gal 0.03636872
impbu imp bu
Gallon impgal imp gal 4.54609 litres by definition, also
4 imp qt or 8 imp pt or 160 imp fl oz
Triple combinations are also possible. See the full list.
0.00454609
  • impgal l
  • impgal L
  • impgal USgal
  • impgal U.S.gal
  • impgal USdrygal
  • impgal U.S.drygal
Quart impqt imp qt 1/4 imp gal or 40 imp fl oz 0.0011365225
Pint imppt imp pt 1/8 imp gal or 20 imp fl oz 0.00056826125
Fluid ounce impoz (impfloz) imp fl oz 1/160 imp gal 0.0000284130625
  • impoz USoz
  • impoz U.S.oz
  • impoz ml
  • impoz mL
US customary
liquid measure
Barrel (unit) USbbl US bbl 31½ US gal
used for liquids except for oil and beer (see the full list)
0.119240471196
U.S.bbl U.S. bbl
Barrel (unit) oilbbl bbl 42 US gal 0.158987294928
Barrel (unit) USbeerbbl
(usbeerbbl)
US bbl 0.117347765304
U.S.beerbbl
(usbeerbbl)
U.S. bbl
Gallon USgal US gal 231 cubic inches by definition, also
4 US qt or 8 US pt or 128 US fl oz
Triple combinations are also possible. See the full list.
0.003785411784
  • USgal l
  • USgal L
  • USgal impgal
U.S.gal U.S. gal
  • USgal l
  • USgal L
  • USgal impgal
Quart USqt US qt 1/4 US gal or 32 US fl oz 0.000946352946
U.S.qt U.S. qt
Pint USpt US pt 1/8 US gal or 16 US fl oz 0.000473176473
U.S.pt U.S. pt
Fluid ounce USoz
(USfloz)
US fl oz 1/128 US gal 0.0000295735295625
  • USoz ml
  • USoz mL
  • USoz impoz
U.S.oz
(U.S.floz)
U.S. fl oz
  • U.S.oz ml
  • U.S.oz mL
  • U.S.oz impoz
US customary
dry measure
Barrel (unit) USdrybbl US bbl 105/32 US bsh 0.11562819898508
U.S.drybbl U.S. bbl
Bushel USbsh US bsh 2150.42 cubic inches by definition 0.03523907016688
USbu U.S. bu
U.S.bsh U.S. bsh
U.S.bu U.S. bu
Gallon USdrygal US dry gal 1/8 US bsh
Triple combinations are also possible. See the full list.
0.00440488377086
  • USdrygal l
  • USdrygal L
  • USdrygal impgal
U.S.drygal U.S. dry gal
  • U.S.drygal l
  • U.S.drygal L
  • U.S.drygal impgal
Quart USdryqt US dry qt 1/32 US bsh 0.001101220942715
U.S.dryqt U.S. dry qt
Pint USdrypt US dry pt 1/32 US bsh 0.0005506104713575
U.S.drypt U.S. dry pt


Speed
(Full list)
system unit code
(alternative)
abbreviation notes conversion factor/(m/s) combinations
SI Metre per second m/s m/s US spelling: meter per second
1
  • m/s ft/s (m/s foot/s)
non-SI metric Kilometres per hour km/h km/h US spelling: kilometer per hour
(5/18)
  • km/h mph
Imperial
&
US customary
Miles per hour mph mph 0.44704
  • mph km/h
Feet per second ft/s (foot/s) ft/s The foot/s code will produce foot per second as the plural form. 0.3048
  • ft/s m/s
Maritime units Knot (speed) kn (knot) kn (4.63/9)


Force
(Full list)
system unit code
(alternative)
abbreviation notes conversion factor/N combinations
SI Newton GN GN Triple combinations are also possible. See the full list. 1,000,000,000
  • GN LT-f
  • GN LTf
  • GN L/T-f
  • GN L/Tf
  • GN ST-f
  • GN STf
  • GN S/T-f
  • GN S/Tf
Newton MN MN Triple combinations are also possible. See the full list. 1,000,000
  • MN LT-f
  • MN LTf
  • MN L/T-f
  • MN L/Tf
  • MN ST-f
  • MN STf
  • MN S/T-f
  • MN S/Tf
Newton kN kN Triple combinations are also possible. See the full list. 1,000
  • kN LT-f
  • kN LTf
  • kN L/T-f
  • kN L/Tf
  • kN ST-f
  • kN STf
  • kN S/T-f
  • kN S/Tf
Newton N N 1
  • N lb-f
  • N lbf
  • N oz-f
  • N ozf
Newton mN mN 0.001
  • mN oz-f
  • mN ozf
  • mN gr-f
  • mN grf
Newton μN (uN) µN 0.000001
  • μN gr-f
  • μN grf
Newton nN nN 0.000000001
  • nN gr-f
  • nN grf
cgs Dyne Mdyn Mdyn 10
Dyne kdyn kdyn 0.01
Dyne dyn
(dyne)
dyn 0.00001
Dyne mdyn mdyn 0.00000001
Metric gravitational units Kilogram-force t-f tf 9,806.65
tf tf
Kilogram-force kg-f kgf 9.80665
kgf kgf
Kilogram-force g-f gf 0.00980665
gf gf
Kilogram-force mg-f mgf 0.00000980665
mgf mgf
Avoirdupois-based units Poundal pdl pdl 0.138254954376
Ton LT-f LTf 9,964.01641818352
  • LT-f ST-f
LTf LTf
  • LTf STf
L/T-f L/Tf
  • L/T-f S/T-f
L/Tf L/Tf
  • L/Tf S/Tf
Ton ST-f STf 8,896.443230521
  • ST-f LT-f
STf STf
  • STf LTf
S/T-f S/Tf
  • S/T-f L/T-f
S/Tf S/Tf
  • S/Tf L/Tf
Pound-force lb-f lbf 4.4482216152605
lbf lbf
Pound-force oz-f ozf 0.2780138203095378125
ozf ozf
Pound-force gr-f grf 0.0006354602307515
grf grf


Energy
(Full list)
system unit code
(alternative)
abbreviation notes conversion factor/J combinations
International System of Units Joule GJ GJ 1,000,000,000
Joule MJ MJ 1,000,000
Joule kJ kJ 1,000
Joule hJ hJ 100
Joule daJ daJ 10
Joule J J 1
Joule dJ dJ 0.1
Joule cJ cJ 0.01
Joule mJ mJ 0.001
Joule μJ (uJ) µJ 0.000001
Joule nJ nJ 0.000000001
Centimetre gram second system of units Erg Merg Merg 0.1
Erg kerg kerg 0.0001
Erg erg erg 0.0000001
Watt-hour multiples Watt-hour TWh TWh 3.6×10^15
TW.h TW·h
Watt-hour GWh GWh 3.6×10^12
GW.h GW·h
Watt-hour MWh MWh 3,600,000,000
MW.h MW·h
Watt-hour kWh kWh 3,600,000
kW.h kW·h
Watt-hour Wh Wh 3,600
W.h W·h
Electronvolt multiples Electronvolt GeV GeV 0.0000000001602176487
Electronvolt MeV MeV 1.6021764870×10^−13
Electronvolt keV keV 1.6021764870×10^−16
Electronvolt eV eV 1.6021764870×10^−19
Electronvolt meV meV 1.6021764870000×10^−22
Calorie multiples Calorie Cal Cal The thermochemical calorie is the default definition. For other definitions see the full list. 4,184
Calorie Mcal Mcal 4,184,000
Calorie kcal kcal 4,184
Calorie cal cal 4.184
Calorie mcal mcal 0.004184
Pound-force-Foot (length)/
Inch-Hour-Minute-Second
Foot-poundal ftpdl ft·pdl 0.0421401100938048
Foot-pound force ftlbf ft·lbf 1.3558179483314004
ftlb-f ft·lbf
Foot-pound force inlbf in·lbf 0.1129848290276167
inlb-f in·lbf
Foot-pound force inozf in·ozf 0.00706155181422604375
inoz-f in·ozf
Horsepower hph hp·h 2,684,519.537696172792
British thermal unit British thermal unit Btu Btu The International Steam Table British thermal unit is the default definition. For other definitions see the full list. 1,055.05585262
BTU BTU
TNT equivalent-based units TNT equivalent GtTNT 4.184×10^18
TNT equivalent GtonTNT
TNT equivalent MtTNT 4.184×10^15
TNT equivalent MtonTNT Mt
TNT equivalent ktTNT 4.184×10^12
TNT equivalent ktonTNT
TNT equivalent tTNT 4,184,000,000
TNT equivalent tonTNT
Other Hartree Eh Eh 4.3597441700000×10^−18
Rydberg constant Ry Ry 2.1798741×10^−18
Tonne of oil equivalent toe toe 41,868,000,000
Barrel of oil equivalent BOE BOE 6,117,863,200
Conversion of units cuftnaturalgas
(cufootnaturalgas)
The cufootnaturalgas code will produce cubic foot of natural gas as the plural form. 1,055,055.85262
Atmosphere (unit) latm l·atm 101.325
Latm L·atm
Atmosphere (unit) impgalatm imp gal·atm 460.63256925
Atmosphere (unit) USgalatm
(usgalatm)
US gal·atm 383.5568490138
U.S.galatm
(usgalatm)
U.S. gal·atm


Temperature
(separate page; full list)
system unit code
(alternative)
abbreviation notes conversion
to kelvin
combinations
SI Kelvin K K Triple combinations are also possible. See the full list. [K]
  • K °C (K C)
  • K °R (K R)
  • K °F (K F)
Celsius °C (C) °C ([°C]+273.15)
  • °C K (C K)
  • °C °R (C R)
  • °C °F (C F)
Imperial
&
US customary
Rankine scale °R (R) °R ([°R]/1.8)
  • °R K (R K)
  • °R °C (R C)
  • °R °F (R F)
Fahrenheit °F (F) °F (([°F]+459.67)/1.8)
  • °F K (F K)
  • °F °C (F C)
  • °F °R (F R)


Mass
(Full list)
system unit code
(alternative)
abbreviation notes conversion factor/kg combinations
SI Kilogram kg kg Triple combinations are also possible. See the full list. 1
  • kg lb
  • kg st
Gram g g 0.001
  • g oz
Milligram mg mg 0.000001
  • mg gr
Microgram μg (ug) µg 0.000000001
non-SI metric Tonne t t Triple combinations are also possible. See the full list. 1,000
  • t LT
  • t ST
Tonne MT t
  • MT LT
  • MT ST
Avoirdupois Long ton LT 2,240 lb
used mostly in the British Commonwealth
Triple combinations are also possible. See the full list.
1,016.0469088
  • LT t
  • LT MT
  • LT ST
long ton
Short ton ST 2,000 lb
used mostly in the US
Triple combinations are also possible. See the full list.
907.18474
  • ST t
  • ST MT
  • ST LT
short ton
Stone (mass) st st 14 lb
used mostly in the British Commonwealth except Canada
Triple combinations are also possible. See the full list.
6.35029318
  • st kg
  • st lb
Pound (mass) lb lb Triple combinations are also possible. See the full list. 0.45359237
  • lb kg
  • lb st
Ounce oz oz 0.028349523
  • oz g
Dram (unit) drachm 0.001771845195
Dram (unit) dram
Grain (mass) gr gr equivalent to the troy grain 0.00006479891
Troy weight Troy weight ozt ozt 0.0311034768
other Carat (mass) carat 0.0002


Pressure
unit code abbreviation conversion factor/Pa
Pascal (unit) MPa MPa 1,000,000
Pascal (unit) kPa kPa 1,000
Pascal (unit) hPa hPa 100
Pascal (unit) Pa Pa 1
Pascal (unit) ‎mPa‎ mPa 0.001
Bar (unit) mbar mbar 100
mb mb
Bar (unit) ‎dbar dbar 10,000
Bar (unit) bar bar 100,000
Barye kBa kBa 100
Barye ‎Ba Ba 0.1
Atmosphere (unit) atm atm 101,325
Torr Torr Torr (20,265/152)
Torr mmHg mmHg 133.322387415
Inch of mercury inHg inHg 3,386.388640341
Pounds per square inch psi psi (444,822,161.52605/64,516)
Torque
unit code notes
newton metre N·m (N.m) Use N·m or N.m to get the mid-dot.
Nm
Torque conversions can go to and from the following units.
  • foot-poundal
  • foot-pound force
  • inch-pound force
  • inch-ounce force

Codes, abbreviations and conversion factors (but to N·m in this case) are the same as with the corresponding energy units as listed above.

Fuel efficiency
unit code
(alternative)
notes combinations
kilometres per litre km/l (km/L) Use km/L to get "km/L"
  • km/l mpgimp
  • km/l mpgus
litres per 100 kilometres l/100 km (L/100 km) Use L/100 km to get "L/100 km"
  • l/100 km mpgimp
  • l/100 km mpgus
litres per kilometre l/km (L/km) Use L/km to get "L/km"
  • l/km impgal/mi
  • l/km usgal/mi
miles per imperial gallon mpgimp
  • mpgimp mpgus
miles per US gallon mpgus (mpgUS, mpgU.S.) Use mpgUS to get "US"

Use mpgU.S. to get "U.S."
mpgus will give "U.S." if spelling is
set to US & "US" otherwise

  • mpgus mpgimp
imperial gallons per mile impgal/mi
  • impgal/mi
US gallons per mile usgal/mi (USgal/mi, U.S.gal/mi) As above with the us vs US vs U.S.
  • usgal/mi
The mpgUS, mpgU.S., USgal/mi vs U.S.gal/mi, km/L, L/100 km and L/km variants work within combinations also (making 36 combinations in total).
Power
Watts, kilowatts, milliwatts, etc. are supported. As is horsepower (English & metric). Use standard abbreviations as input code (lower case hp for horsepower, for example)
Population density
unit code
(alternative)
notes combinations
inhabitants per square kilometre PD/sqkm PD stands for population density, Id est humans (inhabitants)
  • PD/sqkm PD/sqmi
per square kilometre /sqkm Used when the word 'inhabitants' would be inappropriate.
  • /sqkm /sqmi
inhabitants per hectare PD/ha
  • PD/ha PD/acre
per hectare /ha
  • /ha /acre
inhabitants per square mile PD/sqmi PD stands for population density, i.e. humans (inhabitants)
  • PD/sqmi PD/sqkm
per square mile /sqmi Used when the word 'inhabitants' would be inappropriate.
  • /sqmi /sqkm
inhabitants per acre PD/acre
  • PD/acre PD/ha
per acre /acre
  • /acre /ha

Example/monitor page

Monitor quality or look at examples at Template:Convert/check

See also

  • {{Inflation}} template for calculating inflated prices in USA, UK and other countries.
  • {{Height}} template for calculating (body) height with precision.Es:Plantilla:Convert

Fr:Modèle:Conversion Id:Templat:Convert It:Template:Converti Ja:Template:Convert No:Mal:Convert Th:แม่แบบ:Convert Zh:Template:Convert