Skip to main content

Decimal to Octal Converter

Convert decimal to octal and octal to decimal instantly with this free online base 8 conversion tool. It shows every conversion step using the classic long division by 8 method, includes a full decimal to octal chart from 0 to 64, and explains why octal matters in Unix file permissions (like chmod 755) and computing history.

Octal

How to Convert Decimal to Octal (Long Division by 8)

To convert decimal to octal manually, repeatedly divide the decimal number by 8 and read the remainders from last to first:

  1. Divide the number by 8 and write down the remainder (an octal digit 0 to 7).
  2. Take the quotient and divide it by 8 again.
  3. Repeat until the quotient is 0, then read all remainders bottom to top.

Example: 493 to octal. 493 divided by 8 = 61 remainder 5. 61 divided by 8 = 7 remainder 5. 7 divided by 8 = 0 remainder 7. Reading remainders bottom to top gives 755 in octal, which is exactly why Unix uses chmod 755.

To convert octal to decimal, multiply each octal digit by powers of 8 and add them up. For 377 octal: 3 times 64 plus 7 times 8 plus 7 times 1 = 192 plus 56 plus 7 = 255 in decimal.

Decimal to Octal Chart (0 to 64)

Quick reference decimal to octal conversion table. Notice how every 8 decimals roll the rightmost octal digit back to 0: 7 becomes 10 at 8, 77 becomes 100 at 64.

DecimalOctalDecimalOctalDecimalOctalDecimalOctal

Why Octal Exists: Unix Permissions and Computing History

Octal is the base 8 number system, using only the digits 0 through 7. It became famous through Unix file permissions: each digit of an octal number maps to exactly 3 binary bits, and Unix permissions are exactly three groups of 3 bits (owner, group, others).

755
rwxr-xr-x
(493 decimal)
644
rw-r--r--
(420 decimal)
777
rwxrwxrwx
(511 decimal)
600
rw-------
(384 decimal)

So chmod 755 sets the octal number 755, meaning the owner can read, write and execute while everyone else can only read and execute. Before hexadecimal took over, octal was the shorthand for binary on early machines like the PDP-8 and PDP-11, whose word sizes were multiples of 3 bits.

Frequently Asked Questions

What is 8 in octal?
8 in decimal equals 10 in octal. Because octal only has the digits 0 through 7, the count rolls over to 10 in octal (1 times 8 plus 0) when you reach 8 in decimal.
What is 64 in octal?
64 in decimal equals 100 in octal. Since 8 squared is 64, 64 in decimal is exactly 1 in the eights-squared place, which is written as 100 in octal.
What is 255 in octal?
255 in decimal equals 377 in octal. You can check this with the expansion method: 3 times 64 plus 7 times 8 plus 7 times 1 equals 192 plus 56 plus 7, which equals 255.
What is 493 in octal?
493 in decimal equals 755 in octal. This is the famous number behind chmod 755: divide 493 by 8 to get 61 remainder 5, divide 61 by 8 to get 7 remainder 5, divide 7 by 8 to get 0 remainder 7, and read the remainders bottom to top as 755.
How do you convert decimal to octal manually?
Divide the decimal number by 8, write down the remainder, then divide the quotient by 8 again. Repeat until the quotient is 0, then read all the remainders from last to first. For example, 100 divided by 8 is 12 remainder 4, 12 divided by 8 is 1 remainder 4, and 1 divided by 8 is 0 remainder 1, so 100 in decimal is 144 in octal.
How do you convert octal to decimal?
Multiply each octal digit by 8 raised to the power of its position, counting from 0 on the right, then add everything up. For 144 in octal: 1 times 64 plus 4 times 8 plus 4 times 1 equals 64 plus 32 plus 4, which equals 100 in decimal.
Why is octal base 8?
Octal is base 8 because it uses exactly eight digits: 0, 1, 2, 3, 4, 5, 6 and 7. Each position in an octal number represents a power of 8, just as each position in decimal represents a power of 10. The key advantage is that one octal digit maps exactly to 3 binary bits.
What is octal 777 in decimal?
777 in octal equals 511 in decimal: 7 times 64 plus 7 times 8 plus 7 times 1 equals 448 plus 56 plus 7. That is why chmod 777 (all permissions for everyone) is such a round number in Unix: every one of the nine permission bits is set.
What does chmod 755 mean?
chmod 755 sets file permissions as the octal number 755, which is 493 in decimal. The digits break down as 7 (read, write, execute) for the owner, 5 (read and execute) for the group, and 5 (read and execute) for everyone else. It is the classic permission set for scripts and executables.
What is octal used for today?
Octal survives today mainly in Unix file permissions with chmod, and in some programming languages and protocols where octal escapes like backslash-101 represent the character A. Modern systems mostly use hexadecimal for binary shorthand, but octal remains the natural fit wherever bits come in groups of three.
What is the difference between octal and hexadecimal?
Octal is base 8 with digits 0 through 7, so one digit encodes 3 bits. Hexadecimal is base 16 with digits 0 through 9 and A through F, so one digit encodes 4 bits. Hexadecimal won for modern computers because byte sizes are multiples of 4 bits, while octal ruled when machine word sizes were multiples of 3 bits.
Can you convert decimal fractions to octal?
Yes. Multiply the fractional part by 8, take the whole number as the next octal digit, and repeat with the new fractional part. For example, 0.5 in decimal becomes 0.4 in octal, because 0.5 times 8 is exactly 4. This converter supports fractional inputs too.
Why was octal popular in early computing?
Octal was popular because early computers like the PDP-8 and PDP-11 had word sizes divisible by 3 bits (12 and 18 bits), so octal digits mapped perfectly onto the hardware. Programmers could read machine code in compact octal instead of long strings of binary. When 8-bit bytes became standard, hexadecimal replaced it.
How do programmers write octal literals?
In C, Java and JavaScript, an integer literal with a leading zero like 0755 is interpreted as octal (493 in decimal). In Python 3, you must write it with the 0o prefix, as in 0o755. Both notations mean the same value: three groups of three bits.

Free tool by NRTechStudio