Documentation/Calc Functions/CONVERT

Function name:
CONVERT

Category:
Add-in

Summary:
Converts a value expressed in one unit of measure to the corresponding value in another, compatible measurement system.

CONVERT is a wide-ranging function capable of converting values in many different types of measurement systems, covering:
 * Area
 * Energy
 * Flux density
 * Force
 * Information
 * Length and distance
 * Mass and weight
 * Power
 * Pressure
 * Speed
 * Temperature
 * Time
 * Volume

Syntax:
CONVERT(Number; FromUnit; ToUnit)

Returns:
Returns a real number which is the converted value expressed in the specified unit of measure.

Arguments:
Number is a real number, or a reference to a cell containing that number, that is the value to be converted from one unit to another.

FromUnit is a string, or a reference to a cell containing that string, that is an abbreviation signifying the unit from which conversion is taking place.

ToUnit is a string, or a reference to a cell containing that string, that is an abbreviation signifying the unit to which conversion is taking place. Both FromUnit and ToUnit must be of the same unit type.


 * If Number is non-numeric, then CONVERT reports a #VALUE! error.
 * If FromUnit and ToUnit are not valid units of the same type, then CONVERT reports an invalid argument error (Err:502).

The measurement units recognized by CONVERT fall into 13 groups, which are listed in the section above. CONVERT will perform conversions between any two units within one group but reject any request to convert between units in different groups.

Within each group, a set of base unit symbols is defined (for example, the Temperature group includes symbols for Celsius, Fahrenheit, kelvin, and other units). However, many (but not all) of these base unit symbols can be further refined by the addition of a decimal prefix (for example, the decimal prefix of “k” might be added to the Mass and weight base unit of “g” if values in kilograms are to be used in the conversion).

Further flexibility is available for units in the Information group which can be given a binary prefix (for example, the binary prefix of “Mi” might be added to “byte” if values in mebibytes are to be used in the conversion).

All base unit symbols, decimal prefixes, and binary prefixes are case-sensitive.

The following tables list:
 * 1) The base unit symbols that are available within each of the unit groups (,, , , , , , , , , , , and ). Within each of these 13 tables, the Prefix column indicates with an asterisk any base units that accept optional decimal prefixes.
 * 2) The list of available.
 * 3) The list of available.

Additional details:
See Wikipedia’s Unit prefix and Binary prefix pages for more background information about decimal and binary prefixes.

This function is not generally compatible with other spreadsheets.

Related LibreOffice functions:
None.

ODF standard:
Section 6.16.18, part 2

Equivalent Excel functions:
CONVERT