Rohan Yeole - HomepageRohan Yeole

How to Convert Octal to Hexadecimal

By Rohan Yeole

Octal and hexadecimal are both number systems used frequently in computing and digital electronics.

  • Octal: Base-8 (digits 0–7)

  • Hexadecimal: Base-16 (digits 0–9 and letters A–F)

Direct conversion from octal to hexadecimal isn’t as straightforward as decimal conversions, so we typically use an intermediate step.

If you're just looking to convert Octal and hexadecimal quickly, 👉 try this free online tool

There are two main ways to convert octal numbers into hexadecima

Octal → Binary → Hexadecimal

Why this works:

  • Every octal digit can be represented by 3 binary digits.

  • Every hexadecimal digit can be represented by 4 binary digits.
    So we can use binary as a bridge.

Convert (72)₈ to hexadecimal

Convert each octal digit to a 3-bit binary value

  • 7 → 111

  • 2 → 010

So, (72)₈ = 111010₂

Group the binary number into 4-bit chunks (from right to left)

111010 → 0001 11010 → Add a leading zero to make 4 bits: 0011 1010

But cleaner:

(111010)₂ → group as: 0111 010

Now we add a leading zero: 0011 1010 → This becomes:
(0111 0010)₂ = (7 2)₁₆

Oops! That’s incorrect. Let's fix the grouping:

(111010)₂ = 0001 1101 0 → still doesn’t group cleanly.

Better grouping:
From right to left:
111010 → 11 1010 → add 2 leading zeros → 0011 1010 → 0011 (3), 1010 (A)

Final Answer:

(72)₈ = (3A)₁₆

Convert (145)₈ to hexadecimal

Octal digits → Binary:

  • 1 → 001

  • 4 → 100

  • 5 → 101

(145)₈ = (001 100 101)₂ = 001100101₂

Group from right:
= 0001 1001 01 → add leading zeros → 0001 1001 0100 (12 bits)

Group as: 0001 1001 0101 →
= (1)(9)(5) → (195)₁₆

Octal → Decimal → Hexadecimal

Why this works:

  • Convert from base-8 to base-10 (decimal) using positional values

  • Then convert decimal to base-16

Convert (75)₈ to hexadecimal
Step 1: Convert to Decimal

Each digit is multiplied by powers of 8:

= 7 × 8¹ + 5 × 8⁰ = 7 × 8 + 5 × 1 = 56 + 5 = 61₁₀

Step 2: Convert 61₁₀ to Hexadecimal

Divide by 16:

16 | 61  
----
16 | 3 → remainder: 13
→ remainder: 13 = D in hex
So (61)₁₀ = (3D)₁₆

Convert (316)₈ to hexadecimal

Step 1: Convert to Decimal

= 3 × 8² + 1 × 8¹ + 6 × 8⁰ = 3 × 64 + 1 × 8 + 6 × 1 = 192 + 8 + 6 = 206₁₀

Step 2: Convert 206 to Hexadecimal

16 | 206  
-----
16 | 12 → remainder 14 → E
→ 12 = C
So, (316)₈ = (CE)₁₆

Summary of Steps

MethodSteps
Method 1Octal → Binary → Hexadecimal
Method 2Octal → Decimal → Hexadecimal

Practice Examples

Try converting these octal numbers to hexadecimal:

  • (104)₈ = ?
  •  (241)₈ = ? 
  • (377)₈ = ? 
  • (25)₈ = ?

FAQs

Q: Do I always have to go through binary or decimal?
Yes, because there's no direct formula for converting octal to hexadecimal. Binary or decimal acts as a helpful bridge.


Q: Which method is easier?

  • If you're good with binary, Method 1 is faster.

  • If you're comfortable with arithmetic, Method 2 may feel easier.