This ഫലകം employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages.
You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here.
This project or template has a transwiki guide to help editors adapt it to a remote wiki when this cannot be done by simply copying the codes of one single template. See ഫലകം:Convert/Transwiki guide for instructions.
This template shows measurement quantities as primary and converted secondary units (or ranges), with optional rounding, wikilinks, abbreviation, or US spellings, and various separators including: parentheses "( )", "or", hyphens, comma, "to" or dashes. It can help users by calculating correct conversions from one unit of measurement to another, particularly for more complex units. It's also useful by making the text adhere to the Manual of Style.
Styles include: distance "32 മീറ്റർ (105 അടി)" and "32 മീറ്റർ or 105 അടി"; temperature "18 °C (64 °F)"; mass "55.0 കി.ഗ്രാം (121.3 lb)" or "65- തൊട്ട് 80 കി.ഗ്രാം (143- തൊട്ട് 176 lb)"; etc. For units see: Convert/list of units.
Optional parameters, in examples below, allow abbreviated units (abbr=on), or U.S. spellings (sp=us for meter), or hyphenation (adj=on), etc.
This template may in some cases directly convert to other base units, for example {{convert|29.8|km/s|mi/h}} will directly convert the km/s to mph, as in 29.8 km/s (67,000 mph).
For this template many levels of substitution are possible, hence doing this fully, step by step, is cumbersome. Use Special:ExpandTemplates instead.
The template provides some dimensional analysis to check for compatible units. The user should be careful that 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. Note also that the code lb gives pounds mass, for pounds force use lbf.
This documentation page tends to lag behind in terms of what the template can do. For more details, see the talk page and its archives.
100 മൈൽ per US gallon (2.4 L/100 കി.മീ; 120 mpg‑imp)
{{convert|120|km/h}}
120 kilometres per hour (75 mph)
{{convert|18|°C|°F}}
18 °C (64 °F)
{{convert|-15|C|F}}
−15 °C (5 °F)
{{convert|9|e6USgal|abbr=off}}
9 million US gallon (34 മെഗാലിറ്റർ) The "e6" scales the input to millions; the "abbr=off" yields the "mega" in the output. Scaling is only available for Single value conversions. Not all units are supported.
{{convert|1250|sqft|m2|lk=in|sigfig=2}}
1,250 square feet (120 m2) Note 'lk=in' links only the input unit. This example is for illustration only, common units of measurement should not be linked. See: wp:overlink.
{{convert|20.5|m3|cuyd|lk=out|abbr=on}}
20.5 m3 (26.8 cu yd) Note 'lk=out' links only the output unit, cu yd.
{{convert|641|acre|ha sqmi|lk=on}}
641 ഏക്കർ (259 ഹെ; 1.002 ച മൈ) Note 'lk=on' links all units. Per guidelines, common units should not be linked. See: wp:overlink.
{{convert|641|acre|ha sqmi|2|lk=on}}
641 ഏക്കർ (259.40 ഹെ; 1.00 ച മൈ) Although 640 acres equals 1 square mile; 641 acres rounded to two decimal places equals 1.00 sq mi.
Range of 2 values
Note: not yet operational for all units and it may be necessary to enter as "convert/2" rather than simply "convert"
Input
Displays as
{{convert|60|and|170|kg|lb}}
60-ഉം 170 കിലോഗ്രാം (130-ഉം 370 lb)
{{convert|60|to|170|kg|lb}}
60-തൊട്ട് 170 കിലോഗ്രാം (130- തൊട്ട് 370 lb)
{{convert|60|to(-)|170|kg|lb}}
60 തൊട്ട് 170 കിലോഗ്രാം (130–370 lb)
{{convert|60|-|170|kg|lb}}
60–170 കിലോഗ്രാം (130–370 lb)
{{convert|41|to|50|F|C}}
41- തൊട്ട് 50 °F (5- തൊട്ട് 10 °C)
{{convert|-10|to|-20|C|F}}
−10- തൊട്ട് −20 °C (14- തൊട്ട് −4 °F)
{{convert|41|-|50|F|K}}
41–50 °F (278–283 K)
{{convert|60|x|120|m|ft}}
60 by 120 മീറ്റർ (200 അടി × 390 അടി)
{{convert|60|+/-|10|m|ft}}
60 ± 10 മീറ്റർ (197 ± 33 അടി)
{{convert|19|to|27|L|USgal}}
19-തൊട്ട് 27 ലിറ്റർ (5.0- തൊട്ട് 7.1 US gal)
{{convert|5|to|7|L|USgal}}
5-തൊട്ട് 7 ലിറ്റർ (1.3- തൊട്ട് 1.8 US gal)
{{convert|4|-|9|L|USgal|abbr=off}}
4–9 ലിറ്റർ (1.1–2.4 US gallon)
The following conversions are currently not available as a range of values:
Some imperial and US gallon-based units
Other fuel-consumption units, except "mpg" or "L100km" shown above.
Large scale units (e3, e6, e9)
Combination-based units (ft&in, st&lb, lb&oz) due to complexity of the conversion.
Range/set of 3 or 4 values
Note: not yet operational for all units
Input
Displays as
{{convert/3 |2|x|4|x|6|m|ft}}
2×4×6 മീറ്റർ (6.6×13×20 അടി)
{{convert/3 |60|-|70|-|80|kg|lb}}
60–70–80 കിലോഗ്രാം (130–150–180 lb)
{{convert/4 |60|-|70|-|80|-|90|kg|lb}}
60–70–80–90 കിലോഗ്രാം (130–150–180–200 lb)
{{convert/3 |60|to|80|or|85|m|ft}}
60 to 80 or 85 മീറ്റർ (200 to 260 or 279 അടി)
{{convert/3 |11|by|15|rarely|16|ft|m}}
11 by 15 rarely 16 അടി (3.4 by 4.6 rarely 4.9 മീ)
{{convert/3 |41|to|50|to|60|F|C}}
41 to 50 to 60 °F (5 to 10 to 16 °C)
{{convert/4 |2|to|12|, in summer|25|to|36|C|F}}
2 to 12, in summer 25 to 36 °C (36 to 54, in summer 77 to 97 °F)
{{convert/3 |41|-|50|almost|51|F|K}}
41–50 almost 51 °F (278–283 almost 284 K)
For {{convert/3}} or {{convert/4}}, the separator words can be any text.
attach |lk=on to link all units (default: lk=off) 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, or insert mid-text words
attach |adj=on (e.g. "190-foot (58 m) bridge" instead of "190 feet...").
This produces the adjective form, as the unit name in the singular with a hyphen (according to the Manual of Style).
or "190-foot-long bridge (58 m)" as: |adj=mid|-long bridge
Note 1: Any rounding-parameter should follow the mid-text: "text|0". Note 2: For adj=mid, must specify both input & output unit-codes.
For example, to convert feet, use "ft|m" or "ft|0": • {{convert|9|ft|m|adj=mid|-long}} → 9-foot-long (2.7 m) To default the output unit-code, set parameter 3 to: 0.
Abbreviate units, or not
attach |abbr=on to show unit symbols attach |abbr=off to show all unit names in full words attach |abbr=in to abbreviate input units attach |abbr=out to abbreviate output units attach |abbr=~ to show input unit symbol in result attach |abbr=values to suppress unit names & show only values. So, {{convert|6|mi|abbr=values}} gives: 6 (9.7).
Change "( )" to display other separators
attach |disp=or to put "or" between units. The default value is: disp=b for brackets/parentheses.
Change "( )" to customized separators
attach |disp=x| (begin | end) to show "xx (begin yy end)" See example 1 attach |disp=x|; to show "xx; yy" See example 2 attach |disp=x| (same as |) to show "xx (same as yy)". See example 3 Example 1: {{convert|9|km|mi|disp=x| [|]}}→9 kilometres [5.6 mi] (note space before [|) Example 2: {{convert|9|km|mi|disp=x|; }}→9 kilometres; 5.6 mi Example 3: {{convert|10|km|mi|disp=x| (about |)}}→10 kilometres (about 6.2 mi) (note spaces used within the code).
Display output only
attach |disp=output only to show result number & unit attach |disp=output number only to show just number Note when using "disp=output only" then the unit name can still be shown as full words by abbr=off or linked by lk=on. Example: {{convert|7500|acre|m2|disp=output only }} → 30,000,000 m2
Display units inverted as reverse order
attach |disp=flip to reverse the order & show output unit first. So, {{convert|6|km|disp=flip}} shows "3.7 miles (6 km)". To get symbol "mi" use abbr=in, to abbreviate the input unit (left-side unit).
Display unit name (only)
attach |disp=unit to show the unit name for a symbol The unit name will be plural when the amount is not 1, or hyphenated when adj=on. So, {{convert|2|cuyd|disp=unit}} shows "cubic yards" plural.
Display amounts as table cells
attach |disp=table (or |disp=tablecen) 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: here
attach |sigfig={some integer greater than zero}. 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.
Round by 5
attach |disp=5 to round the output amount to the nearest 5 units. Not supported for all options.
Let Convert decide the unit to convert to
skip the precision parameter (the 3rd or 4th unnamed parameter) e.g. {{convert|100|km|ft}} gives 100 കിലോമീറ്റർ (330,000 അടി) and {{convert|100|km}} gives 100 കിലോമീറ്റർ (330,000 അടി).
Display input value with a fraction
{{convert|3/8|in|mm|3|abbr=on}} → 3⁄8 ഇഞ്ച് (9.525 മി.മീ) or {{convert|11+1/4|in|cm|2|abbr=on}} → 11+1⁄4 ഇഞ്ച് (28.58 സെ.മീ)
For negative amounts, use two minus signs (hyphens): -11-1/4.
attach |sortable=on to generate a hidden sort key so that sortable tables will sort correctly. This uses {{ntsh}} to generate a sort key from the first numeric value. It ignores any additional values, ie, if you use 6|ft|2|in as the value, it will only use the 6 for the sort key. This will cause numeric values to sort in numeric order, ie: 5, 10, 15 instead of 10, 15, 5.
Parameters still under construction
Parameters still under construction. May not work in all situations
Similar to disp=table except that the values with be centered within the column. See the tables at La Nouvelle branch, BM-21 Grad for in use examples.
abbr=in
Abbreviates only the input unit.
abbr=out
Abbreviates only the output unit.
disp=br
This separates input and output units with a forced line break. This can be useful in tables with limited horizontal space.
disp=sqbr
Shows square brackets "[ ]" instead of parentheses "( )" in output. Example: 55 miles [89 km]. This option can be used in direct quotes, to show conversions in editorial brackets. See: attach |disp=x|[|], above, as another way of showing brackets "[ ]".
↑ 1.01.1This is a limited, temporary option, until an alternative can be implemented.
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 if the "convert to" parameter is omitted; or fifth unnamed parameter if a range is specified; or fourth unnamed parameter again if a range is specified and the "convert to" parameter is omitted; needs to be replaced with a "precision" named parameter). 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 integer greater than zero} as noted above.
Default rounding
If neither the desired precision nor the desired number of significant figures is specified, the conversion will be rounded either to precision comparable to that of the input value (the number of digits after the decimal point—or the negative of the number of non-significant zeroes before the point—is increased by one if the conversion is a multiplication by a number between 0.02 and 0.2, remains the same if the factor is between 0.2 and 2, is decreased by 1 if it is between 2 and 20, and so on) or to two significant figures, whichever is more 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 kelvins, whichever is more precise.
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 more 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 mile (102 കി.മീ; 63 മൈ)".
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 (lowercase hp for horsepower, for example)
POPULATION DENSITY
unit
unit- code
notes
combinations
inhabitants per square kilometre
PD/sqkm
PD stands for population density, i.e. 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.
ഈ ഫലകത്തിൽ വരികൾക്കിടയിലെ ഫോർമാറ്റിങ് ആണ് ചരങ്ങൾക്ക് ഉള്ളത്.
ചരം
വിവരണം
തരം
സ്ഥിതി
വില
1value
the value to convert
എണ്ണം
ഐച്ഛികം
യൂണിറ്റിൽ നിന്നും
2in_unit
വിവരണമൊന്നുമില്ല
വരി
ഐച്ഛികം
യൂണിറ്റിലേക്ക്
3out_unit
വിവരണമൊന്നുമില്ല
വരി
ഐച്ഛികം
precision or suffix
4
significant digits after decimal dot or, if negative, exponent of ten
എണ്ണം
ഐച്ഛികം
link units
lk
“on” all, “in” input, “out” output or “off” no units
സ്വതേ
off
വരി
ഐച്ഛികം
ചുരുക്കം
abbrabbreviation
show “on” unit symbols, “off” all unit names in full words, “in” abbreviated input units, “out” abbreviated output units or “values” no unit names
വരി
ഐച്ഛികം
spelling
sp
“us” US
വരി
ഐച്ഛികം
adjective
adj
adjective form (singular unit name appended by hyphen) “on” or “mid” to put conversion at end
വരി
ഐച്ഛികം
conversion
disp
show conversion … “or” after ‘or’, “b” in parentheses, “x” with custom prefix and suffix, “table”/“tablecen”, “output only” alone, “output number only” alone and without unit, “flip” first, “unit” not at all but input unit; if the value is a number it is used as precision
സ്വതേ
b
വരി
ഐച്ഛികം
significant figures
sigfig
number that sets the number of significant figures