StringMash.com

Decimal to octal converter

Decimal to octal, dividing by 8 with each step shown.

Conversion
3 characters
Updates as you type
Swap for octal to decimal

Show the steps
  1. 493 ÷ 8 = 61 remainder 5
  2. 61 ÷ 8 = 7 remainder 5
  3. 7 ÷ 8 = 0 remainder 7
  4. Read the remainders from the bottom up: 755
Printable chart

Using the converter

Type a decimal number, like 493, and the octal appears straight away, with the division by 8 underneath. Numbers of any length work, negative ones too. Press swap to go from octal back to decimal.

How to convert decimal to octal

Divide by 8 and write down the remainder, then divide the answer by 8 again, until the answer is 0. Read the remainders from the last back up to the first.

For 493, 493 ÷ 8 = 61 remainder 5, then 61 ÷ 8 = 7 remainder 5, then 7 ÷ 8 = 0 remainder 7. Reading upwards gives 755, which is the chmod setting for a file everyone can read and run but only its owner can change.

Through binary instead

Since 8 is 2³, each octal digit is exactly three bits. If you have the number in binary, split the bits into threes from the right and turn each group into a digit from 0 to 7. 111 101 101 is 7, 5 and 5, which is 755 again.

Questions

What is 8 in octal?

10. One eight and no ones.

What is 100 in octal?

144. 100 ÷ 8 = 12 remainder 4, 12 ÷ 8 = 1 remainder 4, 1 ÷ 8 = 0 remainder 1, so reading upwards gives 144.

Why doesn't octal use 8 or 9?

Base 8 needs only eight digits, 0 to 7, the same way decimal needs only 0 to 9. Eight is written 10.

THE FIRST 33 NUMBERS

Decimal, binary, octal and hex from 0 to 32

DecimalBinaryOctalHex
0000
1111
21022
31133
410044
510155
611066
711177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F
16100002010
17100012111
18100102212
19100112313
20101002414
21101012515
22101102616
23101112717
24110003018
25110013119
2611010321A
2711011331B
2811100341C
2911101351D
3011110361E
3111111371F
321000004020

Sources

Added and reviewed . What's new