Article updated on March 05, 2018

The DEC2HEX function converts a decimal number to a hexadecimal number.

Formula in cell D3:


Excel Function Syntax

DEC2HEX(number, [places])


number Required. The decimal integer you want to convert.
[places] Optional. The number of characters to use. If not entered the function uses the number of characters needed to complete the task. This argument allows you to add leading 0s (zeros).


The hexadecimal numeral system has a base of 16, 0-9 represents zero to nine and A,B,C,D,E and F represent values ten to fifteen.

For example, binary values ranging from 00000000 to 11111111 is represented as 00 to FF in hexadecimal which makes it easier to read.