CONVERT function/text/scalc/01/func_convert.xhpCONVERT function
CONVERT
function
Converts a value from one unit of measurement to the corresponding value in another unit of measurement. Enter the units of measurement directly as text in quotation marks or as a reference. The units of measurement specified through the arguments must match the supported unit symbols, which are case-sensitive. For example, the symbol for the unit "newton" is the uppercase "N".The measurement units recognized by CONVERT fall into 13 groups, which are listed below. CONVERT will perform conversions between any two units within one group but reject any request to convert between units in different groups.You can also add binary and decimal prefixes to units of measurement that support them. The list of all prefixes and their corresponding multipliers are shown below.This function may not be compatible with other spreadsheet software.
CONVERT(Number; FromUnit; ToUnit)
Number is the number to be converted.
FromUnit is the unit from which conversion is taking place.
ToUnit is the unit to which conversion is taking place. Both units must be of the same type.
If FromUnit and ToUnit are not valid units from the same group, then CONVERT reports an invalid argument error (Err:502).
=CONVERT(-10; "C"; "F")Here the function converts -10 degrees Celsius to degrees Fahrenheit, returning the value 14. There is not a simple multiplicative relationship between temperature units, as different reference points are used. Hence, as in this case, an input negative number may be converted to a positive value.
=CONVERT(3.5; "mi"; "yd")Here the function converts 3.5 international miles to yards, returning the value 6160. Both units are in the Length and distance group.
=CONVERT(256; "Gibit"; "Mibyte")Here the function converts 256 gigibits to mebibytes, returning the value 32768. Both units (bit and byte) are in the Information group and support binary prefixes.
=CONVERT(1; "dyn"; "e")Here the function returns an invalid argument error (Err:502) because the two units (dyne and erg) are in different groups (Force and Energy respectively).
Units of measurement
Below are the unit measurement groups supported by the CONVERT function. Be aware that conversions can only happen between units that belong to the same group.The column Prefix indicates whether or not a given unit of measurement supports prefixes.
Area
Some measurement units have more than one accepted symbol. The accepted unit symbols are separated by semicolons in the Unit symbol column.
Unit symbolDescriptionPrefix"cwt" ; "shweight"Short hundredweight"g"Gram"grain"Grain"lbm"Pound"ozm"Ounce"pweight"Pennyweight"sg"Slug"stone"Stone"ton"Short ton"u"Unified atomic mass unit"uk_cwt" ; "lcwt" ; "hweight"Long hundredweight"uk_ton" ; "LTON" ; "brton"Long ton
Power
Unit symbolDescriptionPrefix"HP" ; "h"Mechanical horsepower"PS"Pferdestärke or metric horsepower"W" ; "w"Watt
Pressure
Unit symbolDescriptionPrefix"atm" ; ("at")(1)Standard atmosphere"mmHg"Millimeter of mercury"Pa"Pascal"psi"Pound per square inch"Torr"Torr
1 - The "at" unit is deprecated. Use "atm" instead.
Speed
Unit symbolDescriptionPrefix"admkn"Admiralty knot"kn"International knot"m/h" ; "m/hr"Meters per hour"m/s" ; "m/sec"Meters per second"mph"Miles per hour
2 - These units are not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard for the CONVERT function. They are preserved for backward compatibility.