Hexadecimal to Decimal Converter

How to convert from hex to decimal

A regular decimal number is the sum of the digits multiplied with power of 10.

137 in base 10 is equal to each digit multiplied with its corresponding power of 10:

13710 = 1×102+3×101+7×100 = 100+30+7

Hex numbers are read the same way, but each digit counts power of 16 instead of power of 10.

For hex number with n digits:

dn-1 ... d3 d2 d1 d0

Multiply each digit of the hex number with its corresponding power of 16 and sum:

decimal = dn-1×16n-1 + ... + d3×163 + d2×162 + d1×161+d0×160

Example #1

3B in base 16 is equal to each digit multiplied with its corresponding 16n:

3B16 = 3×161+11×160 = 48+11 = 5910

Example #2

E7A9 in base 16 is equal to each digit multiplied with its corresponding 16n:

E7A916 = 14×163+7×162+10×161+9×160 = 57344+1792+160+9 = 5930510

Example #3

0.8 in base 16:

0.816 = 0×160+8×16-1 = 0+0.5 = 0.510

Hex to decimal conversion table

Hex
base 16
Decimal
base 10
Calculation
00-
11-
22-
33-
44-
55-
66-
77-
88-
99-
A10-
B11-
C12-
D13-
E14-
F15-
10161×161+0×160 = 16
11171×161+1×160 = 17
12181×161+2×160 = 18
13191×161+3×160 = 19
14201×161+4×160 = 20
15211×161+5×160 = 21
16221×161+6×160 = 22
17231×161+7×160 = 23
18241×161+8×160 = 24
19251×161+9×160 = 25
1A261×161+10×160 = 26
1B271×161+11×160 = 27
1C281×161+12×160 = 28
1D291×161+13×160 = 29
1E301×161+14×160 = 30
1F311×161+15×160 = 31
20322×161+0×160 = 32
30483×161+0×160 = 48
40644×161+0×160 = 64
50805×161+0×160 = 80
60966×161+0×160 = 96
701127×161+0×160 = 112
801288×161+0×160 = 128
901449×161+0×160 = 144
A016010×161+0×160 = 160
B017611×161+0×160 = 176
C019212×161+0×160 = 192
D020813×161+0×160 = 208
E022414×161+0×160 = 224
F024015×161+0×160 = 240
1002561×162+0×161+0×160 = 256
2005122×162+0×161+0×160 = 512
3007683×162+0×161+0×160 = 768
40010244×162+0×161+0×160 = 1024

 

Recommend For You