
What does the HEX2DEC function do?
This function converts a hexadecimal number to decimal.
HEX2DEC function syntax
=HEX2DEC(hexadecimal_number) | A | B | |
|---|---|---|
| 1 | Hex | HEX2DEC |
| 2 | A | 10=HEX2DEC(A2) |
| 3 | FF | 255=HEX2DEC(A3) |
| 4 | 1F4 | 500=HEX2DEC(A4) |
| 5 | 7FFFFFFFFF | 549755813887=HEX2DEC(A5) |
| 6 | FFFFFFFFFF | -1=HEX2DEC(A6) |
| 7 | G1 | #NUM!=HEX2DEC(A7) |
Up to 10 hex characters (40 bits). The highest bit is the sign: FFFFFFFFFF is −1 in two’s complement. Letters can be upper or lower case; anything other than 0–9 and A–F returns #NUM!.
HEX2DEC formula example
The following table was used to calculate the sum of two hexadecimal numbers
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Hex 1 | Hex 2 | Sum (decimal) | Sum (hex) |
| 2 | 1A | FF | 281=HEX2DEC(A2)+HEX2DEC(B2) | 119=DEC2HEX(C2) |
| 3 | 7D0 | 30 | 2048=HEX2DEC(A3)+HEX2DEC(B3) | 800=DEC2HEX(C3) |
| 4 | FFFF | 1 | 65536=HEX2DEC(A4)+HEX2DEC(B4) | 10000=DEC2HEX(C4) |
Excel can’t add hex text directly, so both numbers are converted to decimal, added, and DEC2HEX turns the sum back into hex.

Other Engineering Functions
BIN2DEC, DELTA, DEC2BIN, DEC2HEX, GESTEP, CONVERT
Like the article? Help its author! Buy !SEMTools, it has lots of useful instruments to process text data.