Conversion

Octal to hexadecimal converter

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is an octal number system?

The octal number system (base 8) uses eight unique digits: 0, 1, 2, 3, 4, 5, 6, and 7. Each position in an octal number represents a power of 8, starting from 808^0 on the right. This number system is often used in programming and computer architecture, as it simplifies binary representation by grouping bits into sets of three.

For example, the octal number 1458145_8 is calculated as:

1458=1×82+4×81+5×80=64+32+5=10110145_8 = 1 \times 8^2 + 4 \times 8^1 + 5 \times 8^0 = 64 + 32 + 5 = 101_{10}

What is a hexadecimal number system?

The hexadecimal number system (base 16) uses sixteen symbols:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

where A = 10, B = 11, C = 12, D = 13, E = 14, F = 15 in decimal form.
Each position in a hexadecimal number represents a power of 16.

For example:

1F16=1×161+15×160=16+15=31101F_{16} = 1 \times 16^1 + 15 \times 16^0 = 16 + 15 = 31_{10}

How to convert octal to hexadecimal?

Since both systems are positional and based on powers of 2 (octal: 232^3, hexadecimal: 242^4), conversion between them is often performed via binary or by using the decimal system as an intermediate step.

Method 1: Conversion through decimal system

Step 1. Convert octal to decimal Each digit of the octal number is multiplied by 8 raised to its position power, starting from the right (position 0).

Step 2. Convert decimal to hexadecimal Divide the obtained decimal number by 16. Continue dividing until the quotient equals zero. Write down the remainders in reverse order — this gives the final hexadecimal value.

Example of calculation

Convert 16816_8 to hexadecimal.

Convert octal to decimal

168=1×81+6×80=8+6=141016_8 = 1 \times 8^1 + 6 \times 8^0 = 8 + 6 = 14_{10}

Then convert decimal to hexadecimal

DivisionInteger QuotientRemainder
14 ÷ 16014 → E
1410=E1614_{10} = E_{16}

Result:

168=E1616_8 = E_{16}

Method 2: Direct conversion through binary

Another practical way is to use a binary intermediary.

  • Convert each octal digit into a 3-bit binary equivalent.
  • Combine all bits.
  • Split the binary number into 4-bit groups from right to left.
  • Convert each group into its hexadecimal equivalent.

Example of calculation

Convert 45845_8 to hexadecimal.

OctalBinary (3-bit)
4100
5101

Combined binary: 100101

Split into 4-bit groups (from right), add leading zeros if necessary: 0010 0101

Binary groupHex equivalent
00102
01015
458=251645_8 = 25_{16}

You can find table of conversion of 4-bit groups in binary to hexadecimal converter and table of conversion of 3-bit groups in binary to octal converter.

Notes

  • The octal and hexadecimal systems are both compact forms of binary representation, often used for debugging and addressing in computing.
  • Each octal digit directly maps to three binary digits, while each hexadecimal digit maps to four binary digits.
  • Converting through binary is a faster and more error-free method when done by hand or digitally.

Frequently asked questions

How to convert 7352₈ to hexadecimal?

Convert 735287352_8 to decimal:
7×83+3×82+5×81+2×80=3584+192+40+2=3818107 \times 8^3 + 3 \times 8^2 + 5 \times 8^1 + 2 \times 8^0 = 3584 + 192 + 40 + 2 = 3818_{10}

Now divide 3818 by 16:

DivisionQuotientRemainder
3818 ÷ 1623810 → A
238 ÷ 161414 → E
14 ÷ 16014 → E

Reading remainders backward: EEA16EEA_{16}

73528=EEA167352_8 = EEA_{16}

Why is conversion through binary convenient?

Because octal and hexadecimal are both directly related to binary powers, conversion through binary avoids arithmetic and uses simple grouping of bits (3 for octal, 4 for hexadecimal).

10 from octal to hexadecimal

Convert 10810_8 to decimal.

108=1×81+0×80=8+0=81010_8 = 1 \times 8^1 + 0 \times 8^0 = 8 + 0 = 8_{10}

Now convert 8 to hexadecimal.

DivisionQuotientRemainder
8 ÷ 1608 → 8

Reading remainders backward: 8168_{16}

108=81610_8 = 8_{16}

Report a bug

This field is required.