Skip to main content
MedCalc
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
working
Show menu

HEX2DEC function

Description

Hexadecimal number to decimal number. HEX2DEC(h) converts a hexadecimal number to a decimal number.

The hexadecimal numeral system, shortened to HEX, is a numeral system made up of 16 symbols (base 16). The symbols are the 10 decimal numbers 0 to 9 and and six extra symbols taken from the Latin alphabet: specifically A, B, C, D, E and F, where Hexadecimal A = decimal 10, and hexadecimal F = decimal 15.

For example, the hexadecimal number 2AF2 equals the decimal number:

2 × 163 + 10 × 162 + 16 × 161 + 2 × 160 = 10994.

Text strings in an argument list must be enclosed in quotation marks, so the correct use of the function is for example HEX2DEC("A2"). Without the quotation marks, HEX2DEC(A2) would return the decimal value of the hexadecimal number stored in the spreadsheet cell A2.

Example

HEX2DEC('FF') returns 255

Calculator

HEX2DEC()

Related functions