ID EN
#Math

DECIMAL

Excel Functions

Convert a number in a different base to a decimal number

Syntax

EXCEL
=DECIMAL(number, radix)

Arguments

Parameter Description
number A text string representing a number.
radix The base of the number to be converted, an integer between 2-36.

Return Value

Decimal number

Details

The DECIMAL function converts a number in a known base into its decimal number equivalent. For example, the DECIMAL function can convert the binary number 1101 into the decimal number 13. The number provided to DECIMAL should be a text string. The DECIMAL function takes two arguments: number and radix. Number should be the text representation of a number in a known base. Radix is the number of digits used to represent numbers (i.e. the base) and should be an integer between 2 and 36. The characters given in number need to conform to the numbering system specified with radix. In the hexadecimal number system, the number 255 is represented as "FF". To convert the text string "FF" to the decimal number 255, you can use the DECIMAL function like this: To convert the binary number 1101 to its d

Examples

Examples

In the hexadecimal number system, the number 255 is represented as "FF". To convert the text string "FF" to the decimal number 255, you can use the DE

EXCEL
=DECIMAL("FF",16) // returns 255
Examples

To convert the binary number 1101 to its decimal number equivalent, 13, use DECIMAL like this:

EXCEL
=DECIMAL("1101",2) // returns 13
Examples

In the example shown, the numbers in column B are in different bases, and the base is given in column C. The formula in column D5 is:

EXCEL
=DECIMAL(B5,C5) // returns 3
BASE function

The BASE function performs the opposite conversion as the DECIMAL function:

EXCEL
=BASE(100,2) // returns "1100100"
=DECIMAL("1100100",2) // returns 100

See Also

BASE HEX2DEC OCT2DEC BIN2DEC