Octal to Decimal Converter Formula

Understand the math behind the octal to decimal converter. Each variable explained with a worked example.

Formulas Used

Decimal Value

decimal_val = o4*4096 + o3*512 + o2*64 + o1*8 + o0

Variables

VariableDescriptionDefault
o4Octal Digit 4 (4096s)0
o3Octal Digit 3 (512s)0
o2Octal Digit 2 (64s)1
o1Octal Digit 1 (8s)4
o0Octal Digit 0 (1s)4

How It Works

How to Convert Octal to Decimal

Method

Octal (base-8) uses digits 0-7. Each position represents a power of 8.

Decimal = d4×8⁴ + d3×8³ + d2×8² + d1×8¹ + d0×8⁰

For example, octal 144 = 1×64 + 4×8 + 4×1 = 64 + 32 + 4 = 100.

Worked Example

Convert octal 00144 to decimal.

o4 = 0o3 = 0o2 = 1o1 = 4o0 = 4
  1. 010×4096 + 0×512 + 1×64 + 4×8 + 4×1
  2. 02= 0 + 0 + 64 + 32 + 4
  3. 03= 100

Ready to run the numbers?

Open Octal to Decimal Converter