Octal to Decimal Converter

Convert octal to decimal with the working shown: each digit times its power of 8, added up. Handy for Unix file permissions such as 755, and you can swap direction to convert decimal to octal.

Use the digits 0 to 7. A 0o prefix and spaces are ignored.

Enter a whole decimal number. The steps show the repeated division by 8.

Octal number Decimal number
Decimal number

The same number in every base
Binary
Octal
Decimal
Hex
Bit length
Show steps

Each digit is multiplied by its place value, which is a power of the base (2 for binary, 8 for octal, 16 for hex). The products are then added together.

Divide the decimal number by the new base again and again until the quotient is 0. The remainders, read from the bottom up, are the digits of the result.

DigitPositionPlace valueDigit × place value
Sum
DivisionQuotientRemainderDigit

Convert Octal Numbers to Decimal Online

Octal (base 8) is less common than hex, but you still meet it in Unix file permissions, older computing books and number literals such as 0o755 in Python. This octal to decimal converter gives you the decimal value as you type.

The steps table multiplies every digit by its power of 8, and the table on the right shows the same value in binary and hex. Click Swap direction to convert decimal to octal, with the repeated division by 8.

Octal number converted to decimal0o755493Octal toDecimal

How to use the octal to decimal converter

  1. Enter an octal number, for example 755. Digits 8 and 9 are not allowed in octal.
  2. Read the decimal result, 493, plus the binary and hex values.
  3. Check the steps, or swap direction to turn a decimal number into octal.

How to convert octal to decimal by hand

Each octal position is worth 8 times the one to its right: 1, 8, 64, 512 and so on. Multiply each digit by its place value and add. For 755:

DigitPlace valueDigit × place value
782 = 647 × 64 = 448
581 = 85 × 8 = 40
580 = 15 × 1 = 5

So 448 + 40 + 5 = 493.

Powers of 8

PowerValuePowerValue
8018532,768
81886262,144
8264872,097,152
835128816,777,216
844,09689134,217,728

Octal file permissions (chmod)

Unix permissions use one octal digit each for the owner, the group and everyone else. Each digit is three bits: read (4), write (2) and execute (1).

DigitBitsPermission
0000---
1001--x
2010-w-
3011-wx
4100r--
5101r-x
6110rw-
7111rwx
ModeMeaningDecimal
755rwxr-xr-x493
644rw-r--r--420
600rw-------384
700rwx------448
664rw-rw-r--436
777rwxrwxrwx511

The decimal value is what some APIs expect: os.chmod(path, 493) in Python is the same as os.chmod(path, 0o755).

Octal to decimal examples

OctalDecimalOctalDecimal
77108
17152016
10064377255
100051277774,095

Octal numbers in programming

  • Python 3 and JavaScript: write octal with 0o, as in 0o755.
  • C, C++ and Java: a leading zero means octal, so 010 is 8, not 10. This is a common source of bugs.
  • Octal and binary: each octal digit is exactly three bits, so 755 is 111 101 101. For 4-bit groups, use hex to binary.

Frequently Asked Questions

Common questions about converting octal numbers to decimal.

Multiply each digit by 8 raised to its position, counting from 0 on the right, and add the results. 17 is 1 × 8 + 7 = 15.

755 in octal is 7 × 64 + 5 × 8 + 5 = 493.

Octal 10 is 8 in decimal, because the second position is worth 8.

Base 8 only has eight digits, 0 to 7. After 7 comes 10, just as 9 is followed by 10 in decimal.

644 is rw-r--r--: the owner can read and write, the group and everyone else can only read. In decimal it is 420.

Click Swap direction above. The steps then show the repeated division by 8, with the remainders read from the bottom up. 493 becomes 755.

Mainly for Unix permissions and in some older file formats and systems. Hex has replaced it for most other uses.