Enter an octal number to convert it to hex below.

## How to Convert Octal to Hex

The first step to converting octal to hex is to convert octal to decimal. Then, you can convert from decimal to hex.

### Step One: Convert Octal to Decimal

To convert a number from octal to decimal, multiply each digit in the octal number from the rightmost number to the left by 8 to the power of n, where n is the distance from the right.

When reading the octal number from right to left, the digit furthest to the right is equal to the digit times 80. The digit one position in from the right is equal to the digit times 81.

decimal number10 = (d0 × 80) + (d1 × 81) + … + (dn – 1 × 8n – 1)

In the formula above, d0 is the octal digit furthest to the right, d1 is the digit one position from the right, and dn – 1 is the digit furthest to the left.

### Step Two: Convert Decimal to Hex

To convert from decimal to hex, divide the decimal number by 16 using long division. There should be a remainder of 0 through 15; write that to the side of the division problem. For remainders larger than 9, convert to hex by using “a” for 10, “b” for 11, “c” for 12, and so on.

Take the result of the first division problem and divide that by 16 again. Like before, there should be a remainder, which you should write to the side of the problem.

Continue this process until the result is 0.

The remainders that you wrote to the side of the division problems are the resulting hexadecimal number. The number should be read from the bottom to the top since the least significant digit will be at the top, and the most significant digit will be at the bottom.

## Octal to Hex Conversion Table

Octal numbers converted to the equivalent hexadecimal values
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
10 8
11 9
12 a
13 b
14 c
15 d
16 e
17 f
20 10